VM安装Centos7基础配置记录
安装
安装教程:https://blog.csdn.net/weixin_48658389/article/details/120227228?spm=1001.2014.3001.5506
配置
1、更新为华为Yum源
yum install -y wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-7-reg.repo
yum clean all
yum makecache
执行第一行命令即安装wget遇到问题:
other app is currently holding the yum lock; waiting for it to exit…
意思是有应用程序正在锁定yum,等待退出。
解决方式:查看并杀死进程,重新执行。
[quzx@localhost ~]$ ps aux|grep yum
root 3199 5.9 10.4 597952 165284 ? SN 10:42 0:16 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py get-updates none
root 3849 0.2 1.5 354172 24904 ? S 10:44 0:00 /usr/bin/python /usr/bin/yum install -y wget
root 4276 0.3 1.5 354144 24888 ? S 10:45 0:00 /usr/bin/python /usr/bin/yum install -y wget
[root@localhost quzx]# kill -9 3849
[root@localhost quzx]# kill -9 4276
[root@localhost quzx]# kill -9 3199
更换源:https://blog.csdn.net/qq_21389711/article/details/122668834?spm=1001.2014.3001.5506
2、安装gcc
cd ~
yum -y install gcc gcc-c++ kernel-devel
安装gcc:https://blog.csdn.net/GENGXINGGUANG/article/details/126231518?spm=1001.2014.3001.5506
3、安装Chrome浏览器
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
yum install -y lsb
yum install -y libXScrnSaver
yum localinstall google-chrome-stable_current_x86_64.rpm
安装Chrome浏览器https://blog.csdn.net/ling1998/article/details/123951726?spm=1001.2014.3001.5506
4、安装VSCode
(1)下载code-1.72.2-1665614416.el7.x86_64.rpm
https://code.visualstudio.com/
(2)执行命令
rpm -ivh code-1.72.2-1665614416.el7.x86_64.rpm
安装插件
安装完change language and restart
继续安装
安装完成会出现运行小图标
更改下字体大小
安装VSCode:http://t.zoukankan.com/icyhoo-p-13804309.html
5、(本人需要)安装CMake3.10.0
wget https://cmake.org/files/v3.10/cmake-3.10.0.tar.gz
tar zxf cmake-3.10.0.tar.gz
cd cmake-3.10.0
./bootstrap
make
sudo make install
cmake --version #查看版本
随着使用可能需要扩充root分区
可参考博客扩充root分区:https://blog.csdn.net/weixin_45486510/article/details/124488789?spm=1001.2014.3001.5506
亲测可以成功。
感谢上述各位博主的分享。