linux+php5.1.6+mysql5.0.2+apache2.0.55 Installation Configuration Instructions

Source: Internet
Author: User

linux+php5.1.6+mysql5.0.2+apache2.0.55 Installation Configuration instructions:
First, mysql5.0.2 installation configuration process and Description:
1, #tar-zvxf mysql-5.0.2-alpha.tar.gz
2. CD mysql5.0.2
3./configure--prefix=/usr/local/mysql--sysconfdir=/etc--localstatedir=/var/lib/mysql--WITH-CHARSET=GBK
#--prefix=/usr/local/mysql MySQL Installation target directory
#sysconfdir the path to the =/etc my.ini configuration file
#localstatedir the path of =/var/lib/mysql database storage
#--with-charset=gbk the default character set for the database (you must add this option if you need to support Chinese)
4. Make
5. Make install
6. Make Clean
Installation Complete ...
7. Initialize the database
Cd/usr/local/mysql/bin
./mysql_install_db
If the system does not have the MySQL user, it is best to do the following steps:
Useradd-m-o-r-d/var/lib/mysql-s/bin/bash-c "MySQL Server"-u MySQL
And then I started MySQL.
/usr/local/mysql/bin/mysqld_safe &
OK, first look at whether MySQL works
Mysql-uroot MySQL
If everything is OK, it means the database started successfully, congratulations ...
8. Finish the steps above and copy the script from your compiled directory to the past
(Mysql.server in the/usr/local/mysql/share/mysql/directory)
CP Support-files/mysql.server/etc/rc.d/init.d/mysqld
Chkconfig--add mysqld
You can use the following command to start/Stop the database later:
/etc/rc.d/init.d/mysqld start
/etc/rc.d/init.d/mysqld stop


Second, apache20.55 installation Configuration Description: (DSO dynamic compilation)
# TAR-ZVXF Httpd-2.0.55.tar.gz
# CD httpd-2.0.55
#./configure--prefix=/usr/local/apache2--enable-mods-shared=most--enable-so
# make
# make Install
# Make Clean
Apache2 installation is complete, you can start Apache to see if you can see the lovely feathers ...

Three, PHP5 installation configuration instructions:
In the process of installing PHP5, it is really twists, and later referred to the article on the Internet, loaded n more libraries to take care of, so this record is as follows
1, LIBXML2 installation
Source code: LIBXML2-2.6.26.TAR.GZ
Operation Instruction:
# TAR-ZXVF Libxml2-2.6.26.tar.gz
# CD libxml2-2.6.26
#./configure
# make
# make Install
# Make Clean

2, zlib installation
Source code: Zlib-1.2.3.tar.tar
Operation Instruction:
# TAR-ZXVF Zlib-1.2.3.tar.tar
# CD zlib-1.2.3
#./configure
# make
# make Install
# Make Clean

3, libpng installation
Source code: LIBPNG-1.2.12.TAR.GZ
Operation Instruction:
# TAR-ZXVF Libpng-1.2.12.tar.gz
# CD libpng-1.2.12
# CP SCRIPTS/MAKEFILE.STD Makefile
Edit makefile Change prefix to Prefix=/usr/local/libpng2
# make
# mkdir/usr/local/libpng2
# make Install
# Make Clean

4. JPEG Installation
Source code: Jpegsrc.v6b.tar.tar
Operation Instruction:
# TAR-ZXVF Jpegsrc.v6b.tar.tar
# CD JPEG-6B
#./configure--prefix=/usr/local/jpeg6--enable-shared
# make
# Mkdir/usr/local/jpeg6
# Mkdir/usr/local/jpeg6/include
# Mkdir/usr/local/jpeg6/lib
# Mkdir/usr/local/jpeg6/bin
# Mkdir/usr/local/jpeg6/man
# Mkdir/usr/local/jpeg6/man/man1
# Make Install-lib
# make Install
# Make Clean

5. GD Installation
Source code: GD-2.0.33.TAR.GZ
Operation Instruction:
# TAR-ZXVF Gd-2.0.33.tar.gz
# CD gd-2.0.33
#./configure--prefix=/usr/local/gd2--with-zlib--with-png=/usr/local/libpng2--with-jpeg=/usr/local/jpeg6
Edit Makefile 231 Row
Cppflags =-i/usr/local/jpeg6/include (this option may also be empty, just refer to the following modifications)
Switch
Cppflags =-i/usr/local/jpeg6/include-i/usr/local/libpng2/include
# make
# make Install
# Make Clean

6, Libiconv Installation
Source code: LIBICONV-1.9.2.TAR.GZ
Operation Instruction:
# TAR-ZXVF Libiconv-1.9.2.tar.gz
# CD libiconv-1.9.2
#./configure--prefix=/usr/local/libiconv
# make
# make Install
# Make Clean

Connect the iconv.h to the PHP installation source program (the PHP installation source must be the same as the iconv.h in the same disk directory, or link will be wrong), or PHP make will be wrong
# cd/usr/home/ty/php-5.1.6/ext/iconv/(This directory is the PHP installation source program directory)
#这里的php -5.1.6 is the path to the following decompression
# link/usr/local/libiconv/include/iconv.h Iconv.h

7. Start the installation of PHP5
Source code: PHP-5.1.6.TAR.GZ
Operation Instruction:
# TAR-ZXVF Php-5.1.6.tar.gz
# CD php-5.1.6
#./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache2/bin/apxs--with-xml--with-mysql=/usr/local/ MySQL--with-zlib--with-jpeg-dir=/usr/local/jpeg6--with-png-dir=/usr/local/libpng2--with-iconv=/usr/local/ Libiconv--with-config-file-path=/usr/local/lib--disable-debug--enable-safe-mode--enable-trans-sid-- Enable-memory-limit--enable-short-tags--disable-posix--enable-exif--enable-ftp--enable-sockets

# make
# make Install
# Make Clean
# Cp/usr/src/php-5.1.6/php.ini-dist/usr/local/lib/php.ini

PHP Installation Complete ...

8. Add PHP to Apache
Operation Instruction:
# vi/usr/local/apache2/conf/httpd.conf
(1) Add the following lines in the appropriate place of the httpd.conf file (if the configuration can already be added when installing PHP5, you do not need to add it again)
LoadModule Php5_module modules/libphp5.so
AddType application/x-httpd-php. php
Add index.php after DirectoryIndex index.html Index.html.var

Configuration complete ...

Iv. Testing
And put a info.php file on the test to see the success.

vi/usr/local/apache2/htdocs/test.php
Enter the following code to save.
<?
Phpinfo ();
?>
Then launch Apache, Access Http://your IP (or your website)/info.php
If you can see the information about PHP, congratulations, all your configuration is successful.


The above configuration, altogether spent I will be two days of time, finally successful, heartfelt thanks to the online free to provide help friends, in this record, hope to other people can also provide some help!

linux+php5.1.6+mysql5.0.2+apache2.0.55 Installation Configuration instructions (RPM)

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.