Java Operation Environment: J2SDK-1_4_2_05 Database Server: MySQL-4.0.20D Web Server: Tomcat5.0.27 JDBC Driver: MySQL-Connector-Java-3.0.14-Production-Bin.jar 1, build Java's operating environment (1) To Sun Company Download J2SDK-1_4_2_05-Linux-i586-rpm.bin (2) Change the file to executable: [root @ eframe62 tuzq] # chmod x j2sdk-1_4_2_05-linux-i586-rpm.bin (3) Perform self-extracting file: [root @ eframe62 tuzq] # ./j2sdk-1_4_2_05-linux-i586-rpm.bin (4) decompression generation RPM file J2SDK-1_4_2_05-Linux-i586-rpm, install RPM: [root @ eframe62 Tuzq] # rpm -ivh j2sdk-1_4_2_05-linux-i586-rpm (5) file is installed in the /usr/java/j2sdk1.4.2_05 directory, in order to facilitate a simple connection to the / usr directory: [root @ EFRAME62 USR] # ln -s /usr/java/j2sdk1.4.2_05 JDK (6) Add Environment Variable: [Root @ Eframe62 USR] # EXPORT JAVA_HOME = / usr / jdk [root @ eframe62 usr] # @ export classpath = $ java_home / LIB: $ java_home / jre / lib :. [root @ eframe62 usr] # export path = $ PATH: $ java_home / bin: $ java_home / jre / bin (7) Test Java Run Environment: Write a Java program to verify [ Root @ eframe62 usr] # vi helloworld.java Enter the following: public class helloworld {public static void main (string args []) {system.out.println ("Hello, Wrold";}}} writing and exiting the editor ::: Wq [root @ eframe62 usr] # javac helloworld.java (no error ) [Root @ eframe62 usr] # Java HelloWorld Hello, World This is a Java running environment. 2. Install the MySQL Database MYSQL Database Server can be downloaded to www.mysql.com.
One is a binary version (compiled) mysql-standard-4.0.20-pc-linux-i686.tar.gz, installed as follows: (1) Increasing the user and group named mysql: [root @ eframe62 root] # GroupAdd MySQL [root @ eframe62 root] # UserAdd -g mysql mysql (2) Unzip file to / usr / local directory: [root @ eframe62 root] # CD / usr / local [root @ eframe62 local] # Gunzip Home / tuzq / mysql-standard-4.0.20-pc-linux-i686.tar.gz | TAR XVF - (3) Create a convenient connection: [root @ eframe62 local] # ln -s / usr / local / MySQL-Standard-4.0.20-PC-Linux-i686 MySQL (4) Execute the mysql_install_db script, initialize the database (create system database and table): [root @ eframe62 local] # cd mysql [root @ eframe62 mysql] # scripts / mysql_install_db --user = mysql If there is a lower error, coupled --force parameters: neither host 'could not be looked up with ./bin/resolveip (5) Modify the owner: [root @ eframe62 mysql ] # Chown -r root. [Root @ eframe62 mysql] # chown -r mysql data [root @ eframe62 mysql] # chgrp -r mysql. (6) Start database server: [root @ eframe62 mysql] # bin / mysqld_safe - User = mysql & another is RPM version, including: mysql-server-4.0.20-0.i386.rpm (server) and mysql-client-4.0.20-0.i386.rpm (client program). Execute the following command installation, automatically perform the above operation, start the server: rpm -ivh mysql-server-4.0.20-0.i386.rpm rpm -ivh mysql-client-4.0.20-0.i386.rpm : RPM version of MySQL installation directory is different, there is some directory: l / usr / bin: customer program and scripting l / usr / sbin: mysqld service L / var / lib / mysql: log file and database if You cannot start the service normally, you may need to modify the / var / lib / mysql owner for mysql: chown -r mysql: mysql / var / mysql MySQL initial root password is empty, you need to modify it.
In order to be able to use the client tool (such as a graphics tool under Windows), you need to add permissions: [root @ eframe62 mysql] # mysql -u root -p mysql> Use mysql mysql> grant all privileges on *. * To root @ " % "Identified by '012345' with grant option; the above command creates a super account that can be logged in from any machine with root, the password is 012345. This way, you can use the convenient graphics tool for login and operation, including modifying the password of the root. 3, install tomcat tomcat can download www.jakarta.org, is a binary package (compiled): JAKARTA-TOMCAT-5.0.27.Tar.gz. (1) Unzip the file to the / usr / local directory [root @ eframe62 local] # Gunzip :