关于centos:CENTOS7常规初始化

5次阅读

共计 582 个字符,预计需要花费 2 分钟才能阅读完成。

更新零碎

# 更换零碎源
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.old
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all
yum makecache
yum update -y

# 批改 hostname
hostnamectl set-hostname yourhostname

惯例环境配置

yum install zsh git lrzsz unzip tree -y

nodejs

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
nvm install 12.14.1

nginx

yum info nginx
yum install nginx -y

nginx -t

systemctl status nginx
systemctl start nginx

# nginx default work dir: /usr/share/nginx/html

常见问题

# vim 异样报错
_arguments:451: _vim_files: function definition file not found

# 解决办法
rm ~/.zcompdump*
exec zsh
正文完
 0