安装Contos7系统后的常规操作及软件服务安装
- 改名
hostnamectl --static set-hostname [name]
- 更新yum及换源
yum update -y
yum install wget -y
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
通过wget工具,从阿里云获取配置文件,根据自己centos的版本选择
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
yum clean all
yum makecache
-
升级内核
跳转至升级内核的文章 -
NTP
跳转至服务器加入NTP
yum -y install ntp
systemctl enable ntpd
ntpdate time1.aliyun.com
- 关闭SELINUX
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
-安装yum-utils
yum install yum-utils -y
- 安装常用软件及服务
- vim
编辑工具
- wget
默认已安装
下载工具
- curl
默认已按装
是利用URL语法在命令行方式下工作的开源文件传输工具。
- net-tools
网络工具
- zlib
zlib库提供了很多种压缩和解压缩的方式
- zip&unzip
默认已按装
- lrzsz
文件上传下载
- traceroute
查看路由
- lsof
默认已安装
端口查看
- openssl
默认已按装
yum -y install vim
yum -y install wget
yum -y install curl
yum -y install net-tools
yum -y install zlib zlib-devel ruby
yum -y install unzip zip
yum -y install lrzsz
yum -y install traceroute
yum -y install lsof
yum -y install openssl openssl-devel patch