Redhat linux under Tomcat5.0.28 + apache2.0.50 + php4.3.9 installation configuration [original]

xiaoxiao2021-03-06  43

Author: Echo.Guo@LoveUnix.net required software: httpd-2.0.50.tar.gzj2sdk-1_4_2_05-linux-i586-rpm.binjakarta-tomcat-5.0.28.tar.gzphp-4.3.9.tar.gzmysql -standard-4.0.21-pc-linux-i686.tar.gz pre-put in / usr / local /

Purpose: A web service supports PHP and JSP pages

1. Install JDK # chmod 755 J2SDK-1_4_2_05-Linux-i586-rpm.bin #. / J2SDK-1_4_2_05-Linux-I586-RPM.bin generated J2SDK-1_4_2_05-linux-i586.rpm # rpm -iv j2sdk-1_4_2_05- Linux-i586.rpm is installed by default in /usr/j2sdk1.4.2.05

2. Install Tomcat

Tar -zxf jakarta-tomcat-5.0.28.tar.gzln -s /usr/local/jakarta-tomcat-5.0.28 / usr / local / tomcatless /usr/local/tomcat/conf/server.xml proxy port 8082 < ! - Define a proxied http / 1.1 Connector on Port 8082 ->

/usr/local/tomcat/conf/server.xml modification

/us/local/tomcat/bin/startup.sh Add

export JAVA_HOME = / usr / javaexport CATALINA_BASE = / usr / local / tomcatexport CATALINA_HOME = / usr / local / tomcatexport CLASSPATH = $ JAVA_HOME / lib: $ JAVA_HOME / jre / libexport PATH = $ JAVA_HOME / lib: $ JAVA_HOME / jre / bin: $ PATH: $ HOME / BIN

Then ./startup.sh boot Tomcat

3. Install Apachetar XVFZ httpd-2.0.47.tar.gz ./configure --enable-proxy = shared --enable-proxy_http = shared> --prefix = / usr / local / apache --enable-somakemake install

Modify httpd.conf

Add ProxyPass / JSP / http: // (Tomcat IP): 8082 / JSP / HTTP: // (Tomcat IP): 8082 / JSP /

4. Install PHP

TAR XVFZ PHP-4.3.4.TAR.GZ CD PHP-4.3.4 ./configure --with-mysql = / usr / local / mysql --with-apxs2 = / usr / local / apache / bin / apxs - Enable-track-vars --with-gd --with-zlib --with-xml make make install cp php.ini-dist /usr/local/lib/php.ini

Note: Errors may have an error in configure, BSION and FLEX download a RPM package can be rpm -ivh bison-1.35-1.i386.rpmrpm -ivh flex-2.5.4a-29.i386.rpm

5. Configure httpd.conf to join a line addType application / x-httpd-php .php in AddType

Note: LoadModule PHP4_Module Modules / libphp4.so, don't handle, otherwise it will be wrong

Then follow the Apache / USR / local / apache / bin / apachectl restart

Can test it

Place a .jsp file in a JSP directory in Tomcat's WebApps.

Add a Test.php content in apache's HTDOCS:

6. Install MySQL

TAR XVFZ mysql-standard-4.0.21-pc-linux-i686.tar.gz After mysql-standard-4.0.21-pc-linux-i686 # ln-linux-i686 # ln -s /usr/local/mysql-standard-4.0.21 -pc-linux-i686 / usr / local / mysql

OK

Left configuration: Go to MySQL's suport-files directory, just pick a .cnf file #cp my-medium.cnf /etc/my.cnf modified /etc/my.cnf, directly to MySQLD

# The MySQL server [mysqld] port = 3306socket = /var/lib/mysql/mysql.sockskip-lockingset-variable = thread_stack = 1Mset-variable = key_buffer = 256Mset-variable = max_allowed_packet = 10Mset-variable = table_cache = 256set-variable = sort_buffer = 10Mset-variable = record_buffer = 10Mset-variable = myisam_sort_buffer_size = 64Mset-variable = thread_cache = 18 # Try number of CPU's * 2 for thread_concurrencyset-variable = thread_concurrency = 8log-binserver-id = 1 #. / scripts / mysql_install_db you Two directory Mysql and Test were added to the database directory. Then start: #. / Bin / safe_mysqld &

转载请注明原文地址:https://www.9cbs.com/read-114017.html

New Post(0)