Configuring the Remote server PHP environment-php

Source: Internet
Author: User
Configure the remote server PHP environment---PHP

1. Download Php:http://cn2.php.net/get/php-5.5.8.tar.gz/from/a/mirror

2. Installation

#./configure--disable-rpath--prefix=/usr/local/php5--with-mysql=/usr/local/mysql--withz Apxs2=/usr/local/apache /bin/apxs--with-mysql--disable-fileinfo#make#make Install

? 3. Configuration

?

?

?? Modifying the Apache configuration file

?

? (1) ServerName?? 192.168.0.205:80

? (2) Add AddType application/x-httpd-php. php

? ? (3) Find DirectoryIndex index.html add index.php Middle Plus, number

?

#cd/usr/local/apache/bin/#./apachectl Restart

?

4. Problems encountered and solutions

? (1) Make: * * * No targets specified and no makefile found. Stop.

?

1, wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz2., Tar zxvf ncurses-5.6.tar.gz3,./configure-prefix=/ Usr/local-with-shared-without-debug4, Make5, make install

?

? (2) Configure error Xml2-config not found. Please check your LIBXML2 installation

?

Check if the LIBXM package # RPM-QA |grep  is installed libxml2libxml2-2.6.26-2.1.12libxml2-python-2.6.26-2.1.12 Reinstall the LIBXML2 and libxml2-devel packages, Yum installs the new version will be prompted to update, Updates can be updated, do not skip the line. # yum Install libxml2# yum install libxml2-devel-y find Xml2-config file exists after installation # Find/-name "Xml2-config"/usr/bin/xml2-conf Ig

?? See also: http://blog.chinaunix.net/uid-26719405-id-3409842.html

? (3) Configure:error:Cannot find MySQL header files Under/usr/include/mysql.

?

#find/-name mysql.h  //Find out if there is #yum install mysql-devel* Note: After the installation is complete, add a/configure path after the.--with-mysql

?? See also: http://blog.csdn.net/sunnyzhangwenhan/article/details/8517463

?

(4) Virtual memory Exhausted:cannot Allocate memory

?

# dd If=/dev/zero of=/swap bs=1024 count=1mformat The swap file:# mkswap/swapenable the swap file:# swapon/swapenable SW AP on boot:# echo "/swap swap SW 0 0" >>/etc/fstab

?? (5) Make: * * [Ext/fileinfo/libmagic/apprentice.lo] Error 1

?? This is due to memory less than 1G. In./configure Plus options: –disable-fileinfo

?

?

?

?

?

?

  • 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.