2024-04-29 22:22:30 +08:00
|
|
|
### 安装 .NET 7
|
2023-10-19 15:39:03 +08:00
|
|
|
|
|
|
|
* 下载脚本
|
|
|
|
|
|
|
|
```
|
|
|
|
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
* 授予此脚本作为可执行文件运行的权限
|
|
|
|
|
|
|
|
```
|
|
|
|
chmod +x ./dotnet-install.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
* 安装
|
|
|
|
|
|
|
|
```
|
|
|
|
./dotnet-install.sh --channel 7.0 --runtime aspnetcore
|
|
|
|
```
|
|
|
|
|
|
|
|
* 设置环境变量
|
|
|
|
|
|
|
|
```
|
|
|
|
vim ~/.bashrc
|
|
|
|
export DOTNET_ROOT=$HOME/.dotnet
|
|
|
|
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
|
|
|
|
```
|
|
|
|
|
|
|
|
* 使环境变量生效
|
|
|
|
```
|
|
|
|
source ~/.bashrc
|
2023-10-18 17:00:19 +08:00
|
|
|
```
|