In recent years, the proportion of Linux in the server market has increased. In addition to the free and secure nature of Linux, the Linux application services have become increasingly abundant. Most common services have good solutions on Linux. For the most widely used Web Services on Intenet, Linux has a better performance. No one can tell the exact number of websites on the Internet, but among the many websites, PHP and jsp are used (the preferred choice for SUN Enterprise applications) developed websites undoubtedly occupy a large market share. The following describes how to set up a Web server that supports jsp (the preferred choice for SUN Enterprise Applications) + PHP + MySQL (the best combination of PHP and PHP) on Linux.
For Web Services, apache (the most popular WEB server platform on the Unix platform) is undoubtedly the first choice. MySQL (the best combination with PHP) is used for databases, which is sufficient for general applications. Of course, Oracle (large website database platform) and DB2 can also be installed in Linux, however, they are expensive. Jsp (the first choice for SUN Enterprise applications) and PHP are undoubtedly the most popular and widely used web development languages. All of these software can be found on the following websites:
Resin (a free JSP running platform): http://www.caucho.com/
JDK: http://java.sun.com/
Apache (the most popular WEB server platform for Unix): http://www.apache (the most popular WEB server platform for Unix). org
MySQL (best combination with PHP): http://www.MySQL (best combination with PHP). com
PHP: http://www.php.net
MM. MySQL (the best combination with PHP): http: // mmMySQL (the best combination with PHP) .sourceforge.net/
Download the corresponding software from the above website. The software downloaded by the author is as follows:
Mysql(and PHP combination of runtime -4.0.15.tar.gz
Apache(unixplatform's most popular webserver platform pai_1.3.28.tar.gz
Php-4.3.3.tar.gz
Resin(a free jsp -3.0.3.tar.gz
Mysql(and php ))-connector-java-3.1.0-alpha.tar.gz
J2sdk-1_4_2_01-linux-i586.bin
1. Install MySQL (the best combination with PHP)
The installation of MySQL (the best combination with PHP) is relatively simple, but the compilation process may be a bit long. The specific steps are as follows:
# Tar-xzpvf mysql()and php ))-4.0.15.tar.gz
# Adduser-s/bin/false MySQL (best combination with PHP)
#./Configure -- prefix =/usr/local/terry_yu/MySQL (the best combination with PHP) -- enable-validator
-- With-innodb -- with-charset = gb2312
# Make
# Make install
#/Usr/local/terry_yu/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP) _ install_db
# Chown-R root/usr/local/terry_yu/MySQL (best combination with PHP )/
# Chown-R MySQL (the best combination with PHP)/usr/local/terry_yu/MySQL (the best combination with PHP)/var
# Chgrp-R MySQL (the best combination with PHP)/usr/local/terry_yu/MySQL (the best combination with PHP )/
#/Usr/local/terry_yu/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP) _ install_db
Modify/etc/ld. so. conf and add the following line at the end:
/Usr/local/terry_yu/MySQL (the best combination with PHP)/lib
Run the following command:
# Ldconfig
Run the following command to start MySQL (the best combination of PHP and MySQL)
/Usr/local/terry_yu/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP) d_safe &
Run the following command to modify the root password of MySQL (the best combination of PHP and MySQL:
/Usr/local/terry_yu/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP) admin-uroot password abcdefg
Run the following command to access the command line of MySQL (the best combination of PHP and MySQL:
[Root @ terry root] #/usr/local/terry_yu/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP)-uroot-p
Enter password:
Welcome to the MySQL (the best combination with PHP) monitor. Commands end with; or g.
Your MySQL (best combination with PHP) connection id is 1 to server version: 4.0.15
Type help; or h for help. Type c to clear the buffer.
MySQL (best combination with PHP)> quit
Bye
The above information indicates that MySQL (the best combination with PHP) has been successfully run.
Ii. Install JDK
# Chmod 755 j2sdk-1_4_2_01-linux-i586.bin
#./J2sdk-1_4_2_01-linux-i586.bin
# Mv j2sdk1.4.2 _ 01 // usr/local/terry_yu/
# Cd/usr/local/terry_yu/
# Ln-s j2sdk1.4.2 _ 01/jdk
# Ln-s jdk/jre
# Vi/etc/profile
JAVA_HOME =/usr/local/terry_yu/jdk
Resin (a free JSP running platform) _ HOME =/usr/local/terry_yu/resin (a free JSP running platform)
CLASSPATH =. :.. /$ JAVA_HOME/lib: $ JAVA_HOME/jre/lib: $ resin (a free JSP running platform) _ HOME/lib:/usr/local/terry_yu/jdbc
PATH = $ PATH: $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin
Log out of the current logon environment and log on again. Then, the environment variable you just set will take effect. Then, run the following command to test it: