centos 7 系統安裝初始化引數
centos 7系統安裝初始化引數
#更改網路格式
yum install vim net-tools -y
cd / etc / sysconfig / network-scripts /
mv ifcfg-em1 ifcfg-eth0
mv ifcfg-em * / tmp /
vim / etc / default / grub
GRUB_CMDLINE_LINUX =“crashkernel = auto rd.lvm.lv = centos / root rd.lvm.lv = centos / swap net.ifnames = 0 biosdevname = 0
grub2-mkconfig -o /boot/grub2/grub.cfg
vim / etc / hostname
openstack-computer-h6.preview.com
#關閉
防火牆&&關閉selinux &&關閉NetworkManager systemctl禁用firewalld
systemctl stop firewalld.service
systemctl禁用NetworkManager
vim / etc / sysconfig / selinux
禁用
setenforce 0
yum install net-tools vim lrzsz tree screen lsof tcpdump wget firewalld -y
#同步時間
rm -rf / etc / localtime
ln -sv / usr / share / zoneinfo / Asia / Shanghai / etc / localtime
yum install ntpdate -y
ntpdate time1.aliyun.com
hwclock -w
date
[root @ openstack-computer-h5 rules.d] #crontab -l
* / 30 * * * * ntpdate 172.16.207.202 && hwclock -w
#更改sysctl.conf引數
vim /etc/sysctl.conf
net.ipv4.ip_nonlocal_bind = 1
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call- iptables = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_tw_recycle = 0
sysctl -p
#更改limits.conf引數
ulimit -n
vim /etc/security/limits.conf
* soft core unlimited
* hard core unlimited
* soft nproc 1000000
* hard nproc 1000000
* soft nofile 1000000
* hard nofile 1000000
* soft memlock 32000
* hard
memlock 32000 * soft msgqueue 8192000
* hard msgqueue 8192000
reboot
ulimit -n