生产环境lnmp安装

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

一:下载软件包:

wget /soft/linux/nginx_php/nginx/nginx-0.8.46.tar.gz

wget /soft/linux/nginx_php/php/php-5.2.14.tar.gz

wget /soft/linux/nginx_php/phpfpm/php-5.2.14-fpm-0.5.14.diff.gz

wget /soft/linux/nginx_php/mysql/mysql-5.5.3-m3.tar.gz

wget /soft/linux/nginx_php/libiconv/libiconv-1.13.1.tar.gz

wget /soft/linux/nginx_php/mcrypt/libmcrypt-2.5.8.tar.gz

wget /soft/linux/nginx_php/mcrypt/mcrypt-2.6.8.tar.gz

wget /soft/linux/nginx_php/memcache/memcache-2.2.5.tgz

wget /soft/linux/nginx_php/mhash/mhash-0.9.9.9.tar.gz

wget /soft/linux/nginx_php/pcre/pcre-8.10.tar.gz

wget /soft/linux/nginx_php/eaccelerator/eaccelerator-0.9.6.1.tar.bz2

wget /soft/linux/nginx_php/pdo/PDO_MYSQL-1.0.2.tgz

wget /soft/linux/nginx_php/imagick/ImageMagick.tar.gz

wget /soft/linux/nginx_php/imagick/imagick-2.3.0.tgz

二:yum安装需要的包:

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

三:安装PHP 5.2.14(FastCGI模式)

1、编译安装PHP 5.2.14所需的支持库:

tar zxvf libiconv-1.13.1.tar.gz

cd libiconv-1.13.1/

./configure --prefix=/usr/local

make

make install

tar zxvf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8/

./configure

make

make install

/sbin/ldconfig

cd libltdl/

./configure --enable-ltdl-install

make

make install

tar zxvf mhash-0.9.9.9.tar.gz

cd mhash-0.9.9.9/

./configure

make

make install

cd ../

ln -s /usr/local/lib/ /usr/lib/

ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so

ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4

ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8

ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a

ln -s /usr/local/lib/ /usr/lib/

ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so

ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2

ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1

ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config

tar zxvf mcrypt-2.6.8.tar.gz

cd mcrypt-2.6.8/

/sbin/ldconfig

./configure

make

make install

2、编译安装MySQL 5.5.3-m3

tar zxvf mysql-5.5.3-m3.tar.gz

cd mysql-5.5.3-m3/

./configure --prefix=/usr/local/mysql/ --without-debug --with-big-tables --with-extra-charsets=all --enable-thread-safe-client --enable-assembler --with-readline --with-embedded-server --enable-local-infile --with-plugins=partition,innobase,myisammrg make

make install

/usr/sbin/groupadd mysql

/usr/sbin/useradd -g mysql mysql

cp /usr/local/mysql/share/mysql/f /etc/f

/usr/local/mysql/bin/mysql_install_db --user=mysql

cd /usr/local/mysql

chown -R root .

chown -R mysql var

chgrp -R mysql .

/usr/local/mysql/share/mysql/mysql.server start

3、编译安装PHP(FastCGI模式)

tar zxvf php-5.2.14.tar.gz

相关文档
最新文档