A few days ago, the running environment of j2ee under windows was set up. Because the company's servers all use Linux, today we will also set up the j2ee operating environment under Linux. The following is my detailed diary of all tests that were OK:
1. JDK installation (installed in the /usr/java directory)
1. Download: jdk-7-ea-bin-b26-linux-i586-24_apr_2008.bin
address:
1. Unzip to the /usr/java directory:
[root@localhost java]# tar -zxvf jakarta-tomcat-5.0.28.tar.gz
A new directory jakarta-tomcat-5.0.28 will appear under the /usr/java directory.
2. Create a file link:
[root@localhost java]# ln -s jakarta-tomcat-5.0.28 tomcat
3. Configure CATALINA_HOME:
[root@localhost java]# vi /etc/profile
Add at the end of the file
CATALINA_HOME=/usr/java/tomcat
export CATALINA_HOME
:wq save and exit
4. Start tomcat:
[root@localhost tomcat]# bin/startup.sh
Output under shell:
Using CATALINA_BASE: /usr/java/tomcat
Using CATALINA_HOME: /usr/java/tomcat
Using CATALINA_TMPDIR: /usr/java/tomcat/temp
Using JAVA_HOME: /usr/java/jdk1.7.0
5. Enter in the browser: http://localhost:8080 and the tomcat welcome page will appear ^_^
6. Manage tomcat:
[root@localhost tomcat]# vi conf/tomcat-users.xml
Add between <tomcat-users> and </tomcat-users>:
<user username=”admin” password=”admin” roles=”admin,manager”/>
7. Restart the system:
In the browser, enter: http://localhost:8080/admin. After logging in, you can manage your project. Enter http://localhost:8080/manager/html to manage your project.