The latest configuration of Tomcat 5.5.25 + mysql5.0.45 + jdk1.0.5.13 + eclipse3.3.1 + myeclipse6.0 in liux 1. Install the required software package: 1. JDK 5.0 Update 13 (jdk-1_5_0_13-linux-i586-rpm.bin) : Http://sdlc-esd.sun.com/ESD36/JSCDL/jdk/1.5.0_13/jdk-1_5_0_13-linux-i586-rpm.bin? Authparam = signature & Turl = signature + Signature = & ticketid = dvn6ogzln + 4y/W = & groupname = SDLC & bhost = sdlc1g.sun.com & filepath =/esd36/jscdl/JDK/1.5.0 _ 13/jdk-1_5_0_13-linux-i586-rpm.bin & file = jdk-1_5_0_13-linux-i586-rpm.bin (may expire) To download the SDK, follow these steps: Http://java.sun.com/javase/downloads/index_jdk5.jsp Find-> JDK 5.0 Update 13 and click the download icon on the right, On the download page, click accept license agreement | review license agreement. Find the Linux platform-Java Development Kit 5.0 Update 13 Click Linux rpm in self-extracting file to download 2. Apache -- tomcat-5.5.25 : Http://apache.mirror.phpchina.com/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.tar.gz (may expire) To download the SDK, follow these steps: Http://tomcat.apache.org/download-55.cgi Find the coreitem under binary distributions and click tar.gz (Pgp, MD5) to download tar.gz. 3. mysql5.0.45 : Http://dev.mysql.com/downloads/mysql/5.0.html#linux-static-x86-32bit-rpms See Linux x86 generic RPM (statically linked against glibc 2.2.5) Downloads download MySQL-client-5.0.45-0.i386.rpm MySQL-devel-5.0.45-0.i386.rpm MySQL-server-5.0.45-0.i386.rpm MySQL-shared-5.0.45-0.i386.rpm 4.eclipse-sdk-3.3.1.1-linux-gtk.tar.gz : Http://eclipse.cdpa.nsysu.edu.tw/downloads/drops/R-3.3.1.1-200710231652/eclipse-SDK-3.3.1.1-linux-gtk.tar.gz (may expire) To download the SDK, follow these steps: Http://download.eclipse.org/eclipse/downloads/drops/R-3.3.1.1-200710231652/index.php Find the Linux (x86/GTK 2) (supported versions) eclipse-SDK-3.3.1.1-linux-gtk.tar.gz 138 MB eclipse-SDK-3.3.1.1-linux-gtk.tar.gz (MD5) (sha1) Click eclipse-sdk-3.3.1.1-linux-gtk.tar.gz to download 5. myeclipse6.0 : Http://downloads.myeclipseide.com/downloads/products/eworkbench/6.0.1GA/MyEclipse_6_0_1GA_E3_3_1_Installer.bin (may expire) To download the SDK, follow these steps: Http://www.myeclipseide.com/module-htmlpages-display-pid-4.html Select accept license agreement | review license agreement, and then click Download In 6.0. Find 2. myeclipse enterprise workbench 6.0.1 GA for Redhat Enterprise Linux 4 Click plug-in to download the second item. Note: After downloading the preceding packages, place them in a directory you are familiar with to facilitate management and installation. Ii. Installation 1. Install JDK 5.0 Update 13 # Chmod + x jdk-1_5_0_13-linux-i586-rpm.bin #./Jdk-1_5_0_13-linux-i586-rpm.bin # YesNote: chmod + x jdk-1_5_0_13-linux-i586-rpm.bin add execution permission ./Jdk-1_5_0_13-linux-i586-rpm.bin executes the jdk-1_5_0_13-linux-i586-rpm.bin and generates the jdk-1_5_0_13-linux-i586-rpm Yes indicates agree to install The default JDK installation directory is/usr/Java/jdk1.5.0 _ 13. After installation, create a link for him to save the directory length. # Ln-S/usr/Java/jdk1.5.0 _ 13/usr/JDK Last # Vi/etc/profile Add the following content (Note: copying the following content will contain a few more characters and you need to edit it with nedit under X) Java_home =/usr/JDK Classpath = $ java_home/lib/ Path = $ path: $ java_home/bin Export path java_home classpath Test # Source/etc/profile # Java-version Appears: Java version "1.5.0 _ 13" Java (TM) 2 Runtime Environment, Standard Edition (build 1.5.0 _ 13-b05) Java hotspot (TM) Client VM (build 1.5.0 _ 13-b05, mixed mode, sharing) Installed successfully 2. install Apache-Tomcat-5.5.25 # Tar-zxvf apache-tomcat-5.5.25.tar.gz-C/usr/local (unzip to/usr/local) # Ln-S/usr/local/apache-tomcat-5.5.25/usr/local/tomcat Start Tomcat #/Usr/local/tomcat/bin/startup. Sh Test http: // 127.0.0.1: 8080 Success if a kitten appears Attach to system startup # Vi/etc/rc. d/rc. Local #/Usr/local/tomcat/bin/startup. Sh (add to the end of the file) 3. Install mysql5.0.45 First, run the command: rpm-Qa | grep MySQL to check whether MySQL and its version are installed, and delete the installed MySQL. If you are using a Linux version that contains SELinux and has been started, disable SELinux = enforcing in/etc/SELinux/config and change it to SELinux = disabled. # Rpm-IVH MySQL-client-5.0.45-0.i386.rpm # Rpm-IVH MySQL-devel-5.0.45-0.i386.rpm # Rpm-IVH MySQL-server-5.0.45-0.i386.rpm # Rpm-IVH MySQL-shared-5.0.45-0.i386.rpm #./Mysqladmin-u Root Password 123456 # Mysql-u root-p123456 * log on to MySQL # Set password for 'root' @ '192. 168.1.17 '= old_password ('123'); (this step can be omitted) Database path:/var/lib/MySQL/ Start command:/etc/init. d/MySQL strat Stop command:/usr/bin/mysqladin-u root-P Shutdown 4.install eclipse-sdk-3.3.1.1-linux-gtk.tar.gz # Tar-zxvf eclipse-SDK-3.3.1.1-linux-gtk.tar.gz-C/usr/local (unzip to the/usr/local directory and generate the/usr/local/eclipse directory) #./Usr/local/Eclipse/eclipse (start and make relevant settings to create a desktop shortcut in a graphic desktop environment) 5. Install myeclipse6.0 The installation of myeclipse is no different from that of windows. Execute the myeclipse_6_0_1ga_e3_3_1_installer.bin file in shell: #./Myeclipse_6_0_1ga_e3_3_1_installer.bin (Change the permission if necessary: # chmod 777 myeclipse_6_0_1ga_e3_3_1_installer.bin) Press enter to check the environment in your system. If it is normal, the installation screen of myeclipse appears. The operation is the same as that of windows, Here, you will first select the eclipse installation directory. Here I am/usr/local/eclipse, then select the installation directory, enter/usr/local/myeclipse, and click Next. After installation, start eclipse and click "help --> Software Updates --> Manager Configuration ". In the window that appears, you can see that myeclipse is already there. Next, register and use the following account and password: Subscriber: Administrator Subscribe code: nLR7ZL-655342-54657656405281154 After registration: Subscriber: Administrator Product ID: e2my (myeclipse standard submodules) License version: 1.0 Full maintenance supported DED Subpartition expiration date (yyyymmdd): 20091021 Number of license: 897 Configure Tomcat: In eclipse, select window --> preferences. In the displayed window, select myeclipse --> servers --> tomcat5. Next, select "enable" in Tomcat server. Next, select the Tomcat home directory where your Tomcat is installed, and then click Apply in the lower right corner to exit. After the installation is complete, write a small program for a test. 1. Use myeclipse to create a project page, and write the following code to tests. jsp: <% @ Page contenttype = "text/html; charset = gb2312" Language = "Java" Import = "Java. SQL. *" %> <HTML> <Body> <Table border = 1> <% Class. forname ("orj. Git. Mm. MySQL. Driver"). newinstance (); Connection con = java. SQL. drivermanager. getconnection ("JDBC: mysql: // 127.0.0.1/Tery", "root", "123456 "); Statement stmt = con. createstatement (); Resultset rst1_stmt.exe cutequery ("select * From ad_roleinfo order by role_id ;"); While (RST. Next ()) { Out. println ("<tr> "); Out. println ("<TD> + RST. getstring (" role_id ") + </TD> "); Out. println ("<TD> + RST. getstring (" role_name ") + </TD> "); Out. println ("</tr> "); } RST. Close (); Stmt. Close (); Con. Close (); %> </Table> </Body> </Html> Note: the link to the database may need a mysql-connector-java-3.1.14.bin.jar (the corresponding version can be) http://dev.mysql.com/downloads/connector/j/5.1.htmlsearch to find the corresponding download 2. Use MySQL to create a database Create a shell # Mysql-u root-p123456 # Create database Tery; # Use Tery; # Create table ad_roleinfo ( Role_id int not null, Role_name varchar (20 ), Primary Key (role_id) ) Engine = InnoDB default charset = utf8; Insert into ad_roleinfo values (1, 'Super admin '); Insert into ad_roleinfo values (2, 'General manager '); Insert into ad_roleinfo values (3, 'marketing Department '); Insert into ad_roleinfo values (4, 'Technology Department '); Insert into ad_roleinfo values (5, 'Customer Service Department '); Insert into ad_roleinfo values (6, 'account '); 3. LINK TEST Http: // 127.0.0.1/test. jsp The corresponding data table is displayed. Indicates that the installation is successful. The installation of the later version is basically the same as the current configuration. Please refer to the corresponding Linux version for corresponding adjustments |