Tomcat+jive installation configuration (support Chinese)

Source: Internet
Author: User
Tags copy include mysql unpack version mysql database tomcat tomcat server
Chinese 0, Apache and JDK have been installed. Otherwise the installation. The native installation version is apache1.3,jdk to 1.3.1 (JDK1.4.0 cannot be used because the problem of class declaration overlap is encountered when compiling a Java file in a later Jive installation. java.sql and Java.beans packages, which are jdk1.4.0, contain class statement, whereas in jdk1.3.1 the Java.beans package does not contain a statement class, and the file imports the package in the form of:
Import java.sql.*;
Import java.beans.*;)


1, download tomcat installation package, currently the latest version of 4.0 Beta 7, installation of the use of the official release version 3.2.1 (also can use the latest release of 3.2.3), download the address is:
http://java.apache.org/.


2, download the source code MOD_JK. Included in the file jakarta-tomcat-3.2.1-src.tar.gz, after decompression is located in src/native/apache1.3 (if you use Apache you should use Src/native/apache2) directory. Download Address ditto.


3. Unpack the downloaded Tomcat release package into a directory, such as/usr, where a
jakarta-tomcat-3.2.1 directory, preferably renamed as a short image of the name, such as Tomcat.


4. Set the environment variable Java_home,path,classpath,tomcat_home in the system configuration file/etc/profile, where:
Java_home: The home directory installed for JDK, which should be the default installation of JDK1.3.1:/usr/java/jdk1.3.1_01
Path: the Java compiler and the running program are included in the previous path, in this case/usr/java/jdk1.3.1_01/bin.
CLASSPATH: The class library containing JDK and the JDBC driver for MySQL, in this case, the MySQL driver is copied to the JDK's driver directory, so this example is set to:/usr/java/jdk1.3.1_01/lib/tools.jar:/ Usr/java/jdk1.3.1_01/driver, for JDK1.3.1, you can also not set the Tools.jar, but only the JDBC-driven path.
Tomcat_home:tomcat's home directory, in this case/usr/tomcat.


5, if you have previously configured Tomcat and now switch to use MOD_JK instead of the original mod_jserv, you need from the original httpd.conf
Remove any apjservmount instructions and remove them if they contain tomcat-apache.conf or tomcat.conf.


6, compile the downloaded MOD_JK source code generation needs of the mod_jk.so library.
The method under Linux is:
Unpack the jakarta-tomcat-3.2.1-src.tar.gz, enter the solution after the package
jakarta-tomcat-3.2.1/src/native/apache1.3 directory, copy all files in this directory to the top of this directory JK
Directory, the command is CP./*. /jk/
Enter the JK directory: CD. /jk
To compile the build library file, the command is:
Apxs-o mod_jk.so-i. /jk-i/usr/local/jdk/include-i/usr/local/jdk/include/linux
-C *.C
When finished, build the library file mod_jk.so in the JK directory.


7, copy generated library files mod_jk.so to/etc/httpd/modules (also can follow the method of Tomcat installation files, but I did not find the Libexec directory mentioned, had to copy it to the Apache module directory)


8, set Tomcat to support a better Ajpv13 protocol.
modifying Tomcat_home/conf/server.xml files
In the following text


<connector classname= "Org.apache.tomcat.service.PoolTcpConnector" >
<parameter name= "Handler" value= "Org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
<parameter name= "Port" value= "8007"/>
</Connector>


Add a similar text later:

<connector classname= "Org.apache.tomcat.service.PoolTcpConnector" >
<parameter name= "Handler" value= "Org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
<parameter name= "Port" value= "8009"/>
</Connector>

The preceding text cannot be deleted because Tomcat needs it when it is off.

9, edit the Tomcat_home/conf/workers.properties file to conform to the system environment:
Major changes to the following three
Workers.tomcat_home=/usr/tomcat
Workers.java_home=/usr/java/jdk1.3.1_01
ps=/
(Modify according to your own settings, the first is Tomcat's home directory, the second is Java's home directory, the third is the system path separator, window is \,unix/linux to/)

10, modify the Apache configuration file to use MOD_JK.
At the end of the Apache configuration file/etc/httpd/conf/httpd.conf, add:


LoadModule Jk_module modules/mod_jk.so
Addmodule MOD_JK.C
Jkworkersfile/usr/tomcat/conf/workers.properties
Jklogfile/var/log/mod_jk.log
Jkloglevel warn
Include/usr/tomcat/conf/mod_jk.conf-auto

Modify <VirtualHost> section to enable SP and servlet requests to be sent to the AJP13 protocol

Documentroot/webapps/test
ServerName Cherami
Sslengine on
Jkmount/*.jsp ajp13
jkmount/servlet/* ajp13


You should now be able to start the Tomcat server by using/usr/tomcat/bin/startup.sh and enter 127.0.0.1:8080 in the browser to see the Tomcat's main interface.
Installation of JIVE 2
1, Download Jive 2 of the installation package Jive_2_0_beta2.zip, download after the unpack, download the address for http://www.jivesoftware.com/


2. Create a directory for Jive, such as/usr/tomcat/webapps/jive, to copy all files in the application directory of the jive after the unpack to this directory.


3. Edit the Jive_init.properties file in the/usr/tomcat/webapps/jive/web-inf/classes directory and change it to the location of the Jive home directory, in this case:
Jivehome=/usr/tomcat/webapps/jive/web-inf/jivehome


4, the installation of Jive required database.
First start the MySQL database service program (the system does not have the default boot of the book to start the MySQL server.) Can generally by the MySQL user login system, and then mysqld on it. It is best to modify the system service and start MYSLQD when the system is started. )
Use mysql:mysql-u root-p as root
Use the CREATE Database jive when you enter, creating the databases jive used by Jive.
Authorize the use of jive:grant all on jive.* to jive@ identified by "password". Exit MySQL and enter the database directory in the Jive directory after the unpack, using
Cat Jive_mysql.sql|mysql-u Root Jive-p
Create a table for the Jive database.

5. Modify the Server.xml files under the Conf directory under Tomcat's home directory:

<context path= "/examples" docbase= "Webapps/root"/>
or a similar section to add the Jive Service directory:
<context path= "/jive" docbase= "webapps/jive" debug= "0" reloadable= "true" > </context>
6, modify/usr/tomcat/webapps/jive/include/branding/style.jsp and/usr/tomcat/webapps/jive/admin/include/global.jsp, Add in front: <%@ page contenttype= "Text/html;charset=8859_1"%>

7. Restart Linux for all changes to take effect, start Tomcat:
/usr/tomcat/bin/startup.sh
Start the httpd service (skip here if it is started):
httpd
Start the browser and start the Jive configuration in the Address bar:
Localhost:8080/jive/admin
The first step should be smooth through, the second step to choose the default English, the third step of the database connection,
JDBC Fill: org.gjt.mm.mysql.Driver
Server fill: jdbc:mysql://localhost/jive
Username:jive
Passwd:password
Next. The following is the creation of super users and forums. After the configuration, directly support the Chinese language.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.