1. LAMP 编译安装
2.LNMP编译安装
[root]# cd /usr/local/src
[root src]# wget [root src]# tar zxvf nginx-0.8.54.tar.gz[root src]# cd nginx-0.8.54如果你想了解该版本的的一些信息,请查看CHANGES 文件。[root src nginx-0.8.54]# useradd -s /sbin/nologin -M www[root src nginx-0.8.54]# ./configure --prefix=/usr/local/nginx \--user=www --group=www \--with-http_stub_status_module --with-file-aio \--with-http_ssl_module \[root@Web-Server nginx-0.8.54]# make && make install 1.3 Nginx 配置文件和启动[root]# /usr/local/nginx/sbin/nginx -t 测试配置the configuration file /usr/local/nginx/conf/nginx.conf syntax is okconfiguration file /usr/local/nginx/conf/nginx.conf test is successful[root]# /usr/local/nginx/sbin/nginx (启动)[root]# /usr/local/nginx/sbin/nginx -s reload (重新加载)
1.4 MySQL 安装
[root]# cd /usr/local/src
[root]# wget [root]# tar zxvf mysql-5.1.56.tar.gz[root]# cd mysql-5.1.56[root]#/nfigure --prefix=/usr/local/mysql \--localstatedir=/data/mysql --enable-assembler \--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static \--with-pthread --enable-static --with-big-tables --without-ndb-debug \--with-charset=utf8 --with-extra-charsets=all \--without-debug --enable-thread-safe-client --enable-local-infile --with-plugins=max[root]# make && make install[root]#groupadd mysql[root]#useradd -s /sbin/nologin -M -g mysql mysql[root]#chown -R root:mysql /usr/local/mysql/1.5 PHP 安装
[root ~]# cd /usr/local/src
[root src]# wget 如银联在线的网上支付接口就需要mcrypt 和bcmath 和curl 三个PHP 扩展库的支持,[root rc]# wget[root rc]# wget [root src]# wget[root@web-node1 src]# wget[root rc]# tar zxvf libiconv-1.13.1.tar.gz[root rc]# cd libiconv-1.13.1[root libiconv-1.13.1]# ./configure --prefix=/usr/local[root libiconv-1.13.1]# make && make install[root rc]# tar zxvf libmcrypt-2.5.8.tar.gz[root src]# cd libmcrypt-2.5.8[root libmcrypt-2.5.8]# ./configure && make && make install[root libmcrypt-2.5.8]# ldconfig[root libmcrypt-2.5.8]# cd libltdl/[root libltdl]# ./configure --enable-ltdl-install[root libltdl]# make && make install[root src]# cd mhash-0.9.9.9[root lib]# ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la[root lib]# ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so[root lib]#ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4[root lib]# ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8[root lib]# ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a[root lib]# ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la[root lib]# ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so[root lib]# ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2[root lib]# ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1[root lib]# ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config[root src]# tar zxvf mcrypt-2.6.8.tar.gz[root src]# cd mcrypt-2.6.8[root mcrypt-2.6.8]# ldconfig[root crypt-2.6.8]# ./configure && make && make install
尊重原创