安装PHP指令

it2024-11-28  15

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-libxml2=/usr/local/libxml2 --with-mysqli=mysqlnd

rz -y 

rm -f /usr/local/apache/conf/httpd.conf

/usr/local/apache/bin/apachectl start 

chmod

./configure --prefix=/usr/local/mysqli --with-php-config=/usr/local/php/bin/php-config

./configure --prefix=/usr/local/php/bin/zip-1.14.0 --with-php-config=/usr/local/php/bin/php-config

/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ /usr/local/php/lib/php/extensions/no-debug-zts-20131226/

./configure --with-php-config=/usr/local/php/bin/php-config

远程站点地址 /usr/local/apache/htdocs

cd /app/soft/php-5.6.13/ext/mysqli

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --with-libxml2=/usr/local/libxml2 --with-mysqli=mysqlnd ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --with-mysqli=mysqlnd

cp /app/soft/php-5.6.13/php.ini-development  /usr/local/php/lib/php.ini

/usr/local/php/bin/phpize

ln -s /app/soft/php-5.6.13/ext/  /app/soft/php-5.6.13/ext/mysqli

cd /usr/local/php/lib/php/extensions/no-debug-zts-20131226

cd /usr/local/php/lib/

sz php.ini

find / -name 'php.ini'

ps -ef|grep httpd

./apachectl -k restart

cd /usr/local/httpd/conf

sz httpd.conf

rm -f httpd.conf

cd /usr/local/httpd/htdocs

rm -f index.php

sz webmainConfig.php

rm -f webmainConfig.php

chmod 755 webmainConfig.php

/usr/local/httpd/bin/apachectl restart

mysql -h100.86.171.133 -uccrm -pu9545gkwld7n

安装php gd库 (文章链接https://www.cnblogs.com/guiyishanren/p/11101839.html) yum install php-gd

#找到gd库安装目录,ext/gd什么的 find / -name gd    

cd /app/soft/php-5.6.13/ext/gd

执行phpize /usr/local/php/bin/phpize

执行configure ./configure --with-png-dir --with-freetype-dir --with-jpeg-dir --with-gd --with-php-config=/usr/local/php/bin/php-config

如果报configure: error: jpeglib.h not found.  那么需要安装jpeglib

yum -y install libjpeg-devel

如果报configure: error: png.h not found.  那么需要安装pnglib yum  install libpng  libpng-devel

如果报configure: error: freetype-config not found.  那么需要安装pnglib yum install freetype*  

最新回复(0)