系统安装
网卡配置
选择 Configure
第一个 ✔ 选上,即ONBOOT=yes;不选,即ONBOOT=no。
然后点击 Save
KDUMP
磁盘
安装内容
添加网卡与配置
在VMware中添加网卡,选择LAN区域,添加所需的LAN区段。该网卡属于 eth1
进入系统以后,创建 ifcfg-eth1 网卡配置文件
进入文件
vi /etc/sysconfig/network-scripts/ifcfg-eth1
输入以下代码
NAME=eth1
DEVICE=eth1
IPADDR=172.16.1.210
PREFIX=24
ONBOOT=yes
BOOTPROTO=static
重启网络服务,配置生效
systemctl restart network
基础优化
系统安全
systemctl stop firewalld.service
systemctl disable firewalld.service
setenforce 0
sed -i '7s#enforcing#disable#g' /etc/selinux/config
源与常用工具
# 配置yum源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
# 常用工具
yum install -y vim tree wget bash-completion bash-completion-extras lrzsz net-tools sysstat iotop iftop htop unzip nc nmap telent bc psmisc httpd-tools bind-utils nethogs expect
# epel源
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
时间同步
timedatectl set-timezone Asia/Shanghai
远程连接
sed -ri '$aGSSAPIAuthentication no\nUseDNS no' /etc/ssh/sshd_config
systemctl restart sshd
# 假如进行上述配置后,无法ssh连接,进行以下操作即可。
sed -i '79d;115d' /etc/ssh/sshd_config