Php environment configuration

Source: Internet
Author: User
Php environment configure http://hi.baidu.com/17ai2010/blog/item/a88aafc4900ca8c9d10060eb.html./configure--prefix=/usr/local/apache2--enable-module=so/etc/init.d#l 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
Add
AddType application/x-httpd-php. php

DirectoryIndex 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 is not bundled anymore!


1. check whether the mysql header is installed in the system.
Find/-name mysql. h
If yes. Specify -- with-mysql =/and the normal path.
If not. Please refer to the next step.

2. redhat installation
Rpm-ivh MySQL-devel-community-5.1.33-0.rhel5.i386.rpm

There is a line in the php configuration file -- with-mysql =/usr. Prompt during installation:
Configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore.

This is because the mysql header file is not installed during mysql installation, or the path is incorrectly specified, and php cannot find the mysql header file.

Solution.
1. check whether your system has installed the mysql header.
Find/-name mysql. h
If yes. Specify -- with-mysql =/and your normal path.
If not. Please refer to 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. add -- with-mysql =/usr to the configuration option of php in the last step!


. /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 does ubuntu uninstall mysql on a terminal?

Sudo apt-get purge mysql-client mysql-server or
Sudo aptitude remove mysql-server mysql-client
Which packages are available in Mysql,
1. if you install it from the source,
You can use dpkg-l mysql-server or
View dpkg-l mysql-client

. /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
Open configure directly, delete the line $ RM "$ Folder File", and run./configure again.



Apache:
If the RPM Package is used for 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 source code is used for installation, it is usually installed in the/usr/local/apache2 directory by default.


Php:
If the RPM Package is used for installation, the installation path should be in the/etc/directory.
Php configuration file:/etc/php. ini
If source code is used for installation, 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 the RPM Package is used for 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
The mysql data directory is in the/var/lib/mysql directory.
If source code is used for installation, 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 no.

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.