Building a web application environment under Linux

xiaoxiao2021-03-06  107

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

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 : Enter http: // machine domain name or IP address in the browser: 8080 / admin , Log in to the management interface as an administrator. (8) Creating a CONTEXT content creation standard web application (such as QuickStart): includes a web-inflicity, with a Classes and lib directory.

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

New Post(0)