linux自動安裝lnmp腳步

1、首先把腳步內容粘貼到文本中(vi lnmp)

2、用sh執行該腳步(sh lnmp)





-----------------腳步(刪除多餘的啟動項)--------------------------
chkconfig NetworkManager off
chkconfig abrt-ccpp off
chkconfig abrt-oops off
chkconfig abrtd off
chkconfig acpid off
chkconfig atd off
chkconfig autofs off
chkconfig cpuspeed off
chkconfig irqbalance off
chkconfig mdmonitor off
chkconfig messagebus off
chkconfig netfs off
chkconfig nfslock off
chkconfig portreserve off
chkconfig qpidd off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig udev-post off

chkconfig xendomains off
chkconfig xend off
chkconfig alsasound off
chkconfig smbfs off
chkconfig isdn off
chkconfig nfsboot off
chkconfig pcmcia off
chkconfig xdm off
chkconfig nfs off
chkconfig portmap off
chkconfig smb off
chkconfig cups off
chkconfig cupsrenice off
chkconfig postfix off
chkconfig rpcbind off
chkconfig sendmail off
chkconfig bluetooth off
chkconfig hidd off
chkconfig ip6tables off
chkconfig avahi-daemon off
chkconfig avahi-dnsconfd off
chkconfig cups off
chkconfig iptables off
chkconfig yum-updatesd off

sed -i '/^SELINUX=/s/enforcing/disabled/' /etc/sysconfig/selinux
sed -i '/^SELINUX=/s/enforcing/disabled/' /etc/selinux/config
setenforce 0
yum install mysql mysql-devel -y

yum install rsync openssh-clients -y

mkdir /home2/install
rpm -ivh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
yum install gcc gcc-c++ make -y
yum install libxml2 libxml2-devel gd freetype-devel t1lib-devel libmcrypt libmcrypt-devel libXpm-devel mcrypt bzip2-devel curl curl-devel openssl openssl-devel libjpeg libjpeg-devel libpng libpng-devel -y

ln -s /usr/lib64/libXpm.so* /usr/lib/
ln -s /usr/lib64/mysql/libmysqlclient* /usr/lib/
rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum install nginx -y

yum install mysql mysql-server mysql-devel -y

chkconfig mysqld on


wget -P /home2/install http://am1.php.net/get/php-5.3.27.tar.bz2/from/this/mirror
cd /home2/install
#有可能下載的文本名不對
tar jxvf php-5.3.27.tar.bz2
cd php-5.3.27


./configure --prefix=/usr/local/php --enable-fpm \
--with-mcrypt --with-zlib --enable-mbstring --with-curl \
--disable-debug --disable-rpath --enable-inline-optimization \
--with-bz2 --with-zlib --enable-sockets --enable-sysvsem \
--enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash \
--enable-zip --with-pcre-regex --with-gd --with-jpeg-dir \
--with-mysql --with-mysqli --with-freetype-dir --with-xpm-dir \
--with-gd --with-openssl --enable-soap --with-pdo-mysql
make clean
make
make install

-----------------腳步--------------------------


感謝William.Liu

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章