| Message |
|
|
下載函式庫: HttpClient 4.1.1 (GA)
http://hc.apache.org/downloads.cgi
預先安裝函式庫:commons-logging-1.1.1.jar, httpcore-4.1.jar, httpclient-4.1.1.jar
這裡我以Servlet 3.0標準來當做練習,請在Tomcat 7.0以上版本執行:
HttpClientServlet.java:
package com.andowson.httpclient;
import java.io.IOException;
import java.io.PrintWriter;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.params.ConnRoutePNames;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
/**
* Servlet implementation class HttpClientServlet
*/
@WebServlet("/HttpClientServlet")
public class HttpClientServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public HttpClientServlet() {
super();
}
/**
* @see Servlet#getServletInfo()
*/
public String getServletInfo() {
return "HttpClient Servlet";
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String url = request.getParameter("url");
if (url == null) {
url = "https://ups.moe.edu.tw/";
}
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpHost proxy = new HttpHost("10.160.3.88", 8080);
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
try {
TrustManager easyTrustManager = new X509TrustManager() {
@Override
public void checkClientTrusted(
X509Certificate[] chain,
String authType) throws CertificateException {
// Oh, I am easy!
}
@Override
public void checkServerTrusted(
X509Certificate[] chain,
String authType) throws CertificateException {
// Oh, I am easy!
}
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}
};
SSLContext sslcontext = SSLContext.getInstance("TLS");
sslcontext.init(null, new TrustManager[] { easyTrustManager }, null);
SSLSocketFactory socketFactory = new SSLSocketFactory(sslcontext,
SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
Scheme sch = new Scheme("https", 443, socketFactory);
httpclient.getConnectionManager().getSchemeRegistry().register(sch);
HttpGet httpget = new HttpGet(url);
System.out.println("executing request " + httpget.getRequestLine());
HttpResponse resp = httpclient.execute(httpget);
HttpEntity entity = resp.getEntity();
System.out.println("----------------------------------------");
System.out.println(resp.getStatusLine());
if (entity != null) {
System.out.println("Response content length: " + entity.getContentLength());
}
EntityUtils.consume(entity);
response.setContentType(entity.getContentType().toString());
PrintWriter out = response.getWriter();
ResponseHandler<String> responseHandler = new BasicResponseHandler();
String responseBody = httpclient.execute(httpget, responseHandler);
System.out.println("----------------------------------------");
System.out.println(responseBody);
out.println(responseBody);
System.out.println("----------------------------------------");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (KeyManagementException e) {
e.printStackTrace();
} finally {
httpclient.getConnectionManager().shutdown();
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
修改web.xml,加入下列項目:
<servlet>
<servlet-name>HttpClientServlet</servlet-name>
<servlet-class>com.andowson.httpclient.HttpClientServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HttpClientServlet</servlet-name>
<url-pattern>/servlet/httpclient</url-pattern>
</servlet-mapping>
說明:
63-64行是如果伺服器需要透過Proxy才能連到Internet(例如公司內部網站)執行時需透過Proxy的設定方式,如果伺服器可以直接連接到Internet時這兩行需要mark為註解掉。
參考資料:
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e537
|
 |
|
|
我猜測這個現象會發生的原因可能如下,
1.如果資料庫內碼是使用Big5編碼時,透過網頁上輸入的中文字(UTF-8)進入到應用伺服器時,被轉了一次碼(ISO-8859-1),再存到資料庫時,又轉了一次碼(Big5),例如下列的順序:
UTF-8->ISO-8859-1->Big5
當UTF-8轉成ISO-8859-1時,Unicode被轉成10進制的HTML Entity格式(如珉),然後跟其他可以轉成Big5的字元一起存到資料庫去。
2.等到從資料庫取回這個字串時,就會得到一個夾雜著HTML Entity格式的Big5字串,如果把這個字串直接傳給iText 去產生 pdf 檔,這些HTML Entity字串應該就會當做英文字母一樣輸出。於是就產生類似您所附上的sample.pdf 般的內容了。
好,了解原因後,要解決這個問題就很簡單了,只要在步驟2時補上將HTML Entity字串轉碼回原始編碼,再傳給iText去產生pdf即可。而要將HTML Entity字串轉碼回原始編碼只要呼叫
Apache Commons Lang的 StringEscapeUtils.unescapeHtml(java.lang.String) method即可。
在此以修改 iText in Action 2nd Edition所提供的 HelloWorld.java作為範例
HelloWorld.java:
/*
* This class is part of the book "iText in Action - 2nd Edition"
* written by Bruno Lowagie (ISBN: 9781935182610)
* For more info, go to: http://itextpdf.com/examples/
* This example only works with the AGPL version of iText.
*/
package com.andowson.pdf;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.commons.lang.StringEscapeUtils;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Font;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfWriter;
/**
* First iText example: Hello World.
*/
public class HelloWorld {
/** Path to the resulting PDF file. */
public static final String RESULT
= "D:/hello.pdf";
/**
* Creates a PDF file: hello.pdf
* @param args no arguments needed
*/
public static void main(String[] args)
throws DocumentException, IOException {
new HelloWorld().createPdf(RESULT);
}
/**
* Creates a PDF document.
* @param filename the path to the new PDF document
* @throws DocumentException
* @throws IOException
*/
public void createPdf(String filename)
throws DocumentException, IOException {
// step 1
Document document = new Document();
// step 2
PdfWriter.getInstance(document, new FileOutputStream(filename));
// step 3
document.open();
// Assumes that source string comes from database
String source = "測試物品-珉彣峯喆献";
// Unescapes the Unicode characters from HTML entities (decimal format) to string
String output = StringEscapeUtils.unescapeHtml(source);
// Specifies the file path to the Chinese font file
BaseFont bfChinese = BaseFont.createFont("C:/Windows/Fonts/kaiu.ttf",
BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
Font font = new Font(bfChinese, 12); // The font size is 12.
// step 4
document.add(new Paragraph(output, font));
// step 5
document.close();
}
}
下載函式庫:
http://itextpdf.com/
http://commons.apache.org/lang/
參考網址:
* Unicode 編碼字集
http://theorem.ca/~mvcorks/cgi-bin/unicode.pl.cgi?start=4E00&end=9FFF
* 解決iText輸出中文問題
http://blog.yam.com/rexmen/article/1888474
* Hello World example
http://itextpdf.com/examples/iia.php?id=12
|
 |
|
|
今天上午已將本站使用之JDK及Tomcat分別升級為JDK 6 Update 25及Tomcat 7.0.14,目前運作一切順利,如有發現任何異常請再回報,謝謝。
|
 |
|
|
中華電信100年研發及菁英人員徵才公告
中華電信將招募研發及菁英人員共 87 名,各職缺擔任工作、學歷資格條件及遴選相關事項,請參閱遴選簡章,一律採取網路報名方式辦理。
一、報名日期:100 年5 月13 日至100 年5 月30 日24:00
二、第一試(資歷論文審查)日期:100 月5 月31 日至100 年6 月3 日由本公司電信研究所及企業客戶分公司資歷審查小組上網遴選
三、第二試通知日期:100 年6 月8 日15:00 ( http://www.chttl.com.tw 網站公告外,詳細口試時程另行e-mail 通知)
四、第二試(口試)日期:100 年6 月11 日至100 年6 月12 日(若有異動,以通知變更日期為準)
五、放榜日期:100 年6 月15 日(若有異動,以通知變更日期為準)
詳請請看:
http://www.cht.com.tw/CompanyCat.php?CatID=4&NewsID=4312&Page=HotNewsDetail
|
 |
|
|
原本使用wget https://eip.mycomp.com 會出現錯誤訊息,將Apache所在主機(eip.mycomp.com)之/etc/httpd/conf/ssl.crt/ca.crt複製到wget所在主機後,改用下列方式連線即可:
wget --ca-certificate /path/to/ca.crt https://eip.mycomp.com
參考資料:
http://comments.gmane.org/gmane.comp.jakarta.repository/5996
|
 |
|
|
Hi newbiejforum,
My suggestion is that you can download jforum-2.2.1.war and install it.
Here is the download page:
http://code.google.com/p/jforum2/downloads/list
And see if JForum 2.2.1 works for you.
If it works, then you can start your customization on JForum 2.2.1's codebase.
|
 |
|
|
Hi newbiejforum,
Did you check out the JForum 2.2.1 code?
There is a line of import at the top of PostAction.java:
import org.apache.commons.lang.StringUtils;
And you'll need to add commons-lang-2.5.jar in your CLASSPATH to compile it.
Also you'll need to add servlet-api.jar to your CLASSPATH, too.
|
 |
|
|
|
|
 |
|
|
kisskevin524您好:
我用#11那篇的download.jsp在Windows Vista上跑Tomcat 7.0.12上測試,沒遇到您所說的問題,請再確認一下環境跟您使用的版本。
|
 |
|
|
在/etc/crontab中我們可以透過下列格式來設定排程作業
20 1 * * * tomcat (cd /var/webapps/10.66.19.16/WEB-INF/bash; /var/webapps/10.66.19.16/WEB-INF/bash/login_check.sh) > /var/log/login_check.log 2> &1
如果作業系統有對使用者帳號設定密碼過期時間(如90天),則當帳號tomcat密碼過期時,就會導致tomcat這個帳號失效,而讓crond無法正常執行crontab中屬於tomcat帳號的排程作業。
我們可以透過chage -l tomcat這個指令來檢查
如果顯示出來的不是類似下面:
[中文]
密碼過期:從不
密碼失效:從不
[英文]
Password Expires: Never
Password Inactive: Never
就表示該帳號有個到期日,到了該到期日需要變更密碼才行,否則將會被作業系統自動鎖定該帳號,如此就會造成排程無法正常執行。
修正方式(將該帳號tomcat改為密碼永不過期且永不失效,可以參考chage -l apache):
chage -M 99999 -I -1 tomcat
參考畫面如下:
[root@www ~]# chage -l tomcat
最近一次密碼修改時間 : 2月 21, 2011
密碼過期 : 5月 22, 2011
密碼失效 : 6月 05, 2011
帳戶過期 :從不
最少必須相隔幾天才能改變密碼 :0
最多必須相隔幾天才能改變密碼 :90
在密碼將要過期之前多少天會發出警告 :7
[root@www ~]# chage -M 99999 -I -1 tomcat
[root@www ~]# chage -l tomcat
最近一次密碼修改時間 : 2月 21, 2011
密碼過期 :從不
密碼失效 :從不
帳戶過期 :從不
最少必須相隔幾天才能改變密碼 :0
最多必須相隔幾天才能改變密碼 :99999
在密碼將要過期之前多少天會發出警告 :7
|
 |
|
|
今天發現CentOS 5.6已經於2011/04/09釋出,依照下列步驟將原先的CentOS 5.5升級至CentOS 5.6
yum clean all
yum update glibc\*
yum update yum\* rpm\* pyth\*
yum clean all
yum update mkinitrd nash
yum update selinux\*
yum update
shutdown -r now
重開機後,發現httpd沒有自動帶起來,再用root身分執行一下
chkconfig httpd on
service httpd start
完成
參考資料:
http://wiki.centos.org/zh-tw/Manuals/ReleaseNotes/CentOS5.6#head-dc969ac07751238f2569c274902219efa62381cb
|
 |
|
|
Tomcat 7 Auto Upgrader
tomcat7-upgrade.sh
#!/bin/bash
# Name: Tomcat 7.x auto-upgrade installer
# Author: Andowson Chang (andowson [at] gmail [dot] com)
# Version: 1.8
# Since: 2006-04-30
# Last Modified: 2011-04-08
#
# intranet workaround
# If your server doesn't have direct access to the Internet, ie. in the company
# intranet behind a firewall, you can modify your server's proxy setting by edit
# /etc/wgetrc:
#http_proxy = http://proxy.yourcompany.com:8080/
#use_proxy = on
# If you still can't use proxy then you have to download all the files manually.
# After download, copy them into ${SETUP_DIR}. And then change the following
# default version number to the correct number you have downloaded.
#
TOMCAT_VERSION=7.0.12
#
# adjustable parameters, you can modify any of them to fit your own need
#
MIRROR_HOST=apache.ntu.edu.tw
CATALINA_HOME=/var/tomcat7
WORKER_ROOT=/var/robust
SETUP_DIR=/root/setup/web
#
# create the setup directory
#
mkdir -p ${SETUP_DIR}
cd ${SETUP_DIR}
#
# check the installed version of Tomcat 7.0
#
OLD_VERSION=`ls -l /var | grep tomcat7|awk '{print $11}'|cut -d "-" -f3`
#
# check the latest stable version of Tomcat 7.0
#
wget http://tomcat.apache.org/whichversion.html -q -t 1 -T 5 -O /tmp/tomcat.html
if [ -s /tmp/tomcat.html ]; then
TOMCAT_VERSION=`grep "7\.0\." /tmp/tomcat.html|grep -v "7\.0\.x"|cut -d">" -f2|cut -d"<" -f1`
fi
rm -rf /tmp/tomcat.html
echo "Install Tomcat ${TOMCAT_VERSION}"
if [ ! -r apache-tomcat-${TOMCAT_VERSION}.tar.gz ]; then
wget http://${MIRROR_HOST}/tomcat/tomcat-7/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz
fi
tar zxvf apache-tomcat-${TOMCAT_VERSION}.tar.gz -C /var
cp -p /var/apache-tomcat-${OLD_VERSION}/bin/setenv.sh /var/apache-tomcat-${TOMCAT_VERSION}/bin
#
# find out old jar files that you put in lib yourself
#
if [ ! -r apache-tomcat-${OLD_VERSION}.tar.gz ]; then
wget http://${MIRROR_HOST}/tomcat/tomcat-7/v${OLD_VERSION}/bin/apache-tomcat-${OLD_VERSION}.tar.gz
fi
tar zxvf apache-tomcat-${OLD_VERSION}.tar.gz -C /tmp
ls -sort /tmp/apache-tomcat-${OLD_VERSION}/lib | awk '{print $9}' > /tmp/dist.txt
ls -sort /var/apache-tomcat-${OLD_VERSION}/lib | awk '{print $9}' > /tmp/installed.txt
comm -23 /tmp/installed.txt /tmp/dist.txt > /tmp/jarlist.txt
rm -rf /tmp/apache-tomcat-${OLD_VERSION} /tmp/dist.txt /tmp/installed.txt
#
# copy old jar files into new lib directory
#
for file in `cat /tmp/jarlist.txt`
do
cp -p /var/apache-tomcat-${OLD_VERSION}/lib/${file} /var/apache-tomcat-${TOMCAT_VERSION}/lib
done
rm -rf /tmp/jarlist.txt
#
# modify web.xml for production use
#
cp -rf /var/apache-tomcat-${TOMCAT_VERSION}/conf/web.xml ${WORKER_ROOT}/worker1/conf/web.xml
sed -i -e "240a\ <init-param>\n <param-name>genStringAsCharArray</param-name>\n <param-value>true</param-value>\n </init-param>" \
-e "240a\ <init-param>\n <param-name>trimSpaces</param-name>\n <param-value>true</param-value>\n </init-param>" ${WORKER_ROOT}/worker1/conf/web.xml
chown tomcat:tomcat /var/robust/worker1/conf/web.xml
cp -rf ${WORKER_ROOT}/worker1/conf/web.xml ${WORKER_ROOT}/worker2/conf/web.xml
#
# restart httpd and tomcat server
#
/etc/init.d/httpd stop
/etc/init.d/tomcat stop
rm -rf ${CATALINA_HOME}
ln -s /var/apache-tomcat-${TOMCAT_VERSION} ${CATALINA_HOME}
/etc/init.d/tomcat start
/etc/init.d/httpd start
|
 |
|
|
This is the update of http://www.andowson.com/posts/list/315.page. Read it for the idea behind.
#!/bin/bash
# Name: Apache 2.2.x && Tomcat 7.0.x auto installer for CentOS 5.x
# Author: Andowson Chang (andowson [at] gmail [dot] com)
# Version: 5.14
# Last Modified: 2011-07-27
# Source: http://www.andowson.com
#
# Assumption:
# * JDK must be installed on /usr/java
# * run this script as root user
#
# This program will
# 1.install httpd and mod_ssl
# 2.modify /etc/http/conf/httpd.conf
# 3.generate SSL key and a self-signed certificate
# 4.modify /etc/http/conf.d/ssl.conf
# 5.check for the lastest stable version of Tomcat 7.0.x
# 6.download apache-tomcat-7.0.x.tar.gz
# 7.unpack it into /var/apache-tomcat-7.0.x
# 8.make a symbolic link /var/tomcat7 to the above directory for easy upgrade
# to a later version
# 9.check memory size to determine some JVM parameters
# 10.check for the latest stable verion of Tomcat Connector 1.2.x
# 11.download tomcat-connectors-1.2.x-src.tar.gz
# 12.unpack it
# 13.configure, make and make install
# 14.create user tomcat with home directory /var/tomcat7
# 15.make two instances of tomcat for load balancing, here I put them under
# /var/robust/worker[1,2] for easy to backup all of them.
# 16.setup default host directory(for testing)
# 17.generate server.xml
# 18.generate tomcat-users.xml
# 19.modify web.xml for production use
# 20.generate mod_jk.conf
# 21.generate workers.properties
# 22.generate uriworkermap.properties
# 23.generate tomcat startup script
# 24.modify web.xml for cluster test
# 25.generate clustertest.jsp for cluster test
# 26.generate cleanup.sh for easy to uninstall everything
#
# intranet workaround
# If your server doesn't have direct access to the Internet, ie. in the company
# intranet behind a firewall, you can modify your server's proxy setting by edit
# /etc/wgetrc:
#http_proxy = http://proxy.yourcompany.com:8080/
#use_proxy = on
# If you still can't use proxy then you have to download all the files manually.
# After download, copy them into ${SETUP_DIR}. And then change the following
# default version number to the correct number you have downloaded.
#
TOMCAT_VERSION=7.0.19
TOMCAT_CONNECTOR_VERSION=1.2.32
#
# auto detect ip and hostname
#
ip=`/sbin/ifconfig|grep "inet addr"|awk '{print $2}'|cut -d":" -f2|head -1`
hostname=`/bin/hostname -f`
#
# adjustable parameters, you can modify any of them to fit your own need
#
DOMAIN=`/bin/hostname -d`
COUNTRY=TW
STATE=Taiwan
LOCATION=Taipei
COMPANY="Andowson Ltd."
ORGANIZATION=
HOSTNAME=${hostname}
hostname=${ip}
MIRROR_HOST=apache.ntu.edu.tw
CATALINA_HOME=/var/tomcat7
WORKER_ROOT=/var/robust
WEBAPP_ROOT=/var/webapps
SETUP_DIR=/root/setup/web
#
# create the setup directory
#
mkdir -p ${SETUP_DIR}
cd ${SETUP_DIR}
echo '/etc/init.d/tomcat stop' > ${SETUP_DIR}/cleanup.sh
echo '/etc/init.d/httpd stop' >> ${SETUP_DIR}/cleanup.sh
#
# install httpd and mod_ssl
#
yum -y install httpd mod_ssl
cp -p /etc/httpd/conf/httpd.conf /tmp/httpd.conf
cp -p /etc/httpd/conf.d/ssl.conf /tmp/ssl.conf
#
# modify httpd.conf
#
sed -i -e "44c\ServerTokens ProductOnly" \
-e "74c\KeepAlive On" \
-e "232c\Group tomcat" \
-e "251c\ServerAdmin webmaster@${DOMAIN}" \
-e "265a\ServerName 127.0.0.1:80" \
-e "281a\VirtualDocumentRoot /var/webapps/%0" \
-e "391c\DirectoryIndex sorry.html index.html index.htm default.html default.htm index.html.var index.jsp" \
-e '488a\LogFormat "%V %h %l %u %t \\"%r\\" %>s %b" vcommon' \
-e '488a\LogFormat "%V %h %l %u %t \\"%r\\" %>s %b \\"%{Referer}i\\" \\"%{User-Agent}i\\"" vcombined' \
-e '492c\LogFormat "%h %l %u %t \\"%r\\" %>s %b \\"%{Referer}i\\" \\"%{User-Agent}i\\" %I %O" combinedio' \
-e "514c\CustomLog logs/access_log combinedio\nCustomLog logs/vhost.log vcombined" \
-e "524c\ServerSignature Off" \
-e "731c\LanguagePriority zh-TW en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN" \
-e "954a\<Location />" \
-e "954a\ # Insert filter" \
-e "954a\ SetOutputFilter DEFLATE\n" \
-e "954a\ # Netscape 4.x has some problems..." \
-e "954a\ BrowserMatch ^Mozilla/4 gzip-only-text/html\n" \
-e "954a\ # Netscape 4.06-4.08 have some more problems" \
-e '954a\ BrowserMatch ^Mozilla/4\\.0[678] no-gzip\n' \
-e "954a\ # MSIE masquerades as Netscape, but it is fine" \
-e '954a\ # BrowserMatch \\bMSIE \!no-gzip \!gzip-only-text/html\n' \
-e "954a\ # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48" \
-e "954a\ # the above regex won't work. You can use the following" \
-e "954a\ # workaround to get the desired effect:" \
-e '954a\ BrowserMatch \\bMSI[E] \!no-gzip \!gzip-only-text/html\n' \
-e "954a\ # Don't compress images" \
-e '954a\ SetEnvIfNoCase Request_URI \\.(?:gif|jpe?g|png)$ no-gzip dont-vary\n' \
-e "954a\ # Make sure proxies don't deliver the wrong content" \
-e "954a\ Header append Vary User-Agent env=\!dont-vary" \
-e "954a\</Location>\n" \
-e "954a\RewriteEngine on" \
-e "954a\RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)" \
-e "954a\RewriteRule .* - [F]\n" /etc/httpd/conf/httpd.conf
echo 'cp -p /tmp/httpd.conf /etc/httpd/conf/httpd.conf' >> ${SETUP_DIR}/cleanup.sh
#
# generate SSL key and cert
#
openssl genrsa -out /etc/pki/tls/private/${HOSTNAME}.key 2048
openssl req -new -key /etc/pki/tls/private/${HOSTNAME}.key -out /etc/pki/tls/certs/${HOSTNAME}.csr -subj "/C=${COUNTRY}/ST=${STATE}/L=${LOCATION}/O=${COMPANY}/OU=${ORGANIZATION}/CN=${HOSTNAME}"
openssl x509 -req -days 3650 -in /etc/pki/tls/certs/${HOSTNAME}.csr -signkey /etc/pki/tls/private/${HOSTNAME}.key -out /etc/pki/tls/certs/${HOSTNAME}.crt
echo 'rm -rf /etc/pki/tls/private/'${HOSTNAME}'.key' >> ${SETUP_DIR}/cleanup.sh
echo 'rm -rf /etc/pki/tls/certs/'${HOSTNAME}'.csr' >> ${SETUP_DIR}/cleanup.sh
echo 'rm -rf /etc/pki/tls/certs/'${HOSTNAME}'.crt' >> ${SETUP_DIR}/cleanup.sh
#
# modify ssl.conf
#
sed -i -e "86a\JkMountFile conf/uriworkermap.properties\n" \
-e "112c\SSLCertificateFile /etc/pki/tls/certs/${HOSTNAME}.crt" \
-e "119c\SSLCertificateKeyFile /etc/pki/tls/private/${HOSTNAME}.key" /etc/httpd/conf.d/ssl.conf
echo 'cp -p /tmp/ssl.conf /etc/httpd/conf.d/ssl.conf' >> ${SETUP_DIR}/cleanup.sh
/sbin/chkconfig --level 235 httpd on
echo '/sbin/chkconfig httpd off' >> ${SETUP_DIR}/cleanup.sh
#
# check the latest stable version of Tomcat 7.0.x
#
wget http://tomcat.apache.org/whichversion.html -q -t 1 -T 5 -O /tmp/tomcat.html
if [ -s /tmp/tomcat.html ]; then
TOMCAT_VERSION=`grep "7\.0\." /tmp/tomcat.html|grep -v "7\.0\.x"|cut -d">" -f2|cut -d"<" -f1`
fi
rm -rf /tmp/tomcat.html
echo "Install Tomcat ${TOMCAT_VERSION}"
if [ ! -r apache-tomcat-${TOMCAT_VERSION}.tar.gz ]; then
wget http://${MIRROR_HOST}/tomcat/tomcat-7/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz
fi
tar zxvf apache-tomcat-${TOMCAT_VERSION}.tar.gz -C /var
ln -s /var/apache-tomcat-${TOMCAT_VERSION} ${CATALINA_HOME}
echo 'rm -rf /var/apache-tomcat-'${TOMCAT_VERSION} >> ${SETUP_DIR}/cleanup.sh
echo 'rm -rf '${CATALINA_HOME} >> ${SETUP_DIR}/cleanup.sh
#
# check memory size to determine some JVM parameters
#
mem=`cat /proc/meminfo|grep "MemTotal:"|awk '{print $2}'`
let KB=1024
let memsize=$mem/$KB
let heapsize=$memsize/2
let newsize=$heapsize/4
echo 'JAVA_HOME="/usr/java/latest"
JAVA_OPTS="-server -XX:NewSize='${newsize}'m -XX:MaxNewSize='${newsize}'m -XX:SurvivorRatio=8 -XX:MaxPermSize=128m -Xss256k -Xms'${heapsize}'m -Xmx'${heapsize}'m -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true"' > ${CATALINA_HOME}/bin/setenv.sh
chmod 755 ${CATALINA_HOME}/bin/setenv.sh
#
# check the latest stable version of Tomcat Connector 1.2.x
#
# pre-requirment
yum -y install httpd-devel apr-devel libtool automake make gcc gcc-c++
wget http://tomcat.apache.org/download-connectors.cgi -q -t 1 -T 5 -O /tmp/connector.html
if [ -s /tmp/connector.html ]; then
TOMCAT_CONNECTOR_VERSION=`grep "1\.2\." /tmp/connector.html|cut -d">" -f2|cut -d"<" -f1 |awk '{print $2}'|grep "1.2"|uniq`
fi
rm -rf /tmp/connector.html
echo "Install Tomcat Connector JK ${TOMCAT_CONNECTOR_VERSION}"
if [ ! -r tomcat-connectors-${TOMCAT_CONNECTOR_VERSION}-src.tar.gz ]; then
wget http://${MIRROR_HOST}/tomcat/tomcat-connectors/jk/tomcat-connectors-${TOMCAT_CONNECTOR_VERSION}-src.tar.gz
fi
tar zxvf tomcat-connectors-${TOMCAT_CONNECTOR_VERSION}-src.tar.gz
cd tomcat-connectors-${TOMCAT_CONNECTOR_VERSION}-src/native
./buildconf.sh
./configure --with-apxs=/usr/sbin/apxs
make
make install
cd ${SETUP_DIR}
echo 'rm -rf /etc/httpd/modules/mod_jk.so' >> ${SETUP_DIR}/cleanup.sh
#
# add user tomcat
#
/usr/sbin/groupadd -g 80 tomcat
/usr/sbin/useradd tomcat -u 80 -g tomcat -d ${CATALINA_HOME} -M
echo '/usr/sbin/userdel -r tomcat' >> ${SETUP_DIR}/cleanup.sh
#
# setup workers' directory
#
mkdir -p ${WORKER_ROOT}/worker1/logs
mkdir -p ${WORKER_ROOT}/worker1/temp
mkdir -p ${WORKER_ROOT}/worker1/work
cp -rf ${CATALINA_HOME}/conf ${WORKER_ROOT}/worker1/conf
mkdir -p ${WEBAPP_ROOT}
ln -s ${WEBAPP_ROOT} ${WORKER_ROOT}/worker1/webapps
cp -rf ${WORKER_ROOT}/worker1 ${WORKER_ROOT}/worker2
echo 'rm -rf '${WEBAPP_ROOT} >> ${SETUP_DIR}/cleanup.sh
#
# setup default host directory
#
mkdir -p ${WEBAPP_ROOT}/${hostname}
cp -rf ${CATALINA_HOME}/webapps/ROOT/* ${WEBAPP_ROOT}/${hostname}/.
mkdir -p ${WORKER_ROOT}/worker1/conf/Catalina/${hostname}
mkdir -p ${WORKER_ROOT}/worker2/conf/Catalina/${hostname}
cp -rf ${CATALINA_HOME}/webapps/host-manager/manager.xml ${WORKER_ROOT}/worker1/conf/Catalina/${hostname}
cp -rf ${CATALINA_HOME}/webapps/host-manager/manager.xml ${WORKER_ROOT}/worker2/conf/Catalina/${hostname}
#
# generate server.xml
#
echo '<?xml version="1.0" encoding="utf-8"?>
<Server port="workerPort" shutdown="shutdownCode">
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<GlobalNamingResources>
<!-- Used by Manager webapp -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<!-- Define an AJP 1.3 Connector on port ajpPort -->
<Connector port="ajpPort" address="127.0.0.1"
enableLookups="false" maxThreads="1000" connectionTimeout="3000"
protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="mydomain" jvmRoute="workerNo">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
' > /tmp/server.header.template
sed -e "s/workerPort/8105/g" -e "s/shutdownCode/`head -1024c /dev/urandom | md5sum | cut -d " " -f1`/g" -e "s/ajpPort/8109/g" -e "s/workerNo/worker1/g" -e "s/mydomain/${hostname}/g" /tmp/server.header.template > ${WORKER_ROOT}/worker1/conf/server.header
sed -e "s/workerPort/8205/g" -e "s/shutdownCode/`head -1024c /dev/urandom | md5sum | cut -d " " -f1`/g" -e "s/ajpPort/8209/g" -e "s/workerNo/worker2/g" -e "s/mydomain/${hostname}/g" /tmp/server.header.template > ${WORKER_ROOT}/worker2/conf/server.header
rm -rf /tmp/server.header.template
echo ' <Host name="'${hostname}'" appBase="webapps/'${hostname}'"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="'${hostname}'_access_log." suffix=".txt"
pattern="combined" resolveHosts="false"/>
<Context path="" docBase="" reloadable="false" />
</Host>' > ${WORKER_ROOT}/worker1/conf/server.host
cp -rf ${WORKER_ROOT}/worker1/conf/server.host ${WORKER_ROOT}/worker2/conf/server.host
echo ' </Engine>
</Service>
</Server>' > ${WORKER_ROOT}/worker1/conf/server.footer
cp -rf ${WORKER_ROOT}/worker1/conf/server.footer ${WORKER_ROOT}/worker2/conf/server.footer
cd ${WORKER_ROOT}/worker1/conf
cat server.header server.host server.footer > server.xml
cd ${WORKER_ROOT}/worker2/conf
cat server.header server.host server.footer > server.xml
#
# generate tomcat-users.xml
#
MANAGER_PASSWORD=`head -1024c /dev/urandom | md5sum | cut -d " " -f1 | awk '{print substr($1,1,8)}'`
echo '<?xml version="1.0" encoding="utf-8"?>
<tomcat-users>
<role rolename="manager-gui"/>
<user username="manager" password="'${MANAGER_PASSWORD}'" roles="manager-gui"/>
</tomcat-users>' > ${WORKER_ROOT}/worker1/conf/tomcat-users.xml
echo
echo "Your Tomcat Manager's login is 'manager', password is '${MANAGER_PASSWORD}'"
echo
cp -rf ${WORKER_ROOT}/worker1/conf/tomcat-users.xml ${WORKER_ROOT}/worker2/conf/tomcat-users.xml
#
# modify web.xml for production use
#
sed -i -e "240a\ <init-param>\n <param-name>genStringAsCharArray</param-name>\n <param-value>true</param-value>\n </init-param>" \
-e "240a\ <init-param>\n <param-name>trimSpaces</param-name>\n <param-value>true</param-value>\n </init-param>" ${WORKER_ROOT}/worker1/conf/web.xml
cp -rf ${WORKER_ROOT}/worker1/conf/web.xml ${WORKER_ROOT}/worker2/conf/web.xml
chmod 600 ${WORKER_ROOT}/worker*/conf/server.*
chmod 600 ${WORKER_ROOT}/worker*/conf/tomcat-users.xml
chown -R tomcat:tomcat ${WORKER_ROOT}
#
# generate mod_jk.conf
#
echo 'LoadModule jk_module modules/mod_jk.so
JkWorkersFile /etc/httpd/conf/workers.properties
JkShmFile logs/jk-runtime-status
JkLogFile "|/usr/sbin/rotatelogs /var/log/httpd/mod_jk.log 86400"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkRequestLogFormat "%w %V %T"
LogFormat "%h %l %u %t \"%r\" %>s %b %{JK_WORKER_NAME}n %{JK_LB_FIRST_NAME}n %{JK_LB_FIRST_BUSY}n %{JK_LB_LAST_NAME}n %{JK_LB_LAST_BUSY}n" mod_jk_log
CustomLog logs/worker_access_log mod_jk_log
# Load mount points
JkMountFile conf/uriworkermap.properties
# Deny direct access to WEB-INF
<LocationMatch ".*WEB-INF.*">
deny from all
</LocationMatch>' > /etc/httpd/conf.d/mod_jk.conf
echo 'rm -rf /etc/httpd/conf.d/mod_jk.conf' >> ${SETUP_DIR}/cleanup.sh
#
# generate workers.properties
#
echo '# workers.properties - ajp13
#
# List workers
#
worker.list=loadbalancer, jkstatus
#
# Define worker1
#
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8109
worker.worker1.socket_timeout=1200
worker.worker1.connection_pool_size=1
worker.worker1.connection_pool_timeout=1300
worker.worker1.lbfactor=1
# Define prefered failover node for worker1
worker.worker1.redirect=worker2
#
# Define worker2
#
worker.worker2.type=ajp13
worker.worker2.host=localhost
worker.worker2.port=8209
worker.worker2.socket_timeout=1200
worker.worker2.connection_pool_size=1
worker.worker2.connection_pool_timeout=1300
worker.worker2.lbfactor=1
# Disable worker2 for all requests except failover
worker.worker2.activation=d
#
# Defining a load balancer
#
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=worker1, worker2
#
# Define status worker
#
worker.jkstatus.type=status' > /etc/httpd/conf/workers.properties
echo 'rm -rf /etc/httpd/conf/workers.properties' >> ${SETUP_DIR}/cleanup.sh
#
# generate uriworkermap.properties
#
echo '/jkmanager/*=jkstatus
/*.jsp=loadbalancer
/*.page=loadbalancer
/servlet/*=loadbalancer
/manager/*=loadbalancer' > /etc/httpd/conf/uriworkermap.properties
echo 'rm -rf /etc/httpd/conf/uriworkermap.properties' >> ${SETUP_DIR}/cleanup.sh
#
# generate tomcat startup script
#
echo '#!/bin/sh
#
# tomcat Startup script for Tomcat, the Apache Servlet Engine
#
# chkconfig: - 84 16
# description: Tomcat Servlet Engine
# processname: tomcat
# pidfile: /var/run/worker1.pid /var/run/worker2.pid
# Source function library.
. /etc/rc.d/init.d/functions
# User under which tomcat will run
TOMCAT_USER=tomcat
RETVAL=0
CATALINA_HOME='${CATALINA_HOME}'
WORKER_ROOT='${WORKER_ROOT}'
WORKER_LIST=( worker1 worker2 )
WORKER_PORT=( 8105 8205 )
# start, debug, stop, and status functions
start() {
i=$1
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
if [ $SHUTDOWN_PORT -ne 0 ]; then
echo "Tomcat ${WORKER_LIST[i]} already started"
else
echo "Starting tomcat ${WORKER_LIST[i]}..."
CATALINA_BASE="$WORKER_ROOT/${WORKER_LIST[i]}"
su -l $TOMCAT_USER -c "export CATALINA_BASE=$CATALINA_BASE; $CATALINA_HOME/bin/startup.sh"
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
while [ $SHUTDOWN_PORT -eq 0 ]; do
sleep 5
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
done
echo "Tomcat ${WORKER_LIST[i]} started in normal mode"
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/${WORKER_LIST[i]} /var/run/${WORKER_LIST[i]}.pid
fi
}
debug() {
i=$1
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
if [ $SHUTDOWN_PORT -ne 0 ]; then
echo "Tomcat ${WORKER_LIST[i]} already started"
else
echo "Starting tomcat ${WORKER_LIST[i]} in debug mode..."
CATALINA_BASE="$WORKER_ROOT/${WORKER_LIST[i]}"
rm -rf $CATALINA_BASE/work/*
chown -R $TOMCAT_USER:$TOMCAT_USER $CATALINA_HOME
chown -R $TOMCAT_USER:$TOMCAT_USER $WORKER_ROOT
su -l $TOMCAT_USER -c "export CATALINA_BASE=$CATALINA_BASE; $CATALINA_HOME/bin/catalina.sh jpda start"
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
while [ $SHUTDOWN_PORT -eq 0 ]; do
sleep 5
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
done
echo "Tomcat ${WORKER_LIST[i]} started in debug mode"
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/${WORKER_LIST[i]} /var/run/${WORKER_LIST[i]}.pid
fi
}
stop() {
i=$1
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
if [ $SHUTDOWN_PORT -eq 0 ]; then
echo "Tomcat ${WORKER_LIST[i]} already stopped"
else
echo "Stopping tomcat ${WORKER_LIST[i]} ..."
CATALINA_BASE="$WORKER_ROOT/${WORKER_LIST[i]}"
su -l $TOMCAT_USER -c "export CATALINA_BASE=$CATALINA_BASE; $CATALINA_HOME/bin/shutdown.sh"
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
while [ $SHUTDOWN_PORT -ne 0 ]; do
sleep 5
PROCESS_COUNT=`ps -ef|grep ${WORKER_LIST[i]}|grep -v grep|wc -l`
if [ $PROCESS_COUNT -ne 0 ]; then
kill -9 `ps -ef|grep ${WORKER_LIST[i]}|grep -v grep|awk '\'{print \$2}\''`
fi
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
done
echo "Tomcat ${WORKER_LIST[i]} stopped"
RETVAL=$?
[ $RETVAL=0 ] && rm -f /var/lock/subsys/${WORKER_LIST[i]} /var/run/${WORKER_LIST[i]}.pid
fi
}
status() {
for (( i = 0 ; i < ${#WORKER_LIST[@]} ; i++ ))
do
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep ${WORKER_PORT[i]}|wc -l`
if [ $SHUTDOWN_PORT -eq 0 ]; then
echo "Tomcat ${WORKER_LIST[i]} stopped"
else
MODE="normal"
JPDA_PORT=`netstat -vatn|grep LISTEN|grep 8000|wc -l`
if [ $JPDA_PORT -ne 0 ]; then
MODE="debug"
fi
echo "Tomcat ${WORKER_LIST[i]} running in $MODE mode"
fi
done
}
case "$1" in
start)
start 0
start 1
;;
debug)
debug 0
debug 1
;;
stop)
stop 0
stop 1
;;
restart)
stop 0
start 0
stop 1
start 1
;;
redebug)
stop 0
debug 0
stop 1
debug 1
;;
status)
status
;;
*)
echo "Usage: $0 {start|debug|stop|restart|redebug|status}"
exit 1
esac
exit $RETVAL' > /etc/rc.d/init.d/tomcat
chmod 755 /etc/rc.d/init.d/tomcat
/sbin/chkconfig --add tomcat
/sbin/chkconfig --level 235 tomcat on
echo '/sbin/chkconfig tomcat off' >> ${SETUP_DIR}/cleanup.sh
echo '/sbin/chkconfig --del tomcat' >> ${SETUP_DIR}/cleanup.sh
echo 'rm -rf /etc/rc.d/init.d/tomcat' >> ${SETUP_DIR}/cleanup.sh
chmod 755 ${SETUP_DIR}/cleanup.sh
echo 'Tomcat installation is completed!'
echo
echo 'You can type "/etc/init.d/tomcat start" to start using tomcat now.'
echo 'You can type "/etc/init.d/httpd start" to start using apache now.'
echo 'Open a browser, and go to http://'${hostname}' to see it.'
#
# modify web.xml for cluster test
#
sed -i -e "26a\ <distributable/>" ${WEBAPP_ROOT}/${hostname}/WEB-INF/web.xml
#
# generate clustertest.jsp for cluster test
#
echo '<%@ page contentType="text/html; charset=UTF-8" import="java.util.*"%>
<html>
<head>
<title>Cluster Session Replication Test</title>
</head>
<body>
<%
out.println("Session ID=" + session.getId() + "<br>");
String key = request.getParameter("key");
if (key != null && key.length() > 0) {
String value = request.getParameter("value");
session.setAttribute(key, value);
}
out.println("<b>Session Listing</b><br>");
Enumeration e = session.getAttributeNames();
while (e.hasMoreElements()) {
String name = (String) e.nextElement();
String value = (String)session.getAttribute(name);
out.println(name + " = " + value + "<br>");
}
%>
<form method="post">
key:<input type="text" size="20" name="key">
value:<input type="text" size="20" name="value">
<input type="submit">
</form>
</body>
</html>' > ${WEBAPP_ROOT}/${hostname}/clustertest.jsp
Reference:
http://www.andowson.com/posts/list/315.page
http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html
http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html
|
 |
|
|
CentOS 5.5支援到PostgreSQL 8.4資料庫,先前的資料庫版本是8.1,由於只能有一版存在,必須移除舊版才行,整個升級過程大致如下:
1.建立備份用的目錄
# mkdir /pgbak
# chown postgres:postgres /pgbak/
2.備份舊的資料
# su - postgres
$ pg_dumpall --globals-only > /pgbak/globals.sql
$ psql -l
$ pg_dump --create --oids --format=c --verbose --file=/pgbak/dbX dbX
$ exit
dbX就是您資料庫的名稱(用psql -l指令可以找出有哪些資料庫)
3.停止PostgreSQL資料庫服務
# /etc/init.d/postgresql stop
4.將舊的目錄備份起來
# mv /var/lib/pgsql/data /pgbak
5.移除舊的postgresql 8.1套件
# yum remove postgresql*
(  注意相關性會移除httpd, mod_ssl等)
6.安裝新的postgresql84套件
# yum install postgresql84-server
7.初始資料庫
service postgresql initdb
8.啟動資料庫
# chkconfig postgresql on
# service postgresql start
9.復原資料
# su - postgres
$ psql -f /pgbak/globals.sql
$ pg_restore --create -d postgres /pgbak/dbX
$ exit
10.參考/pgbak/data目錄下的檔案,修改/var/lib/pgsql/data/postgresql.conf和pg_hba.conf等設定檔
再重新啟動一次postgresql
#service postgresql restart
11.安裝回被移除的套件
# yum install httpd mod_ssl
12.使用備份的設定檔
# mv /etc/httpd/conf/httpd.conf /tmp/.
# mv /etc/httpd/conf/httpd.conf.rpmsave /etc/httpd/conf/httpd.conf
# mv /etc/httpd/conf.d/proxy_ajp.conf /tmp/.
# mv /etc/httpd/conf.d/proxy_ajp.conf.rpmsave /etc/httpd/conf.d/proxy_ajp.conf
# mv /etc/httpd/conf.d/ssl.conf /tmp/.
# mv /etc/httpd/conf.d/ssl.conf.rpmsave /etc/httpd/conf.d/ssl.conf
參考資料:
http://blog.lystor.org.ua/2010/05/upgrading-postgresql-81-to-84-centos-55.html
http://www.postgresonline.com/journal/archives/144-An-almost-idiots-guide-to-Install-and-Upgrade-to-PostgreSQL-8.4-with-Yum.html
|
 |
|
|
今天下午將本站的應用伺服器由Tomcat 6.0.32升版至Tomcat 7.0.11,目前運作大致順利,如有發現任何問題,請再回報,謝謝!
|
 |
|
|