In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the process of installing php5.6 in source code". In daily operation, I believe that many people have doubts about the process of installing php5.6 in source code. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "the process of installing php5.6 in source code". Next, please follow the editor to study!
Install dependency packages
[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
Download php version 5.6 on the official website.
Http://php.net/
Decompression package
[root@localhost install] # tar xvfz php-5.6.30.tar.gz-C / usr/local/src
Compilation and installation
[root@localhost install] # cd / usr/local/src
[root@localhost src] # ls
Php-5.6.30
[root@localhost src] # cd php-5.6.30/
In the following configuration, specify the software installation directory as / usr/local/php and the configuration file installation directory as / 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/
View the contents of the software installation directory
[root@localhost php-5.6.30] # ls / usr/local/php
Bin etc include lib php sbin var
Copy the profile template to the profile directory
[root@localhost php-5.6.30] # cp php.ini-development / etc/php/php.ini
Create a soft connection
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
View the installed version
[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
At this point, the study of "the process of installing php5.6 with source code" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.