Jive2.6.4 is the last jive2 version before jive3 was launched by jivesoftware, including Internationalization, search, accessories (Pro and ENT versions), and almost all other basic functions are ready, in addition, its extension interface also makes it very easy to develop the corresponding plug-ins. Therefore, we chose to install jive2.6.4 instead of its later version.
1. Install
(1) platform Selection
I use windows2000sp4, resin2.1.4, mysql3.23.51-nt, jive2.6.4pro, j2sdk1.4.1-RC, mm. mysql-2.0.14.jar.
Why not select tomcat? In my experience, jive2 includes earlier versions and is suitable for running on the resin platform. It provides excellent support for Chinese characters. However, jive3 is different in this case, jive3 runs with tomcat, providing better support for Chinese characters. If you are interested, you can use the same version of jive to run it on resin and tomcat. Therefore, here we select the resin platform. The version I use may be older. You can also download the new version. No problem.
I don't think there is much problem with using MySQL for databases. It is very popular. You can use a newer version.
Windows SP4, huh, if you use Linux, I don't know whether these methods work.
I 'd like to use a Java version later than 1.4, because regular expressions are supported. You can use the plug-in by yourself.
JDBC choose mm. mysql-2.0.14.jar, now MySQL has ctor, but I have not tried, you can try.
(2) read the documentation provided by jive
This document includes installation guidance, upgrade guidance, database installation guidance, management guidance, and development guidance. It is very useful to read it carefully.
(3) install and set Resin
After decompression, you can use it directly. The following settings are optional:
Assume that you have installed resin under D: \ resin, first modify the resin under the conf directory. conf, at least change the port to 80, and add the following sentence to the appropriate location (there are enough comments in the file to let you know where to start: You can also comment out unnecessary services, for example, some examples.
(4) install jive2.6.4pro
To use the Pro version, you must have a valid jive. License file. You can apply for a 30-day trial from the Internet or crack on your own. In fact, jive is almost open-source, and all its class files are not obfuscated, so that we can get the source files by decompiling with Jad. We will not discuss the crack of jive here, but I want to say it is very simple. You only need to modify the file licensemanager. That's right, it's one, including the later jive3.
If you decompress jive to D: \ jive, there are two ways to install it. One is to use the war file, and the other is to install it manually. Here we use the manual installation method.
Step 1: copy the application directory
Create a forum directory under D: \ resin \ webapps, and copy all the content under the Directory D: \ jive \ Application to D: \ resin \ webapps \ Forum directory.
Step 2: copy the jivehome directory
Copy the jivehome directory under D: \ jive to any corner of your hard disk, but do not place it directly under the resin \ webapps directory, in this way, other people will see your configuration in the browser. I put jivehome in D: \ resin \ webapps \ Forum \ WEB-INF \ jivehome, which will be more convenient for future packaging of the entire site.
Step 3: Set the jivehome location
This step is important. Under your D: \ resin \ webapps \ Forum \ WEB-INF \ Classes, you will see a jive_init.properties file, which is used to tell jive its jivehome installation location. Open it in a text editor, check its description, and write your own jivehome. Note that the file separator must be "\", for example: D: \ resin \ webapps \ Forum \ WEB-INF \ jivehome. There is another way to specify the location of jivehome, but it is a little more complicated. You can go to the document.
Step 4: copy the jive. License file (this step may not be required if you crack jive)
Put your jive. License file in jivehome.
(5) Create a database for Jive
After installing MySQL, assume that it is installed in the D: \ mysql directory.
Step 1: Create a database
Run the CMD Tool on the console from the Start menu and go from cmd to the d: \ mysql \ bin directory. Enter:
Mysqladmin create database name
This command is used to create a new database in MySQL. The name is casual, but I suggest you try to use a clear name, for example, jive1_p_resin. In this way, if you want to use tomcat in the future, you can name it jive1_p_tomcat, it is very useful for testing on different platforms.
Step 2: import the schema file
Find jive_mysql. SQL in the Directory D: \ jive \ database, and copy it to the Directory D: \ mysql \ bin (for convenience ). Now, call cmd again. If you have switched it off, open it again and go to the D: \ mysql \ bin directory. Enter:
Type jive_mysql. SQL | MySQL Database Name
The name here is the name of the database you just created.
If no error occurs, all right. Now the jive database has been fully installed.
(6) install JDBC
If you have obtained the MM. mysql-2.0.14.jar or other JDBC that supports MySQL, then,
Step 1: copy it to the D: \ resin \ webapps \ Forum \ WEB-INF \ lib directory, it is recommended to change the name, such as mm. MySQL. jar can be.
Step 2: add the classpath)
Add JDBC class path in Windows properties, such as classpath =., D: \ resin \ webapps \ Forum \ WEB-INF \ Lib \ mm. MySQL. Jar
Of course, if you are installing Java for the first time, there are other class paths to be set. You can refer to other materials, such as Java2 core technology volume I.
If you want to add plug-ins or other class libraries in the future, put them under this directory.
(7) run the Installation tool provided by jive
Well, after a series of installation just now, jive can run as long as it makes some final settings under its console tool. Open your server (resin) and enter the following address in the address bar of your browser: http: // your_host_name/FORUM/admin/setup. Do you see the jive installation interface?
Step 1: Install self-check
Jive checks everything it needs. After the installation in the previous six steps, it must be completely successful (of course, your jive. License may be a problem ). If this is not the case, carefully check whether the previous six steps are correct.
Step 2: User System (PRO Edition)
One is the standard user system (default), and the other is the custom user system. Select a standard user system. If you choose Custom, then the next step of jive will require you to provide your own user classes and group management classes, which I want to use when I modify jive myself.
Step 3: Database settings
This is also the most error-prone part. Be careful. However, the Pro version already has built-in JDBC for several common databases, as long as you select the corresponding database, and then fill in the user name, password, host name, database name and so on.
However, we recommend that you use the third option, the third-party database driver, so that we can enter various types of data on our own so that we can use the latest driver. (The basic version does not have a built-in driver, so you must specify JDBC on your own)
At this time, we can see that we need to fill in six projects. Here we only talk about the first two most error-prone items: JDBC driver and server.
If you use MySQL and mm. MySQL. jar
JDBC driver: org. gjt. Mm. MySQL. Driver
Server: JDBC: mysql: // localhost: Port/Database Name
Note:
Do not add parameters to the driver.
It is best to enter localhost here, because I have not successfully connected to the IP address or host name.
The rest of the content to be filled in is very simple. After the completion, click Continue. In this case, jive will try to establish a connection with the database. If the connection is successful, information about the database and JDBC will be displayed, if an error occurs, check which of the above steps is not correct. Modify and continue until the connection is successful.
Step 4: admin account settings
Enter the email and password. It's very easy. However, you must note that the user name is admin and cannot be modified. You can only change the password.
Congratulations, here, jive has been completely installed successfully. Next, You need to log on to the console with the admin account and perform various settings.
2. modify the configuration to support Chinese Characters
The general principle is: full use of UTF-8, do not appear anywhere gb2312.
(1) console settings
After logging on to the console with your admin account, set it under locale settings on the global settings tab:
Locale: Chinese (China)
Time zone: (GMT + 08:00) Asia/Shanghai CST
Character Set: Unicode (UTF-8)
Here the character set must be set to UTF-8, because jive itself is designed as an i18n network application, not just for a certain character set, so from the perspective of UTF-8 to think, you will get an unexpected simple method.
Set the following parameters in Search Settings:
Indexer type: double-byte (Asian lanuages)
This is to enable jive to support Chinese search.
Okay, there are no other steps to do in the console. How is it easy?
(2) modify the Web. xml file
There is a file named Web. XML in the D: \ resin \ webapps \ Forum \ WEB-INF directory, open it in a text editor.
Step 1: you will find that jive uses the DTD of servlet 2.2 at the beginning of the file, and the DTD of servlet 2.3 below is commented out, all you need to do is to open the comments of the servlet 2.3 DTD and comment out the servlet 2.2 DTD.
Step 2: from row 50 to row 59 of the file, you can see the commented-out <filter> and <filter-mapping> sections. Now open these comments, fill in the UTF-8 in the <filter-Name> set character encoding </filter-Name>, the modification looks like this:
<Filter>
<Filter-Name> UTF-8 </filter-Name>
<Filter-class> com. jivesoftware. Forum. util. setcharacterencodingfilter </filter-class>
</Filter>
<Filter-mapping>
<Filter-Name> UTF-8 </filter-Name>
<URL-pattern>/* </url-pattern>
</Filter-mapping>
(3) modify the jive_config.xml File
Under your jivehome folder, what? Where is the jivehome folder? Well, if you do not remember, review steps 2 and 3 in "Install jive2.6.4pro.
Find the <database> tag and add the <mysql> tag to it, as shown in the following figure:
<Mysql>
<Useunicode> true </useunicode>
</Mysql>
Okay, let me think about it. Is there anything else to do? Well, there seems to be no more. When you finish the above three steps, you have obtained a jive that fully supports Chinese characters, including search.
3. Culture jive
The Chinese culture here does not include the Management Console.
(1) Text
Step 1: Translation
In the WEB-INF \ lib directory, find jive. JAR file, open with WinRAR, decompress the jive_i18n_en_properties file, and then move it to the WEB-INF \ Classes directory, open it with a text editor, the content of all the equal signs on the right is translated into Chinese.
Step 2: Use native2ascii for conversion
Call cmd, go to the WEB-INF \ Classes directory, enter:
Native2ascii jive_i18n_en_properties jive_i18n_zh_properties
The encoding is not specified because it uses the default platform encoding, that is, GBK.
Note: When native2ascii is used, the output directory cannot contain files with the same name as the target file. Otherwise, an error is returned. This means that if you want to output jive_i18n_zh_properties again, you must first delete or rename the existing one.
(2) "community forums" Image
If you want to replace the image with the word "community forums", in addition to specifying other images on the console, you can also put an image named logo_zh.gif in the Forum \ imagesdirectory, in this way, jive automatically calls this image.
4. modify several bugs
(1) Search Result Display
When the search result contains more than one page, you cannot see the search result page. You can only see the first page. This problem is caused by improper encoding during URL construction.
Solution:
Modify the search. jsp 302nd line and set the original
Encodedquerytext = stringutils. encodehex (querytext. getbytes ("UTF-8 "));
Change
Encodedquerytext = stringutils. encodehex (querytext. getbytes ());
(2) username characters
Because of the use of UTF-8, whether a Chinese character or an English letter, jive is considered to be a character. Therefore, when a user registers, if the Chinese name is used, four Chinese characters are required.
Solution:
Modify row 62nd of account. jsp and set the original
Change username. Length () <4 to username. Length () <2
Modify row 124th and set int minusernamelength to 4;
Changed to int minusernamelength = 2;
(3) display the Chinese name of the Attachment
Similarly, for encoding reasons, if the uploaded attachment is a Chinese name, garbled characters are displayed.
Remember, the principle is to use UTF-8.
Solution:
Step 1: Modify attach. jsp
In the getcanonicalname method (row 31st), add the following sentence before returning filename:
Try {
Filename = new string (filename. getbytes ("ISO-8859-1"), "UTF-8 ");
} Catch (unsupportedencodingexception e ){
E. printstacktrace ();
}
The purpose is to recode the Chinese name with a UTF-8 so that the UTF-8 can be correctly displayed when browsing the page.
Then, <a href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname () %>"
Change
> <A href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname (), "UTF-8") %>"
Step 2: Modify threadmode2.jsp
Row 680th, <a href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname () %>"
Change
<A href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname (), "UTF-8") %>"
Row 687th, <a href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname () %>"
Change
<A href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname (), "UTF-8") %>"
Step 3: Modify threadmode1.jsp
Row 616th, <a href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname () %>"
Change
<A href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname (), "UTF-8") %>"
Row 623rd, <a href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname () %>"
Change
<A href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname (), "UTF-8") %>"
Row 724th, <a href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname () %>"
Change
<A href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname (), "UTF-8") %>"
Row 731st, <a href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname () %>"
Change
<A href => <% = PATH %>/servlet/jiveservlet/download/<% = forumid %>-<% = threadid %>-<% = message. GETID () %>-<% = attachment. GETID () %>/<% = urlencoder. encode (attachment. getname (), "UTF-8") %>"
(4) Forum/category name cannot be Chinese
This may be caused by a small negligence of the jive developers.
Solution: Modify index. jsp
Remove the comments from line 164-166 and comment out line 167th.
For the above typical bugs, you may have a better solution, so be sure to tell me.
5. Add plug-ins
This is done on the console.
Click global filters under the global settings tab. You will see all the filters installed in jive. to install a new filter, enter the class name at the bottom and add filter.
Note that the order of filters is as follows:
HTML filter always comes first.
When javacodehighlighter filter is not installed, newline filter is always the last bit.
When javacodehighlighter filter is installed, the javacodehighlighter filter is always the last bit and the last two digits of newline filter.
Also, I recommend that you do not install the word break filter. It inserts spaces in the body, which is annoying. Do not install text stylizer filter, because it will escape "I". This will completely change to italic characters when int I variables are used in the added Java code. (In fact, you can re-write a plug-in by yourself, isn't it ?)
If you want to write the plug-in by yourself, please refer to my other article "Write imagefilter for jive2.x".
Well, okay. It took three days to record some of my experiences on jive, and I have an explanation of myself. More importantly, in this way, we can resist the presence of the forgotten God. I also hope it will be helpful to you.