1, Installation Preparation:
1) httpd-2.0.52.tar.gz
2) mysql-4.1.12.tar.gz
3) Libxml2-2.6.27.tar
4) Freetype-2.1.10.tar
5) Gd-2.0.33.tar
6) Jpegsrc.v6b.tar
7) Libpng-1.2.16.tar
8) Zlib-1.2.3.tar
9) freetds-0.64.tar.gz
) php-4.3.9.tar.gz
One) phpMyAdmin292.tar.gz
Zendoptimizer-3.2.6-linux-glibc21-i386.tar)
Establish User:soft in the system
# Groupadd Soft
# useradd-g Soft Soft
# passwd Soft
Copy the required files from the installation to the/home/soft
/////////////////////////////////////////////////////////////////////
2. Installing Apache
Establish User:apache in the system
# Groupadd Apache
# useradd-g apache-d/usr/local/apache Apache
# passwd Apache
Installation:
# Cd/home/soft
# tar ZXVF httpd-2.0.52.tar.gz
# CD httpd-2.0.52
#./configure--prefix=/usr/local/apache--datadir=/www--enable-mods=shared=all--enable-module=so--disable-info-- Enable-shared=max--enable-rule=shared_core
# make
# make Install
Configuration:
# vi/usr/local/apache/conf/httpd.conf
Change two lines:
User Nobody
Group #-1
For:
User Apache
Group Apache
Save exit
Change the Apache directory's owning
# Chown-r Apache.apache/usr/local/apache
# Vi/usr/local/apache/bin/apachectl
Add after line fourth
# chkconfig:2345 10 90
# description:activates/deactivates Apache Web Server
Save exit
Next, set the Apache self-boot and run level
# CD/ETC/RC.D/INIT.D
# Cp/usr/local/apache/bin/apachectl HTTPD
# chmod 755 httpd
# chkconfig--add httpd
# chkconfig--level 345 httpd on
# chkconfig--level 0126 httpd off
Start and close the httpd service
# service HTTPD Start/stop/restart
//////////////////////////////////////////////////////////////////////////////////////////
3. Install MySQL
Establish User:mysql in the system
# Groupadd MySQL
# useradd-g mysql-d/mysql MySQL
# passwd MySQL
Establishing the Mysql,data directory in the system
# Cd/mysql
# mkdir TMP
# Chown-r Mysql.mysql/mysql
# Chown-r Mysql.mysql/data
# Chmod-r 777/mysql
# Chmod-r 777/data
Installation:
# Cd/home/soft
# tar ZXVF mysql-5.0.22.tar.gz
# CD mysql-5.0.22
#./configure--prefix=/mysql--localstatedir=/data--with-client-ldflags=-all-static--with-mysqld-ldflags=- All-static--with-mysqld-user=mysql--enable-assembler--with-extra-charsets=all--with-unix-socket-path=/mysql/ Tmp/mysql.sock
# make
# make Install
The following configuration is used for the normal server
# CP SUPPORT-FILES/MY-HUGE.CNF/ETC/MY.CNF
If you are a large server, use the
# CP SUPPORT-FILES/MY-INNODB-HEAVY-4G.CNF/ETC/MY.CNF
Initialize the database:
# scripts/mysql_install_db--user=mysql
File Permissions Modification
# Chown-r Mysql.mysql/mysql
# Chown-r Mysql.mysql/data
# Chmod-r 777/mysql
# Chmod-r 777/data
Start the database
# Cd/mysql
# Share/mysql/mysql.server Start &
Modify the database root user password to ABCabc123
# bin/mysqladmin-u root password "ABCabc123;"
Next, set MySQL self-boot and run level
# CD/ETC/RC.D/INIT.D
# Cp/home/soft/mysql-5.0.22/support-files/mysql.server Mysqld
# chmod 755 mysqld
# chkconfig--add mysqld
# chkconfig--level 345 mysqld on
# chkconfig--level 0126 mysqld off
Start and close the Mysqld service
# service Mysqld Start/stop/restart
/////////////////////////////////////////////////////////////////////////////////////////////
4. Install GD Library
1). LIBXML2 installation (support XML)
# Cd/home/soft
# TAR-ZXVF Libxml2-2.6.27.tar.gz
# CD libxml2-2.6.27
#./configure--PREFIX=/USR/LOCAL/LIBXML2
# make
# make Install
2). zlib Installation
# Cd/home/soft
# TAR-ZXVF Zlib-1.2.3.tar.gz
# CD zlib-1.2.3
#./configure--prefix=/usr/local/zlib
# make
# make Install
3). Install Jpeg6
To create a directory:
# mkdir-p/usr/local/jpeg6
# mkdir-p/usr/local/jpeg6/bin
# mkdir-p/usr/local/jpeg6/lib
# mkdir-p/usr/local/jpeg6/include
# mkdir-p/usr/local/jpeg6/man
# mkdir-p/usr/local/jpeg6/man/man1
# Cd/home/soft
# TAR-ZVXF Jpegsrc.v6b.tar.gz
# CD JPEG-6B
#./configure--prefix=/usr/local/jpeg6/--enable-shared--enable-static
# make
# make Install
///////////////////////////////////////////////////////////////////////////////
4). Install libpng
# Cd/home/soft
# TAR-ZVXF Libpng-1.2.16.tar.gz
# CD libpng-1.2.16
#./configure
# make
# make Install
5). Install FreeType
# Cd/home/soft
# TAR-ZVXF Freetype-2.1.10.tar.gz
# CD freetype-2.1.10
# mkdir-p/usr/local/freetype
#./configure--prefix=/usr/local/freetype
# make
# make Install
6) Install GD Library
# Cd/home/soft
# TAR-ZVXF Gd-2.0.33.tar.gz
# mkdir-p/USR/LOCAL/GD
# CD gd-2.0.33
#./configure--prefix=/usr/local/gd--with-jpeg=/usr/local/jpeg6/--with-png--with-zlib--with-freetype=/usr/local /freetype/
# make
# make Install
5. Installation of the FreeTDS
Installation:
# Cd/home/soft
# tar ZXVF freetds-0.64.tar.gz
# CD freetds-0.64
#./configure--prefix=/usr/local/freetds--with-tdsver=8.0--enable-msdblib--enable-dbmfix--with-gnu-ld
# make
# make Install
/////////////////////////////////////////////////////////////////////////////////////////////
5. Install PHP
# Cd/home/soft
# tar ZXVF php-4.3.9.tar.gz
# CD php-4.3.9
#./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs--enable-sockets--with-mysql=/mysql- -with-mssql=/usr/local/freetds--with-gd=/usr/local/gd--with-jpeg-dir=/usr/local/jpeg6--with-freetype-dir=/usr/ Local/freetype--with-zlib--with-png--enable-gd-native-ttf--enable-magic-quotes--with-iconv--with-mbstring-- Enable-track-vars--enable-force-cgi-redirect--enable-calendar--with-gettext--with-gdbm--with-ttf-- With-extra-charsets_complex--with-msdblib--enable-module=dso--with-versioning--enable-libxml--enable-so
# make
# make Install
# CP Php.ini-dist/usr/local/php/lib/php.ini
6. Integrated configuration
Update the link library and add php recognition
# vi/etc/ld.so.conf
Add/mysql/lib/usr/local/php/modules/freetds/lib at the end
Save exit
# Ldconfig
Apache supports PHP
# vi/usr/local/apache/conf/httpd.conf
In
AddType application/x-compress. Z
AddType application/x-gzip. gz. tgz
Add the following:
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps
Adddefaultcharset UTF-8
Switch
Adddefaultcharset gb2312
Modify
<files ~ "^\.ht" >
Order Allow,deny
Deny from all
</Files>
For
<files ~ "^\.ht" >
Order Allow,deny
Allow from all
</Files>
In
DirectoryIndex index.html Index.html.var
After adding
index.php
For
DirectoryIndex index.html Index.html.var index.php
Save exit
Modify PHP configuration Parameters
# Vi/usr/local/php/lib/php.ini
Modify register_globals = on;
MAGIC_QUOTES_GPC = OFF;
Configuring the php.ini file to work
(1) Find Safe_mode = Off and change to Safe_mode=on
(2) Find Max_execution_time = 30, change to Max_execution_time = 600
(3) Find Max_input_time = 60, change to Max_input_time = 600
(4) Find Memory_limit = 8M, change to Memory_limit = 20M
(5) Find display_errors = On, change to display_errors = Off
(6) Find post_max_size = 8M, change to Post_max_size = 20M
(7) Find upload_max_filesize = 2M, change to upload_max_filesize = 20M
(8) Find Session.auto_start = 0, change to Session.auto_start = 1
Save and exit to complete the configuration of the php.ini file.
7, Installation Zendoptimizer
# Cd/home/soft
# tar XVF Zendoptimizer-3.2.6-linux-glibc21-i386.tar
# CD Zendoptimizer-3.2.6-linux-glibc21-i386
#./install.sh
(Note the directory of Apachectl and php.ini files)
lqqqqqqqqq Zend Optimizer 3.2.6 qqqqqqqqqqk
x x
x Enter the location of your php.ini file x
x x
X LQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQK x
x x/usr/local/php/lib x x
x MQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQJ X
Tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
x < OK > <Cancel> x
MQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQJ
8, install phpMyAdmin
# cd/home/soft
# tar-zxvf phpmyadmin-2.9.2.tar.gz
# cp-r phpmyadmin-2.9.2//www
Modify the configuration file phpmyadmin-2.8.1/libraries/config.default.php. Will:
$cfg [' Servers '] [$i] [' auth_type '] = ' config '; (71 lines)
cfg[' defaultconnectioncollation ' = ' utf8_unicode_ci '; (395 lines)
//$cfg [' Lang '] = ' en-iso-8859-1 '; (399 lines)
to:
$cfg [' Servers '] [$i] [' auth_type '] = ' http ';
//cfg[' defaultconnectioncollation '] = ' utf8_unicode_ci ';
$cfg [' Lang '] = ' zh-gb2312 '; The
modifies the configuration file phpmyadmin-2.8.1/libraries/select_lang.lib.php. Will:
$mysql _charset_map = Array ((362 rows)
' big5 ' = ' big5 ',
' cp-866 ' = ' cp866 ',
' euc-jp ' = ' ujis ', vi
' euc-kr ' + ' Euckr ',
' gb2312 ' = ' gb2312 '
instead:
$mysql _charset_map = Array (
' big5 ' = ' Big5 ', ' cp-866 ' = ' cp866 ',
' euc-jp ' = ' ujis ',
' euc-kr ' = ' euckr ',
' gb2312 ' = ' latin1 '