📄 1203.html
字号:
<br>
b. 設定資料庫 (以mysql為例說明)<br>
<br>
>>cd /usr/local/resin-2.1.4/doc/thankschatx/WEB-INF/classes (進入resin程式的目錄)<br>
>>mysql -u root -p < mysql_build.sql (自動處理資料庫建檔的動作)<br>
Password: xxxx (輸入mysql root的密碼)<br>
<br>
<br>
c. 設定chat.properities<br>
<br>
>>cd /usr/local/resin-2.1.4/doc/thankschatx/WEB-INF/classes (進入resin程式的目錄)<br>
>>cp chat.properities.mysql chat.properities (將mysql的properity複製成為正式properity)<br>
>>vi chat.properities (修改檔案) <br>
<br>
修改下列兩行至正確目錄<br>
acctdir=/usr/local/resin-2.1.4/doc/thankschatx/acct/<br>
accturl=http://www.yourdomain.com/thankschatx/acct/<br>
pagedir=/usr/local/resin-2.1.4/doc/thankschatx/page/<br>
datadir=/usr/local/resin-2.1.4/doc/thankschatx/data/<br>
其他變數暫時不修改.<br>
<br>
d. 在 /usr/local/resin-2.1.4/conf/resin.conf 中, 增加紅字一行.<br>
<br>
<!--<br>
- Define applications (ServletContexts) for the examples.<br>
- Since applications are entirely separate from one another,<br>
- including session variables and servlet-mappings, the<br>
- servlet-mapping declarations need to be repeated.<br>
--><br>
<web-app id='thankschatx'/><br>
<br>
<web-app id='java_tut'/><br>
<br>
<br>
<br>
5. 測試 thankschatx<br>
請參考 Windows 測試 thankschatx 步驟.<br>
<br>
<br>
四. FreeBSD 主機安裝.<br>
<br>
※.FreeBSD為Unix系統, 除啟動支援linux模組與安裝JDK這兩個步驟外,其餘與Linux安裝步驟相同. <br>
<br>
1. 啟動支援linux<br>
可以參考 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu-lbc-install.html 資料.<br>
<br>
a.以VI編輯模式在 /etc/rc.conf 中將 linux_enable="YES" 設定好.<br>
<br>
b.以 ports 安裝linux模組<br>
>>cd /usr/ports/emulators/linux_base<br>
>>make install distclean<br>
<br>
2. 安裝 JDK<br>
可以參考 http://freebsd.sinica.edu.tw/~statue/zh-tut/java.html 資料.<br>
<br>
a.以 ports 安裝<br>
>>cd /usr/ports/java/jdk13<br>
>>make install<br>
<br>
b.修改 root 的 .bash_profile<br>
<br>
>>cd (進入root根目錄)<br>
>>vi .bash_profile (以VI修改.bash_profile檔案)<br>
<br>
加入下列資料<br>
JAVA_HOME=/usr/local/jdk13<br>
PATH=$PATH:/usr/local/jdk13/bin<br>
CLASSPATH=/usr/java/jdk13/lib/tools.jar<br>
export JAVA_HOME PATH CLASSPATH<br>
<br>
>>su - root (重新載入剛剛設的變數)<br>
>>java (測試安裝是否成功)<br>
Usage: java [-options] class [args...]<br>
(to execute a class)<br>
or java -jar [-options] jarfile [args...]<br>
(to execute a jar file)<br>
.........<br>
.........<br>
<br>
結果: 輸入 java 可以看到 java 的用法說明, 否則應重新設定此一步驟. <br>
<br>
2. 安裝 Java Servlet Server, 此處以 Resin 為例.<br>
<br>
a.至 http://www.caucho.com/download/index.xtp 下載 resin-2.1.4.tar.gz (檔名或有不同)<br>
上傳至安裝主機上執行解壓縮.<br>
<br>
>>cp resin-2.1.4.tar.gz /usr/local (複製檔案)<br>
>>cd /usr/local (進入安裝目錄)<br>
>>tar -zxf resin-2.1.4.tar.gz (解壓縮)<br>
<br>
結果: 安裝完成後應產生 /usr/local/resin-2.1.4 目錄 (目錄名或有不同).<br>
<br>
b.啟動 Resin<br>
<br>
>>cd /usr/local/resin-2.1.4/bin (進入Resin/bin目錄)<br>
>>sh httpd.sh start (啟動Resin)<br>
Resin httpd start at Thu Aug 29 11:56:14 CST 2002<br>
<br>
結果: 打開瀏覽器輸入網址 http://網址:8080/ 可以看到 resin的介紹.<br>
<br>
c.停止 Resin<br>
<br>
>>cd /usr/local/resin-2.1.4/bin<br>
>>sh httpd.sh stop (停止Resin)<br>
<br>
3. 將 Resin 與 Apache 結合(即不需透過8080 port) <br>
<br>
a.安裝mod_caucho<br>
在你解開 Resin 的目錄中已經包含了mod_caucho的原始檔,請依照下列的步驟執行安裝<br>
<br>
>>cd /usr/local/resin2.1.4 (進入Resin目錄)<br>
>>./configure -with-apache=/etc/httpd (此目錄視Apache所安裝的目錄而定)<br>
>>make (編譯)<br>
>>make install (安裝)<br>
<br>
b.設定mod_caucho<br>
開啟 /etc/httpd/conf/httpd.conf,檢查檔案最後是不是有下列的內容,如果沒有的話,請加上去<br>
<br>
<br>
LoadModule caucho_module /usr/lib/apache/mod_caucho.so<br>
AddModule mod_caucho.c<br>
<IfModule mod_caucho.c><br>
CauchoConfigFile /usr/local/resin2.1.4/conf/resin.conf<br>
</IfModule><br>
<br>
<br>
<br>
c.重新啟動Apache及Resin<br>
>>/etc/rc.d/init.d/httpd stop (停止Apache)<br>
>>/usr/local/resin2.1.4/bin/httpd.sh stop (停止Resin) <br>
>>/usr/local/resin2.1.4/bin/httpd.sh start (啟動Resin)<br>
>>/etc/rc.d/init.d/httpd start (啟動Apache)<br>
<br>
結果: 打開瀏覽器輸入網址 http://網址/examples/index.xtp, 可以看到網頁.<br>
<br>
<br>
4. 安裝thankschatx<br>
<br>
a. 將 thankschatx.zip 解壓縮並上傳至 /usr/local/resin-2.1.4/doc/ 目錄下.<br>
<br>
結果: 應有 /usr/local/resin-2.1.4/doc/thankschatx 目錄<br>
<br>
b. 設定資料庫 (以mysql為例說明)<br>
<br>
>>cd /usr/local/resin-2.1.4/doc/thankschatx/WEB-INF/classes (進入resin程式的目錄)<br>
>>mysql -u root -p < mysql_build.sql (自動處理資料庫建檔的動作)<br>
Password: xxxx (輸入mysql root的密碼)<br>
<br>
<br>
c. 設定chat.properities<br>
<br>
>>cd /usr/local/resin-2.1.4/doc/thankschatx/WEB-INF/classes (進入resin程式的目錄)<br>
>>cp chat.properities.mysql chat.properities (將mysql的properity複製成為正式properity)<br>
>>vi chat.properities (修改檔案) <br>
<br>
修改下列兩行至正確目錄<br>
acctdir=/usr/local/resin-2.1.4/doc/thankschatx/acct/<br>
accturl=http://www.yourdomain.com/thankschatx/acct/<br>
pagedir=/usr/local/resin-2.1.4/doc/thankschatx/page/<br>
datadir=/usr/local/resin-2.1.4/doc/thankschatx/data/<br>
其他變數暫時不修改.<br>
<br>
d. 在 /usr/local/resin-2.1.4/conf/resin.conf 中, 增加紅字一行.<br>
<br>
<!--<br>
- Define applications (ServletContexts) for the examples.<br>
- Since applications are entirely separate from one another,<br>
- including session variables and servlet-mappings, the<br>
- servlet-mapping declarations need to be repeated.<br>
--><br>
<web-app id='thankschatx'/><br>
<br>
<web-app id='java_tut'/><br>
<br>
<br>
<br>
5. 測試 thankschatx<br>
請參考 Windows 測試 thankschatx 步驟. <br>
<br>
<br>
<br>
<br>
<br>
<br>
</FONT><br>
</TD>
</TR>
<TR>
<TD colSpan=2><FONT
class=middlefont></FONT><BR>
<FONT
class=normalfont>全文结束</FONT> </TD>
</TR>
<TR>
<TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2
height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
<TD vAlign=top width="20%"
background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2>
<DIV align=center>
<table class=tableoutline cellspacing=1 cellpadding=4
width="100%" align=center border=0>
<tr class=firstalt>
<td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
<font class=normalfont><b>所有分类</b></font></td>
</tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td> </tr> </table></td></tr> </table>
</DIV></TD></TR>
<TR vAlign=top>
<TD width="80%">
<DIV align=center><BR>
</DIV>
</TD></TR></TBODY></TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee
border=0><TBODY>
<TR>
<TD width="50%">
<P><FONT class=middlefont>版权所有 © 2004 <A
href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
违者必究. </FONT></P>
</TD>
<TD width="50%">
<DIV align=right><FONT class=middlefont>Powered by: <A
href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
</TD></TR></TBODY></TABLE>
<CENTER></CENTER></TD></TR>
</TABLE></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -