Compile and install PHP in Ubuntu
Let's stop talking about how to get the php source code and decompress it In Ubuntu.
The compilation parameters are:
. /Configure -- prefix =/opt/php -- with-bz2 -- with-mcrypt -- with-mhash -- with-openssl -- with-pdo-mysql -- with-pdo-pgsql -- with-mysqli -- with-pgsql -- enable-calendar -- with-gettext -- with-iconv -- enable-mbstring -- with-pspell -- enable-exif -- with-gd -- with-png-dir =/opt /php -- with-jpeg-dir =/opt/php -- with-imap -- enable-bcmath -- with-gmp -- enable-pcntl -- enable-sysvshm -- enable-shmop --- tidy -- with-curl -- enable-ftp -- with-ldap -- enable-sockets -- enable-fpm -- enable-soap -- with-xmlrpc -- enable-wddx -- with-xsl --- kerberos -- with-imap-ssl
The value of the -- prefix parameter specifies the php installation path. If this parameter is not specified, the php files will be scattered in various places after installation, which is not conducive to management, all PHP files stored in the specified path are stored in the specified path. All other parameters can be found in the php manual. You only need to view the required parameters by referring to the installation instructions for each extension in the function reference section. These parameters can be increased or decreased as needed. If you need to add an extension later, you only need to add new extension parameters to the original parameters and re-compile and install them (as long as the -- prefix parameter location remains unchanged, You can overwrite the previously installed php ).
After compilation, run the make command. After the make command is executed, run the sudo make install command to install it.
During the installation process, you may encounter various problems, such as missing dependency packages. The problems encountered during the installation process are as follows:
Configure: error: utf8_mime2text () has new signature, but U8T_CANONICAL is missing. this shoshould not happen. check config. log for additional information solution: apt-get install libc-client2007e-dev configure: error: Cannot find ldap libraries in/usr/lib. solution: ln-fs/usr/lib/x86_64-linux-gnu/libldap. so/usr/lib/configure: error: mcrypt. h not found. please reinstall libmcrypt. solution: sudo apt-get install Libmcrypt-dev CONFIGURE: ERROR: cannot find LIBPQ-FE.H. please specify correct postgresql installation path solution: sudo apt-get install postgresql-server-dev-9.5 configure: error: Cannot find pspell solution: sudo apt-get install libpspell-dev configure: error: cannot find libtidy solution: sudo apt-get install libtidy-dev configure: error: xslt-config not found. please reinstall the libxslt> = 1.1.0 distrib Ution solution: sudo apt-get install libxslt1-dev/usr/bin/ld: ext/ldap /. libs/ldap. o: undefined reference to symbol'ber _ strdup @ OPENLDAP_2.4_2 '// usr/lib/x86_64-linux-gnu/liblber-2.4.so.2: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusmake: *** [sapi/cli/php] Error 1 solution: Find the EXTRA_LIBS row (with many parameters) in vim Makefile in the PHP source code directory ), add '-llber' at the end of the row to save and exit make again. The above is only a part of the problems encountered, Because I encountered some problems during the installation is not recorded, so currently only these problems, the next installation will be added.
Deep understanding of ini configuration in PHP
Analyze the timeout mechanism of PHP scripts
Build a PHP development environment under Ubuntu 14.04 PDF
PHP 7 innovation and Performance Optimization
PHP 7, you deserve it
Experience PHP 7.0 on CentOS 7.x/Fedora 21
Install LNMP in CentOS 6.3 (PHP 5.4, MyySQL5.6)
Nginx startup failure occurs during LNMP deployment.
Ubuntu install Nginx php5-fpm MySQL (LNMP environment setup)
Detailed php hd scanning PDF + CD source code + full set of teaching videos
Configure the php lnmp development environment in CentOS 6
PHP details: click here
PHP: click here
This article permanently updates link: http://www.bkjia.com/Linux/2016-03/129153tm