LNMP环境编译安装备忘-centos6.2
2013-12-28 15:06
555 查看
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 yum -y install perl-CPAN #1、安装php所需要的库 set -e tar zxvf libiconv-1.13.1.tar.gz cd libiconv-1.13.1/ ./configure --prefix=/usr/local make make install cd ../ 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 cd ../../ 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/libmcrypt.la /usr/lib/libmcrypt.la 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/libmhash.la /usr/lib/libmhash.la 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 cd ../ #2、安装mysql-5.5.3 /usr/sbin/groupadd mysql /usr/sbin/useradd -g mysql mysql tar zxvf mysql-5.5.3-m3.tar.gz cd mysql-5.5.3-m3/ ./configure --prefix=/www/webserver/mysql/ --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=partition,innobase,myisammrg make && make install chmod +w /www/webserver/mysql/ chown -R mysql:mysql /www/webserver/mysql/ cd ../ #3、安装php-5.3.20 cp -frp /usr/lib64/libldap* /usr/lib/ cd /www/webserver/mysql/include/mysql mkdir psi cp psi.h psi/ echo "/www/webserver/mysql/lib/mysql" >> /etc/ld.so.conf ldconfig ln -s /www/webserver/mysql/lib/mysql /usr/lib/mysql ln -s /www/webserver/mysql/include/mysql /usr/include/mysql cd /root/lnmp/ tar zxvf php-5.3.20.tar.gz patch -d php-5.3.20 -p0 < fpm-race-condition.patch cd php-5.3.20/ './configure' '--prefix=/www/webserver/php' '--with-config-file-path=/www/webserver/php/etc' '--with-mysql=/www/webserver/mysql' '--with-mysqli=/www/webserver/mysql/bin/mysql_config' '--with-iconv-dir=/usr/local' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-ftp' '--enable-safe-mode' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--with-curlwrappers' '--enable-mbregex' '--enable-session' '--enable-fpm' '--with-gettext' '--enable-mbstring' '--with-mcrypt' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-ldap' '--with-ldap-sasl' '--with-xmlrpc' '--enable-zip' '--enable-soap' '--without-pear' make ZEND_EXTRA_LIBS='-liconv' make install cp php.ini-production /www/webserver/php/etc/php.ini cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm cp sapi/fpm/php-fpm.conf /www/webserver/php/etc/php-fpm.conf chmod 777 /etc/init.d/php-fpm cd ../ #4、安装php扩展模块 tar zxvf PDO_MYSQL-1.0.2.tgz cd PDO_MYSQL-1.0.2/ /www/webserver/php/bin/phpize ./configure --with-php-config=/www/webserver/php/bin/php-config --with-pdo-mysql=/www/webserver/mysql make make install cd ../ tar zxvf ImageMagick.tar.gz cd ImageMagick-6.5.1-2/ ./configure make make install cd ../ tar zxvf imagick-2.3.0.tgz cd imagick-2.3.0/ /www/webserver/php/bin/phpize ./configure --with-php-config=/www/webserver/php/bin/php-config make make install cd ../ tar zxvf APC-3.1.9.tgz cd APC-3.1.9 /www/webserver/php/bin/phpize ./configure --enable-apc --enable-apc-mmap --with-php-config=/www/webserver/php/bin/php-config make make install cd ../ tar zxvf phpredis-2.1.0.tar.gz cd phpredis-2.1.0 /www/webserver/php/bin/phpize ./configure --with-php-config=/www/webserver/php/bin/php-config make make install cd ../ #5安装nginx(tengine)服务 /usr/sbin/groupadd www /usr/sbin/useradd -g www www tar zxvf pcre-8.32.tar.gz cd pcre-8.32 ./configure --prefix=/usr/local/pcre8 make && make install cd ../ tar zxvf tengine-1.5.1.tar.gz cd tengine-1.5.1 ./configure --prefix=/www/webserver/nginx --with-syslog --with-http_concat_module --with-http_stub_status_module --with-pcre=/root/lnmp/pcre-8.32 make && make install cd ../ #6.安装pear wget http://pear.php.net/go-pear.phar php go-pear.phar
本文出自 “记录点滴” 博客,请务必保留此出处http://caozm.blog.51cto.com/1118764/1346013
相关文章推荐
- 基于CentOS 6.8平台最新源代码包编译安装LNMP环境搭建(Nginx+MySQL+PHP)
- CentOS编译安装LNMP环境
- CentOS 6.4系统下编译安装LNMP和配置PHP环境具体步骤
- 自己亲身体验的CentOS编译安装LNMP环境
- centos6.4下编译安装LNMP环境
- CentOS 6.6 环境下 编译安装LNMP
- CentOS编译安装LNMP环境(转载)
- CentOS编译安装LNMP环境
- Centos7 手把手教你 编译安装LNMP环境 (古月)
- CentOS-6.5下编译安装LNMP环境【nginx1.8.1、mysql5.5.43、php 5.6】
- centos 6.2系统下编译安装lamp环境
- CentOS7一键编译安装LNMP环境
- CentOS6.5 编译安装lnmp环境
- 基于CentOS6.5环境之下的LNMP之编译安装mysql5.6.27
- CentOS6.5 编译安装lnmp环境
- Centos 编译安装LNMP环境(Nginx+MySQL+PHP)教程
- centos 7.2 编译安装 lnmp环境(究极篇)
- CentOS 7上源码编译安装和配置LNMP Web+phpMyAdmin服务器环境
- 阿里云centos6.5实践编译安装LNMP架构web环境
- centos7 编译安装新版LNMP环境