PHP装配备忘

WBOY
풀어 주다: 2016-06-13 13:25:13
원래의
734명이 탐색했습니다.

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

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!