PHP assembly memo

Source: Internet
Author: User
PHP installation memo # Installationscript # Prepareforcompilationenvironmentyuminstall-ygroupinstallDevelopmentTools # Createabuilddirectorymkdir-poptinstallphp # Prepare PHP installation memo
#
# 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 index. php/" conf/httpd. conf
Sed-I-e "s/<\/Files> \ n \ NSetHandler application \/x-httpd-php \ n <\/FilesMatch>/"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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.