jyhrte 发表于 2015-4-15 11:05:51

LNMP环境搭建

                      1. MySQL安装(同LAMP里面的安装方法)
2.php安装
wget http://syslab.comsenz.com/downloads/linux/php-5.3.10.tar.bz2
tar jxf php-5.3.10.tar.bz2
useradd -s /sbin/nologin php-fpm
cd php-5.3.10
./configure --prefix=/usr/local/php   --with-config-file-path=/usr/local/php/etc--enable-fpm   --with-fpm-user=php-fpm--with-fpm-group=php-fpm   --with-mysql=/usr/local/mysql--with-mysql-sock=/tmp/mysql.sock--with-libxml-dir--with-gd   --with-jpeg-dir   --with-png-dir   --with-freetype-dir--with-iconv-dir   --with-zlib-dir   --with-mcrypt   --enable-soap   --enable-gd-native-ttf   --enable-ftp--enable-mbstring--enable-exif--enable-zend-multibyte   --disable-ipv6   --with-pear   --with-curl
make && make install

cp php.ini-production /usr/local/php/etc/php.ini

拷贝启动脚本:cp /usr/local/src/php-5.3.10/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod 755 /etc/init.d/php-fpm chkconfig --add php-fpm
service php-fpm start
chkconfig php-fpm on


3. 安装nginx
cd /usr/local/src/
wget http://nginx.org/download/nginx-1.4.4.tar.gz
tar zxvf nginx-1.4.4.tar.gz
cd nginx-1.4.4
./configure   --prefix=/usr/local/nginx   --with-pcre
make
make install
启动nginx:
/usr/local/nginx/sbin/nginx

重新加载 /usr/local/nginx/sbin/nginx -sreload
                   

页: [1]
查看完整版本: LNMP环境搭建