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 rhgb quiet“
 grub2-mkconfig -o /boot/grub2/grub.cfg
 vim /etc/hostname
 openstack-computer -h6.preview.com

#关闭 防火墙&&关闭selinux &&关闭NetworkManager systemctl禁用firewalld
 systemctl stop firewalld.service 
 systemctl disable NetworkManager

 systemctl stop NetworkManager
 vim /etc/sysconfig/selinux 
 临时禁用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


 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值