|
Experimental System: CentOS 6.6_x86_64
Experimental conditions: Close all firewall and selinux
Experiment software: apache-tomcat-8.0.24 jdk-8u60-linux-x64 jeecms-v6
First, install the JAVA environment
1. Install JAVA:
wget http://download.Oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.tar.gz
tar xf jdk-8u60-linux-x64.tar.gz -C / usr / local /
cd / usr / local /
ln -sv jdk1.8.0_60 jdk
2. Configure environment variables:
vim /etc/profile.d/jdk.sh
-------------------------------------------------- ->
JAVA_HOME = / usr / local / jdk
PATH = $ JAVA_HOME / bin: $ PATH
export JAVA_HOME PATH
< ------------------------------------------------- -
. /etc/profile.d/jdk.sh // Re-read this document, so variables to take effect
3. Check whether JAVA installed successfully:
java -version
Second, the installation tomcat
1. Install tomcat:
wget http://mirrors.cnnic.cn/apache/tomcat/tomcat-8/v8.0.24/bin/apache-tomcat-8.0.24.tar.gz
tar xf apache-tomcat-8.0.24.tar.gz -C / usr / local /
cd / usr / local /
ln -sv apache-tomcat-8.0.24 tomcat
2. Configure environment variables:
vim /etc/profile.d/tomcat.sh
-------------------------------------------------- ->
CATALINA_BASE = / usr / local / tomcat
PATH = $ CATALINA_BASE / bin: $ PATH
export PATH CATALINA_BASE
< ------------------------------------------------- -
. /etc/profile.d/tomcat.sh
3. Check the tomcat release status:
catalina.sh version
Third, configure tomcat
1. Configure server.xml:
vim /usr/local/tomcat/conf/server.xml
-------------------------------------------------- -------->
< Connector port = "80" protocol = "HTTP / 1.1" // default port is 8080, to 80
connectionTimeout = "20000"
redirectPort = "8443" />
2.tomcat have manager-gui management page, you want to use must be configured to manage users, do not use can skip this step. Configuring tomcat-users.xml:
vim /usr/local/tomcat/conf/tomcat-users.xml
-------------------------------------------------- ----------------------------->
< Role rolename = "manager-gui" /> // user to use the interface for manager-gui
< User username = "tomcat" password = "tomcat" roles = "manager-gui" /> // user name and password for the tomcat, the manager-gui interface
3. Create a test page:
mkdir -pv / usr / local / tomcat / webapps / test / WEB-INF / {classes, lib}
vim /usr/local/tomcat/webapps/test/index.jsp
-------------------------------------------------- ------------->
< % @ Page language = "java"%>
< % @ Page import = "java.util. *"%>
< Html>
< Head>
< Title> test < / title>
< / Head>
< Body>
< %
out.println ( "Hello World!"); // embedded java language
%>
< / Body>
< / Html>
4. Start the test:
catalina.sh start
Open the browser http://192.168.19.74, and open the administration page Manager App, previously configured with a user name and password to enter:
Into the management interface, you can see the test you just created is already loaded, click into it, you can see the test page. Before not configured manager-gui can be used directly http://192.168.19.74/test open:
Fourth, to expand the experiment
1. JAVA program that can be installed many here do presentations with JEECMS placed first program files, the program can be downloaded from http://www.jeecms.com:
unzip jeecmsv6.zip
mv ROOT / / usr / local / tomcat / webapps / cms
catalina.sh stop
catalina.sh start
2. The browser opens http://192.168.19.74/cms, enter the installation page:
3. Write the parameters, mysql installation and use are no longer here to write:
4. Restart tomcat service and access http://192.168.19.74/cms/jeeadmin/jeecms/index.do, the user name admin, password password:
catalina.sh stop
catalina.sh start |
|
|
|