欢迎来到天天文库
浏览记录
ID:15960163
大小:55.00 KB
页数:19页
时间:2018-08-06
《基于centos构建高性能的lamp平台》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、基于CentOS构建高性能的LAMP平台基于CentOS构建高性能的LAMP平台大纲:一、系统安装二、编译安装基本环境三、配置虚拟主机及基本性能调优四、基本安全设置五、附录及相关介绍一、系统安装1.分区/boot100M左右SWAP物理内存的2倍(如果你的物理内存大于4G以上,分配4G即可)/15G/usr/local20G(用于安装软件)/data剩余所有空间2.系统初始化脚本(根据具体需求关闭不需要的服务)#viinit.sh-------------------cutbegin-------------------------------------------#welcom
2、ecat<3、===WelcometoCentosSysteminit===4、+--------------http://www.linuxtone.org------------------------++----------------------Author:NetSeek--------------------------+EOF#disableipv6cat<5、--------------------------+6、===WelcometoDisableIPV6===7、+--------------------------------------------------------------+EOFecho"aliasnet-pf-10off">>/etc/modprobe.confecho"aliasipv6off">>/etc/modprobe.conf/sbin/chkconfig--level35ip6tablesoffecho"ipv6isdisabled!"#disableselinuxsed-i'/SELINUX/s/en8、forcing/disabled/'/etc/selinux/configecho"selinuxisdisabled,youmustreboot!"#vimsed-i"8s/^/aliasvi='vim'/"/root/.bashrcecho'syntaxon'>/root/.vimrc#zh_cnsed-i-e's/^LANG=.*/LANG="zh_CN.GB18030"/'/etc/sysconfig/i18n#tunoffservices#-------------------------------------------------------------------9、-------------cat<10、===WelcometoTunoffservices===11、+--------------------------------------------------------------+EOF#---------------------------------------------------------------------------------foriin`ls/etc/rc3.d/S*`doCURS12、RV=`echo$i13、cut-c15-`echo$CURSRVcase$CURSRVincrond14、irqbalance15、microcode_ctl16、network17、random18、sendmail19、sshd20、syslog21、local22、mysqld)echo"Baseservices,Skip!";;*)echo"change$CURSRVtooff"chkconfig--level235$CURSRVoffservice$CURSRVstop;;esacdone-------------------cutend------------------------------------23、-------#shinit.sh(执行上面保存的脚本,仍后重启)二、编译安装基本环境1.安装准备1)系统约定软件源代码包存放位置/usr/local/src源码包编译安装位置(prefix)/usr/local/software_name脚本以及维护程序存放位置/usr/local/sbinMySQL数据库位置/data/mysql/data(可按情况设置)Apache网站根目录/data/www/wwwroot(可按情况设置)Apache虚拟主机日志根目录/dat
3、===WelcometoCentosSysteminit===
4、+--------------http://www.linuxtone.org------------------------++----------------------Author:NetSeek--------------------------+EOF#disableipv6cat<5、--------------------------+6、===WelcometoDisableIPV6===7、+--------------------------------------------------------------+EOFecho"aliasnet-pf-10off">>/etc/modprobe.confecho"aliasipv6off">>/etc/modprobe.conf/sbin/chkconfig--level35ip6tablesoffecho"ipv6isdisabled!"#disableselinuxsed-i'/SELINUX/s/en8、forcing/disabled/'/etc/selinux/configecho"selinuxisdisabled,youmustreboot!"#vimsed-i"8s/^/aliasvi='vim'/"/root/.bashrcecho'syntaxon'>/root/.vimrc#zh_cnsed-i-e's/^LANG=.*/LANG="zh_CN.GB18030"/'/etc/sysconfig/i18n#tunoffservices#-------------------------------------------------------------------9、-------------cat<10、===WelcometoTunoffservices===11、+--------------------------------------------------------------+EOF#---------------------------------------------------------------------------------foriin`ls/etc/rc3.d/S*`doCURS12、RV=`echo$i13、cut-c15-`echo$CURSRVcase$CURSRVincrond14、irqbalance15、microcode_ctl16、network17、random18、sendmail19、sshd20、syslog21、local22、mysqld)echo"Baseservices,Skip!";;*)echo"change$CURSRVtooff"chkconfig--level235$CURSRVoffservice$CURSRVstop;;esacdone-------------------cutend------------------------------------23、-------#shinit.sh(执行上面保存的脚本,仍后重启)二、编译安装基本环境1.安装准备1)系统约定软件源代码包存放位置/usr/local/src源码包编译安装位置(prefix)/usr/local/software_name脚本以及维护程序存放位置/usr/local/sbinMySQL数据库位置/data/mysql/data(可按情况设置)Apache网站根目录/data/www/wwwroot(可按情况设置)Apache虚拟主机日志根目录/dat
5、--------------------------+
6、===WelcometoDisableIPV6===
7、+--------------------------------------------------------------+EOFecho"aliasnet-pf-10off">>/etc/modprobe.confecho"aliasipv6off">>/etc/modprobe.conf/sbin/chkconfig--level35ip6tablesoffecho"ipv6isdisabled!"#disableselinuxsed-i'/SELINUX/s/en
8、forcing/disabled/'/etc/selinux/configecho"selinuxisdisabled,youmustreboot!"#vimsed-i"8s/^/aliasvi='vim'/"/root/.bashrcecho'syntaxon'>/root/.vimrc#zh_cnsed-i-e's/^LANG=.*/LANG="zh_CN.GB18030"/'/etc/sysconfig/i18n#tunoffservices#-------------------------------------------------------------------
9、-------------cat<10、===WelcometoTunoffservices===11、+--------------------------------------------------------------+EOF#---------------------------------------------------------------------------------foriin`ls/etc/rc3.d/S*`doCURS12、RV=`echo$i13、cut-c15-`echo$CURSRVcase$CURSRVincrond14、irqbalance15、microcode_ctl16、network17、random18、sendmail19、sshd20、syslog21、local22、mysqld)echo"Baseservices,Skip!";;*)echo"change$CURSRVtooff"chkconfig--level235$CURSRVoffservice$CURSRVstop;;esacdone-------------------cutend------------------------------------23、-------#shinit.sh(执行上面保存的脚本,仍后重启)二、编译安装基本环境1.安装准备1)系统约定软件源代码包存放位置/usr/local/src源码包编译安装位置(prefix)/usr/local/software_name脚本以及维护程序存放位置/usr/local/sbinMySQL数据库位置/data/mysql/data(可按情况设置)Apache网站根目录/data/www/wwwroot(可按情况设置)Apache虚拟主机日志根目录/dat
10、===WelcometoTunoffservices===
11、+--------------------------------------------------------------+EOF#---------------------------------------------------------------------------------foriin`ls/etc/rc3.d/S*`doCURS
12、RV=`echo$i
13、cut-c15-`echo$CURSRVcase$CURSRVincrond
14、irqbalance
15、microcode_ctl
16、network
17、random
18、sendmail
19、sshd
20、syslog
21、local
22、mysqld)echo"Baseservices,Skip!";;*)echo"change$CURSRVtooff"chkconfig--level235$CURSRVoffservice$CURSRVstop;;esacdone-------------------cutend------------------------------------
23、-------#shinit.sh(执行上面保存的脚本,仍后重启)二、编译安装基本环境1.安装准备1)系统约定软件源代码包存放位置/usr/local/src源码包编译安装位置(prefix)/usr/local/software_name脚本以及维护程序存放位置/usr/local/sbinMySQL数据库位置/data/mysql/data(可按情况设置)Apache网站根目录/data/www/wwwroot(可按情况设置)Apache虚拟主机日志根目录/dat
此文档下载收益归作者所有