php 5.6原始碼安裝流程(CentOS 6.5)
安裝依賴包
[root@localhost install]# 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 gd gd2 gd-devel gd2-devel perl-CPAN pcre-devel
在官網下載php 5.6版本
解壓包
[root@localhost install]# tar xvfz php-5.6.30.tar.gz -C /usr/local/src
編譯安裝
[root@localhost install]# cd /usr/local/src
[root@localhost src]# ls
php-5.6.30
[root@localhost src]# cd php-5.6.30/
在下面的配置中,指定軟體安裝目錄為/usr/local/php,配置檔案安裝目錄為/etc/php
[root@localhost php-5.6.30]# ./configure --prefix=/usr/local/php --with-config-file-path=/etc/php --enable-fpm --enable-pcntl --enable-mysqlnd --enable-opcache --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --enable-zip --enable-ftp --enable-soap --enable-xml --enable-mbstring --disable-rpath --disable-debug --disable-fileinfo --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pcre-regex --with-iconv --with-zlib --with-gd --with-openssl --with-mhash --with-xmlrpc --with-curl --with-imap-ssl
Thank you for using PHP.
config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
[root@localhost php-5.6.30]# make
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
directorygraphiterator.inc
clicommand.inc
pharcommand.inc
directorytreeiterator.inc
invertedregexiterator.inc
phar.inc
Build complete.
Don't forget to run 'make test'.
[root@localhost php-5.6.30]# make install
Installing PHP CGI man page: /usr/local/php/php/man/man1/
Installing build environment: /usr/local/php/lib/php/build/
Installing header files: /usr/local/php/include/php/
Installing helper programs: /usr/local/php/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php/lib/php/
[PEAR] Archive_Tar - installed: 1.4.0
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util - installed: 1.3.0
[PEAR] PEAR - installed: 1.10.1
Wrote PEAR system config file at: /usr/local/php/etc/pear.conf
You may want to add: /usr/local/php/lib/php to your php.ini include_path
/usr/local/src/php-5.6.30/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin
ln -s -f phar.phar /usr/local/php/bin/phar
Installing PDO headers: /usr/local/php/include/php/ext/pdo/
檢視軟體安裝目錄中的內容
[root@localhost php-5.6.30]# ls /usr/local/php
bin etc include lib php sbin var
複製配置檔案模板到配置檔案目錄中
[root@localhost php-5.6.30]# cp php.ini-development /etc/php/php.ini
建立軟連線
ln -s /usr/local/php/bin/php /usr/bin/php
ln -s /usr/local/php/bin/phpize /usr/bin/phpize
ln -s /usr/local/php/sbin/php-fpm /usr/bin/php-fpm
檢視安裝的版本
[root@localhost ~]# /usr/local/php/bin/php --version
PHP 5.6.30 (cli) (built: Mar 4 2017 01:20:07)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
[root@localhost install]# 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 gd gd2 gd-devel gd2-devel perl-CPAN pcre-devel
在官網下載php 5.6版本
解壓包
[root@localhost install]# tar xvfz php-5.6.30.tar.gz -C /usr/local/src
編譯安裝
[root@localhost install]# cd /usr/local/src
[root@localhost src]# ls
php-5.6.30
[root@localhost src]# cd php-5.6.30/
在下面的配置中,指定軟體安裝目錄為/usr/local/php,配置檔案安裝目錄為/etc/php
[root@localhost php-5.6.30]# ./configure --prefix=/usr/local/php --with-config-file-path=/etc/php --enable-fpm --enable-pcntl --enable-mysqlnd --enable-opcache --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --enable-zip --enable-ftp --enable-soap --enable-xml --enable-mbstring --disable-rpath --disable-debug --disable-fileinfo --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pcre-regex --with-iconv --with-zlib --with-gd --with-openssl --with-mhash --with-xmlrpc --with-curl --with-imap-ssl
Thank you for using PHP.
config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
[root@localhost php-5.6.30]# make
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
directorygraphiterator.inc
clicommand.inc
pharcommand.inc
directorytreeiterator.inc
invertedregexiterator.inc
phar.inc
Build complete.
Don't forget to run 'make test'.
[root@localhost php-5.6.30]# make install
Installing PHP CGI man page: /usr/local/php/php/man/man1/
Installing build environment: /usr/local/php/lib/php/build/
Installing header files: /usr/local/php/include/php/
Installing helper programs: /usr/local/php/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php/lib/php/
[PEAR] Archive_Tar - installed: 1.4.0
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util - installed: 1.3.0
[PEAR] PEAR - installed: 1.10.1
Wrote PEAR system config file at: /usr/local/php/etc/pear.conf
You may want to add: /usr/local/php/lib/php to your php.ini include_path
/usr/local/src/php-5.6.30/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin
ln -s -f phar.phar /usr/local/php/bin/phar
Installing PDO headers: /usr/local/php/include/php/ext/pdo/
檢視軟體安裝目錄中的內容
[root@localhost php-5.6.30]# ls /usr/local/php
bin etc include lib php sbin var
複製配置檔案模板到配置檔案目錄中
[root@localhost php-5.6.30]# cp php.ini-development /etc/php/php.ini
建立軟連線
ln -s /usr/local/php/bin/php /usr/bin/php
ln -s /usr/local/php/bin/phpize /usr/bin/phpize
ln -s /usr/local/php/sbin/php-fpm /usr/bin/php-fpm
檢視安裝的版本
[root@localhost ~]# /usr/local/php/bin/php --version
PHP 5.6.30 (cli) (built: Mar 4 2017 01:20:07)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2134716/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS 6.5 原始碼編譯安裝 MySQL 5.5 5.6CentOS原始碼編譯MySql
- CentOS 6.5 php原始碼安裝1.0版CentOSPHP原始碼
- Mysql5.6 for Centos6.5原始碼編譯安裝MySqlCentOS原始碼編譯
- CentOS6.5php原始碼安裝1.0版CentOSPHP原始碼
- MariaDB 10.1原始碼安裝流程(CentOS 6.5)原始碼CentOS
- CentOS6.5上安裝MySQL5.6CentOSMySql
- CentOS 6.5 Xtrabackup 2.4.2安裝流程CentOS
- CentOS 6.5 MongoDB 3.2.6安裝流程CentOSMongoDB
- MySQL 5.6原始碼編譯安裝流程MySql原始碼編譯
- CentOS6.5下MySQL5.6的安裝CentOSMySql
- php5.6原始碼安裝過程PHP原始碼
- centos6.5安裝php5.6.0CentOSPHP
- CentOS 6.7下MySQL 5.6原始碼編譯安裝CentOSMySql原始碼編譯
- Linux CentOS6.5下編譯安裝MySQL 5.6LinuxCentOS編譯MySql
- CentOS 6.5安裝Oracle 11.2.0.4------CentOS 6.5安裝CentOSOracle
- CentOS-6.5-64bit 原始碼安裝mod_jkCentOS原始碼
- 4、CentOS6.5下安裝php5.3CentOSPHP
- CentOS6.x安裝php5.6.xCentOSPHP
- Centos下Yum安裝PHP5.5,5.6,7.0CentOSPHP
- centos 6.5 安裝chromeCentOSChrome
- CentOS 安裝 mysql 5.6CentOSMySql
- centos7原始碼安裝php7CentOS原始碼PHP
- php5.6原始碼安裝及php-fpm配置與nginx整合PHP原始碼Nginx
- PHP7 原始碼安裝 swoole 全流程PHP原始碼
- CentOS6.5安裝pipCentOS
- CentOS6.5 安裝opensslCentOS
- CentOS6.5安裝ScrapyCentOS
- CentOS 6.5 tree命令安裝CentOS
- Centos6.5 Docker安裝CentOSDocker
- centos6.5安裝gitCentOSGit
- CentOS6.5安裝MongoDBCentOSMongoDB
- CentOS 6.5安裝Nginx (一)CentOSNginx
- CentOS6.5安裝RHBaseCentOS
- CentOS6.5安裝RHiveCentOSHive
- CentOS 6.5 安裝影像介面CentOS
- CentOS6.3安裝lnmp(php5.4,mysql5.6)CentOSLNMPPHPMySql
- Centos原始碼安裝NginxCentOS原始碼Nginx
- CentOS 6.5/6.6 安裝mysql 5.7CentOSMySql