本一键包用于最小化系统及快速重建系统,特别是免除独服,KVM,VMWare,VirtualBox等平台重装系统的麻烦.
在安装LNMP之前运行下本脚本,减少内存,硬盘,CPU占用...对你有百利而无一害...
-------------------------------------------------------------------------------------------------------------------------------------------------------
- cd ~; wget http://fzrxefe.googlecode.com/files/CentOS_Minimal-1.2.tar.gz; tar zxvf CentOS_Minimal-1.2.tar.gz
- cd ~/CentOS_Minimal-1.2
复制代码
-------------------------------------------------------------------------------------------------------------------------------------------------------
- bash CentOS_Minimal.sh ssh
复制代码
卸载不必要的程序,节约空间;
卸载LNMP(如果安装过的话);
升级系统并清除YUM Package缓存;
预先安装LNMP所需软件包;
更改SSH端口(可选,但强烈建议);
移除不必要的系统启动项
-------------------------------------------------------------------------------------------------------------------------------------------------------
- bash CentOS_Minimal.sh configure
复制代码
关闭BASH历史(可选);
初始化syslog(可选);
关闭密码,用密匙登陆(可选,但强烈建议);
设置为中国时区并同步时间(可选);
-------------------------------------------------------------------------------------------------------------------------------------------------------
- bash CentOS_Minimal.sh clean
复制代码
清除YUM Package缓存;
-------------------------------------------------------------------------------------------------------------------------------------------------------
- bash CentOS_Minimal.sh sshport
复制代码
更改SSH端口;
-------------------------------------------------------------------------------------------------------------------------------------------------------
- bash CentOS_Minimal.sh extra
复制代码
安装其他软件包
-------------------------------------------------------------------------------------------------------------------------------------------------------
如果要使用PubKey免密码登陆SSH(推荐):
将下面两行=后改成自己的
- PubKeyName=YourPubKeyName
- PubKeyLink=http://www.sample.com/
复制代码
直接编辑CentOS_Minimal.sh
或者修改后在CentOS_Minimal目录运行以下四行:
- PubKeyName=YourPubKeyName
- PubKeyLink=http://www.sample.com/
- sed -i "s#PubKeyName=.*#PubKeyName=$PubKeyName#g" CentOS_Minimal.sh
- sed -i "s#PubKeyLink=.*#PubKeyLink=$PubKeyLink#g" CentOS_Minimal.sh
复制代码
-------------------------------------------------------------------------------------------------------------------------------------------------------
>> COMPATIBILITY <<
兼容系统:
+ CentOS 5.x x86
+ CentOS 5.x x64
+ CentOS 6.x x86 (not yet)
+ CentOS 6.x x64 (not yet)
兼容平台:
+ Physical Hardware
+ KVM
+ OpenVZ
+ VirtualBox
+ VMWare
+ Xen