日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長(zhǎng)提供免費(fèi)收錄網(wǎng)站服務(wù),提交前請(qǐng)做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點(diǎn)擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會(huì)員:747

無(wú)廢話、centos7安裝后優(yōu)化腳本

##關(guān)閉防火墻、selinux

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

setenforce 0

systemctl disable firewalld.service

systemctl stop firewalld.service

##禁止ctrl+alt+delete重啟機(jī)器

cat /etc/redhat-release | grep 'release 7' && rm -f /usr/lib/systemd/system/ctrl-alt-del.target

##修改主機(jī)名

hostnamectl --static set-hostname yourhostname

timedatectl set-local-rtc 0 # 將硬件時(shí)鐘調(diào)整為與本地時(shí)鐘一致, 0 為設(shè)置為 UTC 時(shí)間

timedatectl set-timezone Asia/Shanghai # 設(shè)置系統(tǒng)時(shí)區(qū)為上海

localectl set-locale LANG=en_US.UTF-8 # 設(shè)置英文utf-8

##內(nèi)核優(yōu)化

grep -q "hard nofile 102400" /etc/security/limits.conf || echo "* hard nofile 102400" >> /etc/security/limits.conf

grep -q "soft nofile 102400" /etc/security/limits.conf || echo "* soft nofile 102400" >> /etc/security/limits.conf

grep -q "hard nproc 102400" /etc/security/limits.conf || echo "* hard nproc 102400" >> /etc/security/limits.conf

grep -q "soft nproc 102400" /etc/security/limits.conf || echo "* soft nproc 102400" >> /etc/security/limits.conf

sed -i -e 's/^#DefaultLimitNOFILE=/DefaultLimitNOFILE=102400/' /etc/systemd/system.conf

rm -f /etc/security/limits.d/*.conf

mv -f /etc/sysctl.conf /etc/sysctl.conf.bak

cat >>/etc/sysctl.conf<<EOF

net.ipv4.ip_forward = 1

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

net.ipv4.tcp_max_tw_buckets = 160000

net.ipv4.tcp_sack = 1

net.ipv4.tcp_window_scaling = 1

net.ipv4.tcp_rmem = 4096 87380 8388608

net.ipv4.tcp_wmem = 4096 65536 8388608

net.core.wmem_default = 8388608

net.core.rmem_default = 8388608

net.core.rmem_max = 16777216

net.core.wmem_max = 16777216

net.core.netdev_max_backlog = 262144

net.ipv4.tcp_max_orphans = 3276800

net.ipv4.tcp_max_syn_backlog = 262144

net.ipv4.tcp_timestamps = 0

net.ipv4.tcp_synack_retries = 1

net.ipv4.tcp_syn_retries = 1

net.ipv4.tcp_tw_recycle = 1

net.ipv4.tcp_tw_reuse = 1

net.ipv4.tcp_mem = 94500000 915000000 927000000

net.ipv4.tcp_fin_timeout = 30

net.ipv4.tcp_keepalive_time = 30

net.ipv4.ip_local_port_range = 1024 65000

fs.file-max = 102400

vm.swAppiness = 10

EOF

##更改yum源

curl -s -o /etc/yum.repos.d/epel-7.repo https://mirrors.aliyun.com/repo/epel-7.repo

curl -s -o /etc/yum.repos.d/Centos-7.repo https://mirrors.aliyun.com/repo/Centos-7.repo

&& mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

mv /etc/yum.repos.d/Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo

##安裝常用工具

yum -y install wget bash-completion vim-enhanced

yum -y install lrzsz net-snmp net-tools sysstat ntp chrony

##設(shè)置chronyd,使用阿里的時(shí)間源

sed -i -e 's/0.centos.pool.ntp.org/time1.aliyun.com/g' -e 's/1.centos.pool.ntp.org/time2.aliyun.com/g' /etc/chrony.conf

systemctl enable chronyd.service

systemctl start chronyd.service

##關(guān)閉郵局組件

systemctl disable postfix.service

systemctl stop postfix

##關(guān)閉NetworkManager

systemctl disable NetworkManager

systemctl stop NetworkManager

##升級(jí)系統(tǒng)

yum makecache

yum -y --exclude=kernel* update

## 關(guān)閉ssh登錄時(shí)的名稱解析、加快登錄速度

sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config && systemctl restart sshd

分享到:
標(biāo)簽:Centos7
用戶無(wú)頭像

網(wǎng)友整理

注冊(cè)時(shí)間:

網(wǎng)站:5 個(gè)   小程序:0 個(gè)  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會(huì)員

趕快注冊(cè)賬號(hào),推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨(dú)大挑戰(zhàn)2018-06-03

數(shù)獨(dú)一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過(guò)答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫(kù),初中,高中,大學(xué)四六

運(yùn)動(dòng)步數(shù)有氧達(dá)人2018-06-03

記錄運(yùn)動(dòng)步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績(jī)?cè)u(píng)定2018-06-03

通用課目體育訓(xùn)練成績(jī)?cè)u(píng)定