3-php5.6 in LAMP Environment

Source: Internet
Author: User

3-php5.6 in LAMP Environment

# Because the installation of php requires the combination of apache and mysql, and there are many dependent libraries, many errors will occur during make, and it may take a lot of time # So the Integrated content will be introduced in the next article: including php connection mysql Web Testing, simple stress testing and so on #1. Download unzip php5.6cd/usr/local/srcwget http://mirrors.sohu.com/php/php-5.6.4.tar.gztar zxvf php-5.6.4.tar.gz #2. Due to copyright reasons, yum may lack libmcrypt, there are two solutions: Download source code compilation installation or install the yum third-party source # Here is an available third-party Source: # -- Centos5-32 bit: http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm# -- 64 bits: http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm# -- Centos6-32 bits: http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm# -- 64 bits: http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm-Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpmyum install-y libmcrypt-devel #3. install some required library files in advance yum install-y libxml2-devel jpeg-devel png-devel freetype-devel gd-devel openssl-devel bzip2-devel #4 ,. /config. /configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache2/bin/apxs -- with-config-file-path =/usr/local/php/ etc -- with-mysql =/usr/local/mysql -- with-libxml-dir -- with-gd -- with-jpeg-dir -- with-png-dir -- with-freetype-dir -- with-iconv-dir -- with-zlib-dir -- with-bz2 -- with-openssl -- with-mcrypt -- enable-soap -- enable-gd-native-ttf -- enable-mbstring -- enable -sockets -- enable-exif -- disable-ipv6 # -- with-apxs2 =/usr/local/apache2/bin/apxs automatically in the apache configuration file (httpd. conf): LoadModule php5_module modules/libphp5.so; of course, if you do not add this option, you can manually add it. # -- with-mysql =/usr/local/mysql: mysql installation path #5. make & make installmake & make install #6 if php is not loaded under/usr/local/php/etc. ini configuration file, you need to copy one from the installation package, the general choice of production version, development is the development version of cp/usr/local/src/php-5.3.28/php. ini-production/usr/local/php/etc/php. ini #7. restart Apacheapachectl restart #8. Common options for php commands: -- help to view help information-m to list compiled modules-I to view php information, that is, phpinfo () the content displayed by the function. For example, to view the compilation details: php-I | grep -- color "Configure Command" #9. Set php. timezone of ini, otherwise there will be a warning (SEE)


Warning chart:

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.