搭建 LNAMP 服务器,linux-nginx-apache-mysql-php

本安装过程适用 64位 CentOS 操作系统

gcc,libtool,iconv
——————————————————————————————-
zlib
./configure –prefix=/srv/lib/zlib && make && make install
——————————————————————————————-
nginx
./configure –prefix=/srv/nginx –with-http_stub_status_module –with-zlib=../zlib-1.2.5 –with-http_ssl_module –with-openssl=../openssl-1.0.0c –with-pcre=../pcre-8.11 && make && make install
——————————————————————————————-
apache
./configure –prefix=/srv/apache –enable-mods-shared=all –enable-so –with-port=81 && make && make install
——————————————————————————————-
mysql
groupadd mysql
useradd -r -g mysql mysql
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db –user=mysql
chown -R root .
chown -R mysql data
bin/mysqld_safe –user=mysql &
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
——————————————————————————————-
libxml
./configure –prefix=/srv/lib/libxml2 –with-zlib=/srv/lib/zlib && make && make install
——————————————————————————————-
libpng
./configure –prefix=/srv/lib/libpng && make && make install
——————————————————————————————-
freetype
./configure –prefix=/srv/lib/freetype && make && make install
——————————————————————————————-
jpeg
mkdir /srv/lib/jpeg
mkdir /srv/lib/jpeg/include
mkdir /srv/lib/jpeg/lib
mkdir /srv/lib/jpeg/bin
mkdir /srv/lib/jpeg/bin/cjpeg
mkdir /srv/lib/jpeg/man
mkdir /srv/lib/jpeg/man/man1
./configure –prefix=/srv/lib/jpeg –enable-shared && make && make install
——————————————————————————————-
gd
gd_png.h /srv/lib/libpng/include/
./configure –prefix=/srv/lib/gd –with-png=/srv/lib/libpng –with-freetype=/srv/lib/freetype –with-jpeg=/srv/lib/jpeg && make && make install
——————————————————————————————-
mhash
./configure && make && make install
——————————————————————————————-
libmcrypt
./configure && make && make install
——————————————————————————————-
mcrypt
./configure –prefix=/srv/lib/mcrypt && make && make install
——————————————————————————————-
curl
./configure –prefix=/srv/lib/curl && make && make install
——————————————————————————————-
gettext
./configure –prefix=/srv/lib/gettext && make && make install
——————————————————————————————-
php
./configure –prefix=/srv/lib/php-5.2 –with-apxs2=/srv/apache/bin/apxs –with-libxml-dir=/srv/lib/libxml2 –with-zlib-dir=/srv/lib/zlib –with-curl=/srv/lib/curl –with-jpeg-dir=/srv/lib/jpeg –with-png-dir=/srv/lib/libpng –with-freetype-dir=/srv/lib/freetype –with-gettext=/srv/lib/gettext –with-gd=/srv/lib/gd –enable-gd-native-ttf –with-mcrypt=/srv/lib/mcrypt –with-mysql=/usr/local/mysql –enable-mbstring –enable-magic-quotes –enable-soap –enable-sockets && make && make install
——————————————————————————————-
ZendOptimizer
jdk
tomcat

发表评论

电子邮件地址不会被公开。 必填项已用*标注