Install PHP (php-5.1.6.tar.bz2)
CP Php-5.1.6.tar.bz2/home
Cd/home
tar jxf php-5.1.6.tar.bz2
CD php-5.1.6
./configure--with-apxs2=/usr/local/apache/bin/apxs--disable-debug--enable-safe-mode--enable-trans-sid--wi Th-xml--with-mysql--enable-short-tags--with-gd--with-zlib--with-jpeg--with-png--enable-memory-limit-- Disable-posix--with-config-file-path=/usr/local/lib
1, solve Configure:error:libpng. ( A|SO) not found.
# ln-s/usr/lib64/libjpeg.so/usr/lib/# ln-s/usr/lib64/libpng.so/usr/lib/
2. Error description
The following error occurred during the./configure Step when PHP was installed on the CENTOS64 bit version
Configure:error:Cannot Find Libmysqlclient under/usr.
Note that the MySQL client library isn't bundled anymore!
Cause analysis and solution
By looking for libmysqlclient, found to be in the/usr/lib64/mysql/directory libmysqlclient.so.15.0.0 do the soft connection, PHP default is to go to the/usr/lib/search, so did not find.
The solution is:
cp/usr/lib64/mysql/*/usr/lib/mysql/
Then proceed to./configure, if the server does not have a/usr/lib/mysql/directory, create a MySQL directory in the/usr/lib/directory
Description:
--WITH-APXS2=/USR/LOCAL/APACHE/BIN/APXS \ This is the location to join Apache for the DSO module
--disable-debug \ #关闭php内部调试
--enable-safe-mode \ #打开php的安全模式
--enable-trans-sid \
--with-xml \ #支持xml
--with-mysql \ #支持mysql
--enable-short-tags \ #支持PHP的短标记
--with-gd \ #支持GD库
--with-zlib \ #支持zlib
--with-jpeg \
--with-png \
--enable-memory-limit \
--disable-posix \
--with-config-file-path=/usr/local/lib
anyway, copy and paste is fine,-_-.
Make
Make Install
cp php.ini-dist/usr/local/lib/php/php.ini Copy PHP configuration file
cd/usr/local/lib/php/
vi php.ini modifying configuration files
register_globals = on generally 399 rows
Save Exit
This article is from the "Welcome" blog, make sure to keep this source http://wjpingok.blog.51cto.com/5374697/1737118
PHP Installation Tutorials