Centos7配置,netCore开发环境记录
1. 下载vsode
进入官网下载
由于centos7无法使用高版本的vscode ,这里使用1.38
选择rpm下载
在下载好的文件夹打开终端
执行命令
sudo yum install '/home/chengzhouliang/Downloads/code-1.38.1-1568209352.el7.x86_64.rpm'
'/home/chengzhouliang/Downloads/code-1.38.1-1568209352.el7.x86_64.rpm'
是下载的rpm包
但是却报错了
这是因为这个网址是外网,国内访问不了
yum 配置国内源
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
将上面的内容粘贴到 /etc/yum.repos.d/CentOS-Base.repo
,再执下面的指令就行了
yum makecache
安装相关扩展与依赖
1.安装C#扩展
打开vscode,点击扩展,在搜索框搜索C#
在点击install就行了
2.安装vscode-solution-explorer扩展
和上面安装一样,安装完之后就会左侧菜单栏就会出现一个vs的标志
3.安装Nuget Package Manager
安装方法同上
问题1:在包管理显示包的安装版本是出现问题
原因主要是nuget插件里的拉组件的js文件没有进行小写的控制,这个js文件,我不知道在哪,所以安装一个文件搜索器
fzf
找不到那个文件,所以放弃了
根据提示,是因为ip在国内被重定向了,而这个可以用vpn,避免被重定向
思路一:挂全局vpn,避免重定向