Install jdktomcat under linux and configure

  
        

Install TOMCAT and JDK under Linux

Step 1: Create a new boss user, username: 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: Upload the Tomcat7_0_29.zip file to the /app/boss directory with the boss user

Step 4: Log in to the system as the boss user and extract the Tomcat7_0_29.zip file. The steps are as follows:

[boss@localhost]$unzipTomcat7_0_29.zip

[boss@localhost]$ ls

Tomcat7_0_29 Tomcat7_0_29.zip

Modifying Execute Permissions in the Tomcat bin Directory

[boss@localhost] cd /app/boss/Tomcat7_0_29/bin

[boss@localhost]chmod 755 *

Step 5: Install the JDK. Upload the jdk1.6.0_13-32.zip file to the app/boss with the boss user

Step 6: Log in to the system as the boss user, extract the jdk1.6.0_13-32.zip file, and modify the java execution. Permissions, 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 7: Set the environment variables of the boss user. Modify the contents of 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 //Enable environment variables

Configuring Tomcat

1. Modify the port of tomact.

Boss user or root login can be

cd /app/boss/Tomcat7_0_29/conf directory

vi server.xml

<!-- A "Connector"representing an endpoint by which requests are received and responses a Re returned. Documentation at : 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 those projects published 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 configuration file directory in tomcat, specifically put some configuration files, when tomcat When starting or running, the corresponding configuration file will be read from this 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

to create the apphome directory (boss user creation, and give the appropriate permissions)

Tomcat installation directory is as follows



Copyright © Windows knowledge All Rights Reserved