(i) Ubuntu 12.04 installation php5.5

Source: Internet
Author: User

1. Create user

/usr/sbin/groupadd www

/usr/sbin/useradd-r Www-g www

2. Install dependent packages

Apt-get install-y make gcc g++ curl libxml2 libxml2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev Libpng12-dev bzip2 li Bbz2-dev Libxpm-dev Libfreetype6-dev Libedit-dev Libxslt-dev


Tar zxvf libmcrypt-2.5.8.tar.gz-c/home/tbt/src/

cd/home/tbt/src/libmcrypt-2.5.8/

/sbin/ldconfig

CD libltdl/

./configure--enable-ltdl-install

Make && make install

Cd..

./configure

Make && make install


Tar zxvf libiconv-1.14.tar.gz-c/home/tbt/src/

cd/home/tbt/src/libiconv-1.14

Sed-i-E '/gets is a security/d './srclib/stdio.in.h

./configure--prefix=/usr/local

Make && make install


3. Compile and install PHP

Tar zxvf php-5.5.14.tar.gz-c/home/tbt/src/

cd/home/tbt/src/php-5.5.14

./configure--prefix=/home/tbt/php \

--with-mysql=/home/tbt/mysql \

--with-mysqli=/home/tbt/mysql/bin/mysql_config \

--with-pdo-mysql=/home/tbt/mysql \

--ENABLE-FPM \

--WITH-FPM-USER=WWW \

--WITH-FPM-GROUP=WWW \

--with-curl \

--with-pear \

--WITH-GD \

--with-jpeg-dir \

--with-png-dir \

--with-zlib \

--with-xpm-dir \

--with-freetype-dir \

--with-mcrypt \

--with-mhash \

--WITH-OPENSSL \

--WITH-XMLRPC \

--with-xsl \

--WITH-BZ2 \

--with-gettext \

--disable-debug \

--ENABLE-EXIF \

--ENABLE-WDDX \

--enable-zip \

--enable-bcmath \

--enable-calendar \

--ENABLE-FTP \

--enable-mbstring \

--ENABLE-SOAP \

--enable-sockets \

--ENABLE-SHMOP \

--ENABLE-DBA \

--enable-sysvsem \

--ENABLE-SYSVSHM \

--ENABLE-SYSVMSG \

--ENABLE-PCNTL \

--with-libedit \

--with-readline

Make zend_extra_libs= '-liconv '

Make install

Note: If MySQL is not on the same server as PHP, you will need to modify the MySQL parameters as follows         

--with-mysql \

--WITH-MYSQLI \

--with-pdo-mysql \


4. Modify the configuration file and start PHP

CP Php.ini-production/home/tbt/php/lib/php.ini

cd/home/tbt/php/etc/

CP Php-fpm.conf.default php-fpm.conf

Cd..

Sed-i ' s/^;d ate.timezone =/date.timezone = prc/'/home/tbt/php/lib/php.ini

Chown-r www:www/home/tbt/php

CP Php.ini-production/home/tbt/php/lib/php.ini

cd/home/tbt/php/etc/

CP Php-fpm.conf.default php-fpm.conf

Cd..

Sed-i ' s/^;d ate.timezone =/date.timezone = prc/'/home/tbt/php/lib/php.ini

Chown-r www:www/home/tbt/php

/home/tbt/php/sbin/php-fpm

This article is from the "star of the War" blog, please be sure to keep this source http://5430078.blog.51cto.com/5420078/1559410

(i) Ubuntu 12.04 installation php5.5

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.