Install TOMCAT and JDK in linux
Step 4: Create a boss user, User name: boss, password: boss
Step 2: Set the installation user path to/app/boss
[Root @ localhost] # useradd-d/app/boss-m boss
[Root @ localhost] # passwdboss
Changing password for user boss.
New password: boss
Passwd: all authentication tokens updated successfully.
[Root @ localhost] # chown boss: users/app/boss
Step 2: Upload the tomcat7_0_29.zip file to the/app/boss path using the boss user
Step 1: Decompress the tomcat7_0_29.zip file using the boss system. The procedure is as follows:
[Boss@localhost]$unzipTomcat7_0_29.zip
[Boss @ localhost] $ ls
Tomcat7_0_29 Tomcat7_0_29.zip
Modify the execution permission under the Tomcat bin directory
[Boss @ localhost] cd/app/boss/Tomcat7_0_29/bin
[Boss @ localhost] chmod 755 *
Step 2: Install JDK. Upload the jdk1.6.0_13-32.zip file to the app/boss using the boss user.
Step 1: Decompress the jdk1.6.0_13-32.zip file and modify the java execution permission using the bossuser's login system. The steps are as follows:
[Boss @ localhost] $ unzipjdk1.6.0_13-32.zip
[Boss @ localhost] $ cd jdk1.6.0 _ 13-32/bin
[Boss @ localhost jdk1.6.0 _ 13-32] $ chmod 755 *
Step 2: Set the environment variable of the boss user and modify the. profile file as follows:
[Boss @ localhost] $ vi. profile // The red part is to be added.
ExportJAVA_HOME =/app/boss/jdk1.6.0 _ 13-32
ExportJRE_HOME = $ JAVA_HOME
ExportPATH = $ JAVA_HOME/bin: $ PATH: $ HOME/bin:/sbin
Export LANG = zh_CN.GB2312
[Boss @ localhost] $ source. profile // make the environment variable take effect
Configure Tomcat
1. Modify the tomact port.
Either the boss user or the root user can log on.
Cd/app/boss/Tomcat7_0_29/conf directory
Vi server. xml
<! -- A "Connector" represents an endpoint by which requests are already ed
And responses are returned. Documentation:
Java HTTP Connector:/docs/config/http.html (blocking & non-blocking)
Java AJP Connector:/docs/config/ajp.html
APR (HTTP/AJP) Connector:/docs/apr.html
Define a non-ssl http/1.1 Connector on port 8080
-->
<Connector port = "19998" protocol = "HTTP/1.1" connectionTimeout = "20000" maxPostSize = "10240" allowTrace = "false" redirectPort = "8542" xpoweredBy = "false" server = "ONIP SOABean AS V300R001C02" URIEncoding = "UTF-8"/>
<! -- A "Connector" using the shared thread pool -->
2. modify the projects released under tomcat
<Host name = "localhost" appBase = "webapps"
UnpackWARs = "true" autoDeploy = "false" deployOnStartup = "false">
<Context path = "/" docBase = "ROOT" reloadable = "false"/>
<Context path = "/admin" docBase = "admin" reloadable = "false"/>
<! -- Link to the user database we will get roles from -->
3. Create a directory for the configuration file in tomcat and place some configuration files. When tomcat is started or running, the corresponding configuration files will be read from the directory.
Cd/app/boss/Tomcat7_0_29/conf
Vi catalina. properties
# Add BOSS config path: $ {catalina. home}/apphome/cfg
Common. loader =$ {catalina. base}/lib/soaas, $ {catalina. base}/lib/soaas /*. jar, $ {catalina. base}/lib, $ {catalina. base}/lib /*. jar, $ {catalina. home}/lib, $ {catalina. home}/lib /*. jar, $ {catalina. home}/apphome/cfg
We need to go to cd/app/website/Tomcat7_0_29
Create the apphome directory (create a boss user and grant corresponding permissions)
The Tomcat installation directory is as follows: