最新消息:时间抓起来说是金子,抓不住就是流水。

CENTOS 6.X下安装NGINX-1.1.16 PHP-5.4.0 MYSQL-5.5.21

LINUX技术 老子黑牵翻 31987浏览 6评论

CENTOS 6.X下安装NGINX-1.1.16  PHP-5.4.0  MYSQL-5.5.21

用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

所需软件下载地址:http://soft.ileiming.com/soft1.1.tar.gz
下载后解压tar zxvf soft1.1.tar.gz

安装前准备:

# tar zxvf libiconv-1.14.tar.gz
# cd libiconv-1.14
# ./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

# 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

# tar xvzf cmake-2.8.7.tar.gz
# ./configure
# gmake
# gmake install

# tar zxvf bison-2.4.3.tar.gz
# cd bison-2.4.3
# ./configure
# make
# make install

安装mysql5.5.21

# groupadd mysql
# useradd -g mysql mysql
# cmake -DMYSQL_USER=mysql -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql/data -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_SSL=yes -DWITH_DEBUG=0
# make
# make install
# /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql/ --datadir=/data/mysql/data --user=mysql
# cd /usr/local/mysql/support-files/
# cp my-innodb-heavy-4G.cnf /data/mysql/my.cnf
# cp mysql.server /etc/rc.d/init.d/mysql
# chown mysql:mysql /etc/rc.d/init.d/mysql
# chmod +w /etc/rc.d/init.d/mysql

安装php-5.4.0

# groupadd www
# useradd -g www www
# yum install net-snmp-devel  net-snmp net-snmp-utils
# tar -zxvf php-5.4.0.tar.gz
# cd php-5.4.0
# ln -s /usr/local/mysql/lib/libmysqlclient.a /usr/lib/libmysqlclient_r.a
# ln -s /usr/local/mysql/lib/libmysqlclient.so /usr/lib/libmysqlclient_r.so
# ln -s /usr/local/mysql/lib/libmysqlclient.so /usr/lib/libmysqlclient_r.so.18
# ln -s /usr/local/mysql/lib/libmysqlclient.so /usr/lib/libmysqlclient_r.so.18.0.0
# ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so
# ln -s /usr/local/mysql/lib/libmysqlclient.so.18.0.0 /usr/lib/libmysqlclient.so.18
# ln -s /usr/local/mysql/lib/libmysqlclient.so.18.0.0 /usr/lib/libmysqlclient.so.18.0.0
# ln -s /usr/local/mysql/lib/libmysqlservices.a /usr/lib/libmysqlservices.a
# ln -s /usr/local/mysql/lib/libmysqlclient.a /usr/lib/libmysqlclient.a
# ldconfig -v
# ln -s /usr/lib64/libpng.so /usr/lib/libpng.so
# ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so
# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-iconv-dir=/usr/local --enable-fpm --disable-phar --with-fpm-user=www --with-fpm-group=www --with-pcre-regex --with-zlib --with-bz2 --enable-calendar --with-curl --enable-dba --with-libxml-dir --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-mhash --enable-mbstring --with-mcrypt --enable-pcntl  --enable-xml --disable-rpath  --enable-shmop --enable-sockets --enable-zip --enable-bcmath --with-snmp --disable-ipv6
# make ZEND_EXTRA_LIBS='-liconv'
# make install
# cp php.ini-production /usr/local/php/etc/php.ini
# cd /usr/local/php/etc/
# cp php-fpm.conf.default php-fpm.conf

安装NGINX-1.1.16

# tar -zxvf pcre-8.12.tar.gz
# cd pcre-8.12
# ./configure --prefix=/usr/local
# make
# make install

# tar -zxvf nginx-1.1.16.tar.gz
# cd nginx-1.1.16
# ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --with-pcre --with-http_realip_module
# make
# make install

转载请注明:LINUX服务器运维架构技术分享 » CENTOS 6.X下安装NGINX-1.1.16 PHP-5.4.0 MYSQL-5.5.21

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (6)

  1. I real equal when you address this type of nonsense privileged your posts. Perhaps could you remain this?
    Inspirational Quotes12年前 (2012-03-24)回复
  2. This web site is basically interesting i'm yearning for is there the other examples? however anyway many thanks noticeably as a result of I found that i was craving for.
    Inspirational Quotes12年前 (2012-03-24)回复
  3. This is a very good tip particularly to those fresh to the blogosphere. Brief but very precise info… Appreciate your sharing this one. A must read article!
    basement flooring options12年前 (2012-03-24)回复
  4. Magnificent goods from you, man. I've understand your stuff previous to and you're just extremely great. I really like what you've acquired here, really like what you're stating and the way in which you say it. You make it enjoyable and you still care for to keep it wise. I can't wait to read much more from you. This is actually a tremendous site.
    Inspirational Quotes12年前 (2012-03-20)回复
  5. Actually genuinely great weblog article which has received me considering. I by no means looked at this from the stage of look at.
    ipad12年前 (2012-03-18)回复