\section{PHP}php
若是編譯安裝PHP,能夠執行下面的命令:mysql
\begin{lstlisting}[language=bash]linux
$ cd ~/srcsql
$ wget wget http://hk2.php.net/distributions/php-5.6.11.tar.gzapi
$ tar zxvf php-5.6.11.tar.gzbash
$ cd php-5.6.11curl
$ ./configureui
checking for grep that handles long lines and -e... /usr/bin/grepthis
checking for egrep... /usr/bin/grep -Eurl
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for cc... cc
...
Generating files
configure: creating ./config.status
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
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/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
$ make
$ sudo make install
\end{lstlisting}
若是使用軟件包安裝PHP,則須要安裝相應的軟件包。
\begin{lstlisting}[language=bash]
$ sudo yum install php php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel
\end{lstlisting}