Download File: http://java.sun.com J2SDK-1_4_2_06-Linux-i586-rpm.binhttp: //www.apache.org jakarta-tomcat-5.1.20.tar.gz http: //www.openssl. ORG / OPENSSL-0.9.7d.tar.gz http://www.info-zip.org/pub/infozip/zlib/ Zlib-1.1.3.tar.gzhttp://www.libpng.org/pub/png / Libpng-1.0.10.tar.gz http://www.ijg.org/ jpegsrc.v6b.tar.gz http://www.freetype.org/ freetype-2.0.1.tar.gzhttp: // www .boutell.com / gd / gd 2.0.15.tar.gzhttp://www.apache.org httpd-2.0.52.tar.gzhttp: //www.php.net php-4.3.9.tar.gzhttp: //www.zend.com Zendoptimizer-2.5.3-Linux-glibc21-i386.tar.gz1, installation J2SDK [root @ localhost] CHMOD 711 J2SDK-1_4_2_01-Linux-i586-rpm.bin
[root @ localhost] ./j2sdk-1_4_2_01-linux-i586-rpm.bin [root @ localhost] rpm -ivh j2sdk-1_4_2_01-linux-i586-rpm
After execution, a copyright statement of a few pages will appear. The JDK after the installation of YES will be stored in the /usr/java/j2sdk1.4.2_01 directory (different version of the JDK directory name will be different, such as / usr / java / j2sdk1. x.y_zz).
Be a symbolic connection: [root @ localhost] ln -s /usr/java/j2sdk1.4.2_01 / usr / java / jdk
Set environment variables:
Write to / etc / profile. That will load the JDK when the system starts.
[root @ localhost] Vi Profile
Export java_home = "/ usr / java / jdk"
Export Path = "$ PATH: $ java_home / bin: $ java_home / jre / bin"
Export ClassPath = "$ java_home / lib: $ java_home / jre / lib"
2, install Tomcat because I downloaded the Binary version, so I don't need to compile again. [root @ localhost] cp /download/jakarta-tomcat-5.1.20.tar.gz / usr / local [root @ localhost] tar zxvf jakarta-tomcat-5.1.20.tar.gz [root @ localhost] RM -F Jakarta-tomcat-5.1.20.tar.gz [root @ localhost] ln -s jakarta-tomcat-5.1.20 Tomcat5 [root @ localhost] cd tomcat5 [root @ localhost] cp common / lib / servlet-api.jar / USR / JAVA / JDK / JRE / LIB / EXT / / Add Environment Variables to extract the servlet package to the jre LIB EXT Add Environment Variables: [Root @ localhost] vi / etc / profileexport catalina_home = "/ usr / local / tomcat5"
You can test whether Tomcat is started normally: [root @ localhost] CD / usr / local / tomcat5 [root @ localhost] bin / startup.sh you will see these state: use cataalina_base: / usr / local / tomcat using catalina_home : / usr / local / tomcat using catalina_tmpdir: / usr / local / Tomcat / Temp Using java_home: / usr / java / jdk
Then open the browser, enter http: // localhost: 8080, if you can see a metamorphosis kitte looks at you, congratulations, Tomcat has become.
3, install OpenSSL [root @ localhost] tar -zxvf openssl-0.9.7d.tar.gz [root @ localhost] cd openssl-0.9.7d [root @ localhost] ./config --prefix = / usr / local / openssl # Set the installation path [root @ localhost] make test [root @ localhost] make INSTALL 4, install GD allows the system to support GD A, install zlib-1.1.3.tar.gz [root @ localhost] tar ZXVF ZLIB-1.1.3.Tar.gz [root @ localhost] cd zlib-1.1.3 [root @ localhost] ./configure [root @ localhost] make [root @ localhost] make test [root @ localhost] make install B , Install libpng-1.0.10.tar.gz [root @ localhost] tar zxvf libpng-1.0.10.tar.gz [root @ localhost] cd libpng-1.0.10 [root @ localhost] CP scripts / makefile.linux makefile [root @ localhost] vi makefile modified these parameters zliblib = / usr / local / lib zlibinc = / usr / local / include [root @ localhost] make test [root @ localhost] make install C, install jpegsrc.v6b.tar.gz [root @ localhost] TAR ZXVF JPEGSRC.V6B.TAR.GZ [root @ localhost] CD JPEG-6B [root @ localhost] ./configure [root @ localhost] make [root @ localhost] make test [root @ l Ocalhost] make install [root @ localhost] make install-lib d, install freetype-2.0.1.tar.gz [root @ localhost] tar zxvf freetype-2.0.1.tar.gz [root @ localhost] CD Freetype-2.0 .1 [root @ localhost] make setup [root @ localhost] make [root @ localhost] make install e, finally installed GD [root @ localhost] tar zxvf gd 2.0.15.tar.gz [root @ localhost] CD GD 2.0 .15 [root @ localhost] ./configure after the configuration is completed,
Note whether the output is as follows: ** Configuration summary for GD 2.0.15: Support for PNG Library: Yes Support for JPEG LIBRARY: YES Support for FreeType 2.x Library: Yes Support for XPM Library: NO XPM library installed before installation If the program department is not used, the general PNG / JPEG / FREETYPE three libraries open support [root @ localhost] make install [root @ localhost] cp gd.h / usr / local / lib // When compiling PHP, it will miss this file error 5. Install apache2 [root @ localhost] tar zxvf httpd-2.0.52.tar.gz [root @ localhost] cd httpd-2.0.52 [root @ localhost] ./ Configure - Prefix = / usr / local / apache --enable-so --enable-shutrite [root @ localhost] make [root @ localhost] make install installation success 6, install php4 [root @ localhost] TAR ZXVF PHP-4.3.9. Tar.gz [root @ localhost] CD PHP-4.3.9 [root @ localhost] ./ Configure --prefix = / usr / local / php --with-apxs2 = / usr / local / apache / bin / apxs - WITH-JPEG-DIR = / usr / local / lib --with-png-dir = / usr / local / lib --with-gd = / usr / local / lib --with-zlib-dir = / usr / local / lib --with-mysql = / usr / local / mysql --enable-sysvmsg --enable-trace-vars --enable-sockets --enable-sys vShm --enable-sysvsem --with-iconv [root @ localhost] make [root @ localhost] make install [root @ localhost] cp php.ini-dist /usr/local/lib/php.ini / / Otherwise unable to start [root @ localhost] vi /usr/local/lib/php.ini; intencefault_charset = "ISO-8859-1" Add a line below DEFAULT_CHARSET = "GB2312" to change register_globals = OFF to register_globals = ON ---- -------------------------------------------------- --- max_execution_time = 600; maximum run time 600 seconds max_input_time = 600; the maximum output of 600 seconds memory_limit = 20M; maximum memory limit 20Mfile_uploads = on; a file upload upload_max_filesize = 20M; maximum file size 20Mpost_max_size = 20M;