Dependent libraries:
sudo apt-get install autoconfsudo apt-get install libxml2-devsudo apt-get install bzip2sudo apt-get Install Libcurl3-opens Sl-devsudo apt-get Install libcurl4-gnutls-devsudo apt-get install libjpeg-devsudo apt-get Install Libpng-devsudo Apt-get Install libxpm-devsudo apt-get install libfreetype6-devsudo apt-get install libt1-devsudo apt-get Install Libmcry Pt-devsudo apt-get Install libmysql++-devsudo apt-get install libxslt1-dev sudo apt-get install Libbz2-dev
To start compiling the installation:
sudo./configure--prefix=/data/service/php53--with-mysql=mysqlnd--with-mysqli=mysqlnd--with-pdo-mysql=mysqlnd-- With-config-file-path=/data/service/php/etc--with-zlib--with-curl--with-curlwrappers--with-mcrypt--WITH-GD-- With-openssl--with-mhash--with-xmlrpc--with-jpeg-dir--with-png-dir--with-xpm-dir--with-freetype-dir-- With-zlib-dir--enable-shared--enable-fpm--enable-xml--disable-rpath--enable-safe-mode--enable-bcmath-- Enable-shmop--enable-sysvsem--enable-inline-optimization--enable-mbregex--enable-mbstring-- Enable-gd-native-ttf--enable-pcntl--enable-sockets--enable-zip--enable-soap # # ... Procedure omit sudo make && sudo make install
Recompile the installation of PHP, before compiling the installation, clear the following:
sudo make clean
View compilation configuration
/data/service/php55/bin/php-i |grep Configure
The configuration file can be copied to PHP in the extracted directory after a copy of the Php.ini-development
sudo cp Php.ini-development/data/service/php55/etc/php.ini
PHP.ini Related Configurations
Extension library extension = Memcache.soextension = Scws.soextension = Xapian.soextension = mongo.so time zone setting Date.timezone =PRC or 1, Use Date_default_timezone_set () to set Date_default_timezone_set (' PRC ') on the page header; East Eight time zone echo date (' y-m-d h:i:s '); 2, use Ini_set (' Date.timezone ', ' Asia/shanghai ') in the page header;
Php-fpm.conf need to turn on the relevant configuration of the PID
PID = Run/php-fpm.pid
Some PHP-related operational commands
SUDO/DATA/SERVICE/PHP55/SBIN/PHP-FPM start ps-ef|grep php view startup status sudo kill 877
About mounting
/bin/sh-c ' cd/data/service/php55;. /SBIN/PHP-FPM; ' /bin/sh-c ' mount-t cifs-o username=ubuntu,password=12345,gid=65534,uid=65534//192.168.1.25/papa/data/www-data/www '/bin/sh-c ' mount-t cifs-o username=ubuntu,password=12345,gid=65534,uid=65534//192.168.1.25/papa/home/xiao/work ' # Start Nginx/bin/sh-c ' Cd/data/service/nginx;. /sbin/nginx; ' #/bin/sh-c ' Cd/data/service/mysql;./bin/mysqld_safe--user=mysql & '/bin/sh-c ' cd/usr/local/mysql;./bin/mysqld_ Safe--user=mysql & ' exit 0
Install PHP under Ubuntu compilation