The process of installing Nginx 1.4+php 5.5 fastcgi under CentOS 5

Source: Internet
Author: User
Tags config curl fpm ini openssl pear php cli openldap

Yum-y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-deve L zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel Curl Curl-devel ssse2fsprogs E2fsprogs-devel krb5 krb5-devel libidn libidn-devel OpenSSL openssl-devel openldap openldap-devel nss_ldap Openldap-clie NTS openldap-servers gettext-devel libxpm-devel libtool libevent libevent-devel gd-devel gd libmcrypt libmcrypt-devel PCR E Pcre-devel

[Root@lnmp software]# tar zxvf libiconv-1.14.tar.gz

[Root@lnmp software]# CD libiconv-1.14

[Root@lnmp libiconv-1.14]#./configure--prefix=/service/libiconv

[Root@lnmp libiconv-1.14]# make && make install

[Root@lnmp software]# tar zxvf gd-2.50.tar.gz

[Root@lnmp software]# CD GD-2.50

[Root@lnmp gd-2.50]# Perl makefile.pl

[Root@lnmp gd-2.50]# make && make install

installing MySQL

[Root@lnmp software]# tar zxvf mysql-5.5.34.tar.gz

[Root@lnmp software]# CD mysql-5.5.34

[Root@lnmp mysql-5.5.34]# Groupadd MySQL

[Root@lnmp mysql-5.5.34]# useradd-g mysql-s/sbin/nologin MySQL

[Root@lnmp mysql-5.5.34]# CMake. -dcmake_install_prefix=/service/mysql-dmysql_datadir=/data/mysql-dsysconfdir=/service/mysql-dmysql_unix_addr=/ Data/mysql/mysql.sock-dwith_innobase_storage_engine=1-dwith_federated_storage_engine=1-dwith_blackhole_storage _engine=1-dwith_example_storage_engine=1-dwith_partition_storage_engine=1-dwith_archive_storage_engine=1-dwith _myisam_storage_engine=1-dwith_perfschema_storage_engine=1-ddefault_charset=utf8-ddefault_collation=utf8_ general_ci-dwith_extra_charsets=all-dwith_readline=1-denabled_local_infile=1-dmysql_tcp_port=30307- Dcompilation_comment=zwc-dwith_debug=0

[Root@lnmp mysql-5.5.34]# make && make install

[ROOT@LNMP mysql-5.5.34]# CP support-files/my-large.cnf/service/mysql/my.cnf

[Root@lnmp mysql-5.5.34]# chown-r Mysql:mysql/data/mysql/service/mysql

[Root@lnmp mysql-5.5.34]#/service/mysql/bin/mysqld_safe--defaults-file=/service/mysql/my.cnf--basedir=/service/ MySQL--datadir=/data/mysql--user=mysql &

Mysqlnd,mysql not required for installation php,php5.5

[Root@lnmp software]# tar zxvf php-5.5.6.tar.gz

[Root@lnmp software]# CD php-5.5.6

[Root@lnmp php-5.5.6]# Groupadd Webroot

[Root@lnmp php-5.5.6]# useradd-g webroot-s/sbin/nologin Webroot

[Root@lnmp php-5.5.6]#./configure--prefix=/service/php--with-config-file-path=/service/php/etc--WITH-GD-- Enable-gd-native-ttf--enable-gd-jis-conv--with-jpeg-dir--with-png-dir--with-freetype-dir--with-mcrypt-- With-zlib-dir--with-xpm-dir--enable-xml--with-curl--with-zlib--enable-exif- With-libxml-dir--enable-mbstring--enable-sockets--enable-zip--enable-ftp--with-iconv-dir=/service/libiconv-- Disable-rpath--enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization--enable-mbregex-- ENABLE-FPM--with-fpm-user=webroot--with-fpm-group=webroot--with-pdo-mysql=mysqlnd--with-mysqli=mysqlnd-- With-mysql=mysqlnd--enable-dom--with-libdir=lib64

[Root@lnmp php-5.5.6]# make && make install

Installing Shared extensions:/service/php/lib/php/extensions/no-debug-non-zts-20121212/

Installing PHP CLI binary:/service/php/bin/

Installing PHP CLI man page:/service/php/php/man/man1/

Installing PHP FPM binary:/service/php/sbin/

Installing PHP FPM config:/service/php/etc/

Installing PHP FPM man page:/service/php/php/man/man8/

Installing PHP FPM Status page:/service/php/php/fpm/

Installing PHP CGI binary:/service/php/bin/

Installing PHP CGI man page:/service/php/php/man/man1/

Installing Build Environment:/service/php/lib/php/build/

Installing header files:/service/php/include/php/

Installing helper Programs:/service/php/bin/

Program:phpize

Program:php-config

Installing man pages:/service/php/php/man/man1/

Page:phpize.1

Page:php-config.1

Installing PEAR Environment:/service/php/lib/php/

[PEAR] archive_tar-installed:1.3.11

[PEAR] console_getopt-installed:1.3.1

Warning:pear/pear requires package "Pear/structures_graph" (recommended version 1.0.4)

Warning:pear/pear requires package "Pear/xml_util" (recommended version 1.2.1)

[PEAR] pear-installed:1.9.4

Wrote PEAR system config file at:/service/php/etc/pear.conf

You could want to add:/service/php/lib/php to your php.ini include_path

[PEAR] structures_graph-installed:1.0.4

[PEAR] xml_util-installed:1.2.1

/service/software/php-5.5.6/build/shtool install-c Ext/phar/phar.phar/service/php/bin

Ln-s-f/service/php/bin/phar.phar/service/php/bin/phar

Installing PDO headers:/service/php/include/php/ext/pdo/

[ROOT@LNMP php-5.5.6]# CP Php.ini-production/service/php/etc/php.ini

[Root@lnmp php-5.5.6]# cp/service/php/etc/php-fpm.conf.default/service/php/etc/php-fpm.conf

[Root@lnmp php-5.5.6]#/SERVICE/PHP/SBIN/PHP-FPM

[Root@lnmp php-5.5.6]# Netstat-lanp|grep PHP-FPM

TCP 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 5483/php-fpm.conf)

UNIX 3 [] STREAM CONNECTED 459737 5483/php-fpm.conf)

UNIX 3 [] STREAM CONNECTED 459736 5483/php-fpm.conf)

[Root@lnmp php-5.5.6]# ps-ef|grep PHP

Root 5483 1 0 23:19? 00:00:00 Php-fpm:master Process (/service/php/etc/php-fpm.conf)

Webroot 5484 5483 0 23:19? 00:00:00 Php-fpm:pool www

Webroot 5485 5483 0 23:19? 00:00:00 Php-fpm:pool www

Root 5497 24209 0 23:21 pts/0 00:00:00 grep php

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/PHP/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.