新增.Net 6文档

This commit is contained in:
wenyongda 2022-11-21 00:14:43 +08:00
parent deb153a624
commit a3ac78d3ad
11 changed files with 116 additions and 1 deletions

View File

@ -75,7 +75,8 @@ aplayerInject:
inject:
head:
bottom:
- <div class="aplayer no-destroy" data-id="7427714271" data-server="netease" data-type="playlist" data-fixed="true" data-mini="true" data-listFolded="false" data-order="random" data-lrctype="1" data-preload="none" data-autoplay="true" muted></div>
# 7427714271
- <div class="aplayer no-destroy" data-id="7755841452" data-server="netease" data-type="playlist" data-fixed="true" data-mini="true" data-listFolded="false" data-order="random" data-lrctype="1" data-preload="none" data-autoplay="true" muted></div>
- <script async src="https://npm.elemecdn.com/tzy-blog/lib/js/other/sakura.js"></script>
pjax:
enable: true

40
source/_posts/.Net 6.md Normal file
View File

@ -0,0 +1,40 @@
# .Net 6
## 1. 部署到Docker
### 1.1 安装.Net SDK 6.0环境
```shell
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
sudo yum install dotnet-sdk-6.0
dotnet --info
```
### 1.2 Visual Studio添加Docker支持
![image-20221121144928205](https://markdownhexo.oss-cn-hangzhou.aliyuncs.com/img/image-20221121144928205.png)
### 1.3 Linux下构建Docker镜像
```shell
docker image build -f ./XiaodaERP/Dockerfile -t aspnetcore .
docker images
```
### 1.4 运行Docker镜像
```shell
docker run --name=aspnetcore -p 9001:80 -d aspnetcore
docker ps
```
```shell
cd /usr/local/jenkins_home/workspace/XiaodaERP_NetCore
echo $PWD
docker image build -f ./XiaodaERP/Dockerfile -t xiaodaerp/netcore .
docker images
docker run --name xiaodaerp/netcore -p 7274:80 -d xiaodaerp/netcore
```

View File

@ -271,3 +271,39 @@ cert: false
# 创建并启动容器 # -u 表示以 root用户运行
docker run -d -u root -p 8088:8080 --name code-server -v /usr/docker/codeserver/config.yaml:/root/.config/code-server/config.yaml -v /usr/docker/codeserver:/home/code codercom/code-server
```
## docker安装Jenkins
搜索Jenkins镜像
```shell
docker search jenkins
```
![image-20221121125608385](https://markdownhexo.oss-cn-hangzhou.aliyuncs.com/img/image-20221121125608385.png)
查看镜像
```shell
docker images
```
![image-20221121131216876](https://markdownhexo.oss-cn-hangzhou.aliyuncs.com/img/image-20221121131216876.png)
启动镜像
```shell
docker run -d -uroot -p 8889:8080 -p 50000:50000 --name jenkins -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v /etc/sysconfig/docker:/etc/sysconfig/docker -v /usr/local/jenkins_home:/var/jenkins_home -v /etc/localtime:/etc/localtime jenkins/jenkins
```
启动后查看日志
```shell
docker logs jenkins
```
![image-20221121131635658](https://markdownhexo.oss-cn-hangzhou.aliyuncs.com/img/image-20221121131635658.png)可以找到初始密码
```shell
docker image build -f ./XiaodaERP/Dockerfile -t aspnetcore .
```

View File

@ -533,3 +533,12 @@ cd nginx-1.21.4/
make
make install
```
## 安装.Net 6 SDK
```shell
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
sudo yum install dotnet-sdk-6.0
dotnet --info
```

View File

@ -61,3 +61,32 @@ Windows Registry Editor Version 5.00
删除多余的文件尤其是有一个什么Markdown File只保留如下的两项。然后关闭注册表即可修复bug
![img](http://markdownhexo.oss-cn-hangzhou.aliyuncs.com/img/img)
## 上传图片至阿里云OSS
模板
```json
{
"picBed": {
"uploader": "aliyun",
"aliyun": {
"accessKeyId": "",
"accessKeySecret": "",
"bucket": "", // 存储空间名
"area": "", // 存储区域代号
"path": "img/", // 自定义存储路径
"customUrl": "", // 自定义域名,注意要加 http://或者 https://
"options": "" // 针对图片的一些后缀处理参数 PicGo 2.2.0+ PicGo-Core 1.4.0+
}
},
"picgoPlugins": {}
}
```
![image-20221121130426162](https://markdownhexo.oss-cn-hangzhou.aliyuncs.com/img/image-20221121130426162.png)
![image-20221121130857072](https://markdownhexo.oss-cn-hangzhou.aliyuncs.com/img/image-20221121130857072.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB