PHP装配备忘
程序员文章站
2022-04-18 10:50:24
...
PHP安装备忘
#
# Installation script
#
# Prepare for compilation environment
yum install -y groupinstall "Development Tools"
# Create a build directory
mkdir -p /opt/install/php
# Prepare for compilation source
cd /opt/install/php
curl -o php-5.4.3.tar.gz http://cn2.php.net/distributions/php-5.4.3.tar.gz
tar -zxvf php-5.4.3.tar.gz
# Install build dependencies
yum install -y libxml2-devel
# Create a User Group
# Compile and deploy
cd php-5.4.3
./configure \
--prefix=/opt/environment/php/5.4.3 \
--with-config-file-path=/opt/environment/php/5.4.3/etc \
--with-apxs2=/opt/server/web/httpd/bin/apxs \
--with-mysql=/opt/server/database/mysql \
--with-mysqli=/opt/server/database/mysql/bin/mysql_config \
--with-mysql-sock=/opt/server/database/mysql/tmp/mysql.sock \
--with-pdo-mysql=/opt/server/database/mysql
make
make install
# Postinstallation setup
cp php.ini-production /opt/environment/php/5.4.3/etc/php.ini
# Configuration
/opt/server/web/httpd
sed -i -e "s/DirectoryIndex index.html/DirectoryIndex index.html index.php/" conf/httpd.conf
sed -i -e "s//\n\n SetHandler application\/x-httpd-php\n/" conf/httpd.conf
cat >htdocs/index.php// Show all information, defaults to INFO_ALL
phpinfo();
?>
eof
/etc/init.d/httpd restart
# Additional
/etc/init.d/httpd start
/etc/init.d/httpd stop
#
# Installation script
#
# Prepare for compilation environment
yum install -y groupinstall "Development Tools"
# Create a build directory
mkdir -p /opt/install/php
# Prepare for compilation source
cd /opt/install/php
curl -o php-5.4.3.tar.gz http://cn2.php.net/distributions/php-5.4.3.tar.gz
tar -zxvf php-5.4.3.tar.gz
# Install build dependencies
yum install -y libxml2-devel
# Create a User Group
# Compile and deploy
cd php-5.4.3
./configure \
--prefix=/opt/environment/php/5.4.3 \
--with-config-file-path=/opt/environment/php/5.4.3/etc \
--with-apxs2=/opt/server/web/httpd/bin/apxs \
--with-mysql=/opt/server/database/mysql \
--with-mysqli=/opt/server/database/mysql/bin/mysql_config \
--with-mysql-sock=/opt/server/database/mysql/tmp/mysql.sock \
--with-pdo-mysql=/opt/server/database/mysql
make
make install
# Postinstallation setup
cp php.ini-production /opt/environment/php/5.4.3/etc/php.ini
# Configuration
/opt/server/web/httpd
sed -i -e "s/DirectoryIndex index.html/DirectoryIndex index.html index.php/" conf/httpd.conf
sed -i -e "s//\n
cat >htdocs/index.php// Show all information, defaults to INFO_ALL
phpinfo();
?>
eof
/etc/init.d/httpd restart
# Additional
/etc/init.d/httpd start
/etc/init.d/httpd stop
相关文章
相关视频
上一篇: php中url传递中文字符,特殊危险字符的解决方法_php技巧
下一篇: 新手如何学习php