登录  | 加入社区

黑狼游客您好!登录后享受更多精彩

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

查看: 1091|回复: 0

CentOS 6.4 x86_64 优化脚本

[复制链接]

384

主题

4

帖子

0

现金

黑狼菜鸟

Rank: 1

积分
0
发表于 2018-9-11 15:49:37 | 显示全部楼层 |阅读模式 来自 上海
阐明: 体系版本大概会有差别,以明白学习为主
#/bin/bash
# 体系底子升级
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
cd /etc/yum.repos.d/
mv CentOS-Base-repo CentOS-Base.repo.bak
mv CentOS6-Base-163.repo CentOS-Base.repo
yum clean all
yum makecache
yum update
# epel外部Yun扩展源
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
#GCC库与sysstat工具
yum -y instll gcc gcc-c++ vim-enhanced unzip unrar sysstat
# ntpdate 主动对时
yum -y install ntp
echo "01 01 * * * /usr/sbin/ntpdate ntp.api.bz >> /dev/null 2>&1" /etc/crontab
netdate ntp.api.bz
service crond restart
# 设置文件中的 ulimit 值【打开的文件句柄】
ulimit -SHn 65534
echo "ulimit -SHn 65534" >> /etc/rc.local
cat >> /etc/security/limits.conf > /etc/sysctl.conf  /etc/modprobe.d/disabled-ipv6.conf
# 禁用基于IPv6网络,使之不会触发启动
echo "IPV6INIT=no" >> /etc/sysconfig/network-scripts/ifcfg-eth0
chkconfig ip6tables off
# Vim根本优化

cat >> /root/.vimrc




上一篇:CentOS7联网初始化步调教程
下一篇:​PHP​培训课程哪家好?哪家教的好?
您需要登录后才可以回帖 登录 | 加入社区

本版积分规则

 

QQ|申请友链|小黑屋|手机版|Hlshell Inc. ( 豫ICP备16002110号-5 )

GMT+8, 2024-5-19 06:32 , Processed in 0.052187 second(s), 44 queries .

HLShell有权修改版权声明内容,如有任何爭議,HLShell將保留最終決定權!

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表