Original URL: Response Source code Because of this flexibility, you can specify the installation directory and configure parameters, or select and optimize features. Note: All packages are installed in the/data directory.
(1 ):
Install zlib
Tar zxvf zlib-1.2.3.tar.gz
CD zlib-1.2.3
./Configure -- prefix =/data/zlib
Make
Make install
Then add
/Data/zlib/lib
Save and run ldconfig-V
(2) MySQL installing.
# Groupadd MySQL
# Useradd-G MySQL
# Vi/home/MySQL/. bash_profile
Add
Export Path = $ path:/data/MySQL/bin
After saving, go to the directory where the installation package is located and install MySQL first.
Decompress:
Tar-zxvf mysql-5.0.45.tar.gz
CD mysql-5.0.45
Then configure Configure. In the past, I only developed the prefix and didn't set the font encoding. As a result, PHP later did not support Chinese character encoding, so I had to reinstall it.
You must note that this problem is discovered. If zlib has been installed, you can specify the zlib location for MySQL.
[Root @ cme_box mysql-5.0.45] #./configure -- prefix =/data/MySQL -- With-zlib-Dir =/data/zlib/ -- With-charset = utf8 -- With-extra-charsets = GBK, gb2312, utf8
Make
Make install
Similarly, add a row to/etc/lD. So. conf.
/Data/MySQL/lib/MySQL
Save and run ldconfig-V
#./Scripts/mysql_install_db
# Chown-r root/data/MySQL
# Chown-r MySQL/data/MySQL/var
# Chgrp-r MySQL/data/MySQL
# Cp support-files/my-medium.cnf/etc/My. CNF
#/Data/MySQL/bin/mysqld_safe &
And then set MySQL auto-start in init. d.
# Cp support-files/MySQL. Server/etc/init. d/MySQL
CD/etc/rc3.d
Ln-S ../init. d/MySQL s85mysql
Ln-S ../init. d/MySQL k85mysql
CD ../rc5.d/
Ln-S ../init. d/MySQL s85mysql
Ln-S ../init. d/MySQL k85mysql
CD ../init. d
Chmod 755 MySQL
Then reboot to check whether MySQL is started.
(3) install Apache
Tar-zxvf httpd-2.2.6.tar.gz
CD httpd-2.2.6
./Configure -- prefix =/data/httpd/-- enable-so -- enable-CGI -- With-z =/data/zlib
Make
Make install
CP/data/httpd/bin/apachectl/etc/init. d/httpd
CP: overwrite'/etc/init. d/httpd '? Y
CD/etc/rc3.d
Rm-fr k15httpd
CD/etc/rc5.d
Rm-fr k15httpd
CD/etc/rc3.d
Ln-S ../init. d/httpd K85httpd
Ln-S ../init. d/httpd S85httpd
CD/etc/rc5.d
Ln-S ../init. d/httpd K85httpd
Ln-S ../init. d/httpd S85httpd
Chmod 755/etc/init. d/httpd
(4) install the GD library
First, we need to install the support for various graphics libraries, including LibPNG, libjpeg, and TTF.
1) libpng
Tar-zxvf libpng-1.2.23.tar.gz
./Configure -- prefix =/data/libpng
Make
Make install
Then add the libpng path (/data/libpng/LIB) to/etc/lD. So. conf and execute ldconfig-V
See
/Data/libpng/lib:
Libpng. so.3-> LibPNG. so.3.23.0
Libpng12.so. 0-> libpng12.so. 0.23.0
This item. The installation is successful.
2) FreeType
Tar-zxvf freetype-2.1.10.tar.gz
CD freetype-2.1.10
./Configure -- prefix =/data/FreeType
Make
Make install
Then add the path of FreeType (/data/FreeType/LIB) to/etc/lD. So. conf and Run Command "ldconfig-V", we can get
The output
/Data/FreeType/lib:
Libfreetype. so.6-> libfreetype. so.6.3.8
3) JPEG
Tar-zxvf restart src.v6b.tar.gz
./Configure -- prefix =/data/JPEG -- enable-shared
Make
Make install
Tip:/usr/bin/install: cannot create regular file '/data/JPEG/include/jconfig. H': no such file or directory
Nnd, which was found on the cu. It was originally installed. Program You do not have permission to create your own directory under/data. You must manually create a directory.