PHP Environment equipped

Source: Internet
Author: User
PHP Environment Configuration
Http://hi.baidu.com/17ai2010/blog/item/a88aafc4900ca8c9d10060eb.html

./configure--prefix=/usr/local/apache2--enable-module=so

/etc/init.d# ln-s/usr/local/apache2/bin/apachectl apache2
/etc/rc2.d# ln-s/etc/init.d/apache2 S17apache


LoadModule Php5_module modules/libphp5.so

AddType application/x-compress
AddType application/x-gzip. gz. tgz
After it is added
AddType application/x-httpd-php. php

DirectoryIndex index.html Index.html.var index.php

CP Php.ini-dist/usr/local/lib/php.ini
/home/wyy/php-5.2.8# CP Php.ini-dist/usr/localb/php.ini

./configure--PREFIX=/USR/LOCAL/LIBXML2
Make
Make install

./configure--PREFIX=/USR/LOCAL/PHP5--with-apxs2=/usr/local/apache2/bin/apxs--with-libxml-dir=/usr/local/ Libxml2
Make
Make install

CP Php.ini-recommended/usr/local/php5/lib/php.ini

Vi/usr/local/apache2/conf/httpd.conf
AddType application/x-httpd-php. php


./configure--PREFIX=/USR/LOCAL/PHP5--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql=/usr/local/mysql-- With-mysqli=/usr/local/mysql/bin/mysql_config--WITH-LIBXML-DIR=/USR/LOCAL/LIBXML2--with-zlib



./configure
Make
sudo make install

Onfigure:error:Cannot find MySQL header files under/usr/local/src/mysql-5.1.14-beta-linux-i686-glibc23/include/.
Note that the MySQL client library isn't bundled anymore!


1. Check if the system has MySQL header installed
Find/-name Mysql.h
If there is. Please specify--with-mysql=/and normal path.
If not. Take a look at the next step.

2.redhat Installation
RPM-IVH mysql-devel-community-5.1.33-0.rhel5.i386.rpm

There is a line--with-mysql=/usr in the PHP configuration file. When installing the prompt:
Configure:error:Cannot find MySQL header files under Yes.
Note that the MySQL client library is not bundled anymore.

This is due to the installation of MySQL when the MySQL header file is not installed, or the path is not specified correctly, PHP can not find the header file caused by the error message.

Workaround.
1. Check if your system has the MySQL header installed
Find/-name Mysql.h
If there is. Please specify--with-mysql=/and your normal path.
If not. Take a look at the next step.

2.redhat Installation
RPM-IVH mysql-devel-4.1.12-1.i386.rpm

3.debian Installation
Apt-get Install Libmysqlclient15-dev

4. Last step PHP configuration option to add--WITH-MYSQL=/USR!


./configure--PREFIX=/USR/LOCAL/PHP5--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql=/usr/local/mysql-- With-mysqli=/usr/local/mysql/bin/mysql_config--with-zlib


Dpkg-i *.deb


How Ubuntu uninstalls MySQL at the terminal

sudo apt-get purge mysql-client mysql-server or
sudo aptitude remove Mysql-server mysql-client
What are the specific packages under MySQL,
1. If you are installing from the source,
Can be done by dpkg-l Mysql-server or
Dpkg-l mysql-client View

./configure--prefix=/usr/local/mysql--datadir=/usr/local/mysql/data1--sysconfdir=/etc--with-named-curses-libs= /usr/lib/libncursesw.so.5

/bin/rm:cannot remove ' Libtoolt ': No such file or directory solution
At this point directly open the Configure, the $RM "$cfgfile" that line to remove, re-run./configure is fine.



Apache:
If using RPM package installation, the installation path should be in the/ETC/HTTPD directory
Apache configuration file:/etc/httpd/conf/httpd.conf
Apache Module Path:/usr/sbin/apachectl
Web directory:/var/www/html
If the source code is installed, it is usually installed in the/usr/local/apache2 directory by default.


Php:
If using RPM package installation, the installation path should be in the/etc/directory
PHP configuration file:/etc/php.ini
If the source code is installed, it is usually installed in the/usr/local/lib directory by default.
PHP configuration file:/usr/local/lib/php.ini
or/usr/local/php/etc/php.ini


Mysql:
If using RPM package installation, the installation path should be in the/usr/share/mysql directory
Mysqldump File Location:/usr/bin/mysqldump
Mysqli configuration file:
/ETC/MY.CNF or/USR/SHARE/MYSQL/MY.CNF
MySQL Data directory under the/var/lib/mysql directory
If the source code is installed, it is usually installed in the/usr/local/mysql directory by default.

Http://hi.baidu.com/zvjq/blog/item/9cf74a9767f8d55fd0135ef2.html


Ftp://xmlsoft.org/libxml2


Service httpd Restart

/usr/local/apache/bin/apachectl-k start

/etc/init.d/apache2 stop


Netstat-ant

PS-EF |grep Process Name
Ps-aux |grep Process Name

Kill-9 Process Number
  • Related Article

    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.