|
2008年2月20日
謝朓《王孫游》賞析
綠草蔓如絲①,雜樹紅英發②。無論君不歸③,君歸芳已歇④。
想要下載直接在地址欄輸入:http://www.tkk7.com/Files/ash011/wangsunyou.mp3
【注釋】①蔓:蔓延。 ②英:花。這兩句是說地上長滿了如絲的綠草,樹上開滿了各樣的紅花,已是暮春時節了。 ③無論:莫說。 ④歇:盡。這兩句是說莫說你不回來,即使回來,春天也過去了。
【賞析】
這是一首樂府詩,《樂府詩集》收入“雜曲歌辭”一類。魏晉以來,文人創作樂府詩往往有一個特點:總是圍繞著“古辭”(漢樂府)打轉轉,或擬古辭,或以古辭為引子生發開去(當然也有棄古辭于不顧而自鑄偉辭的)。這種從古辭中尋找“母題”使創作上有所依傍的作法,已形成一個程式。南朝詩人寫樂府詩雖然也依這一程式,但卻出現另一種傾向,他們有時撇開漢樂府古辭,而直接上溯到《楚辭》中去尋找“母題”。比如,南齊王融和蕭梁費昶都寫過一首《思公子》,中心題旨就是采自《楚辭·九歌》:“風颯颯兮木蕭蕭,思公子兮徒離憂。”謝朓的這首詩也屬于這種情況,其“母題”出于《楚辭·招隱士》:“王孫游兮不歸,春草生兮萋萋。”也就是說,詩人的創作靈感獲自《楚辭》,而所寫內容則完全是現實生活中的感受。在古老的“母題”之中,貫注了活生生的現實內容。
蔓,蔓延;紅英,即紅花。春天,綠草如絲,蔥蔥茸茸,蔓延大地,繪寫出一派綠的世界;各種各樣的樹上,紅花競放,絢麗奪目。綠的氛圍,紅的點染,在鮮明的對比之中,烘托出一派生機勃勃的景象。窈窕少女,目睹此景,心傷離情,不禁怦然心動,情思繾綣,不無惆悵地發出了感嘆:“無論君不歸,君歸芳已歇。”且不要說心上的人兒不回來,即使等到他回來,那絢麗的花朵早已凋謝了,那大好春光早已白白地流逝了,我那美妙的年華也早巳悄然飄去了。紅顏難久持啊!這里,詩人不主要寫少女如何急切地等待著情人,如何急不可耐,而是著重寫她對于紅花的珍惜,對于大好春色的留戀,由此描寫出她思君、戀君的春一般的情愫。如此寫來,就把主人公的心態從一般的少女懷春,從感情的傾訴和渲泄,升華到了一種對春的珍惜、對時的留戀的理性高度,滲透出一種強烈的時間意識和生命意識。這樣,從景的描繪,到情的抒發,再到理性的升華,三者水乳交融般地融匯在一起了。所以,這是一首充滿了生命意識的景、情、理俱佳的好詩。
詩雖短小,藝術風格卻頗具特色,體現了齊梁間詩歌創作雅俗結合的一種傾向。首先,從《楚辭》中生發出來的母題,顯而易見帶有文人的雅、艷色彩,暗示了它與文人文學的關系;但詩人卻用南朝樂府民歌五言四句的詩歌形式,來表現這一古老“母題”,這便將原有華貴、雍雅的色彩悄悄褪去,淡化,使之在語言風格上呈現出清思婉轉,風情搖曳的特色。其次,詩寫春的景色逗引起春的情思,因景而生情,情景相生,短章逸韻,風姿綽約,這原是南朝樂府民歌的本色,是“俗”。然而在描寫筆法上卻頗具匠心,詩人在綠的氛圍中綴以紅花的點染,巧筆對比,著意渲染,流露出文人精心構制的痕跡,表現出“雅”。雅俗結合,創為佳構。另外,詩的用韻也值得一提。詩用仄韻,短促,急切,對表現出主人公惜春、惜時的時不我待的急切心情,起到很好的作用,呈現出語淺意深、韻短情長的藝術風貌。
我本人很喜歡,聽了心里很平靜的感覺~
Tuesday October 24, 2006 5:25PM
by Don Brown in Opinion
Listen: /Files/ash011/struts2.rar
Since arriving on the scene in 2000, Apache Struts has enjoyed a very successful run, by most any standard, helping to build many, if not most, of the Java-based web applications deployed today. Its history tells of how Struts provided a solid framework to organize the mess of JSP and Servlets to make developing applications, which used mostly server-generated HTML with a touch Javascript for client-side validation, easier to develop and maintain. As time moved forward, and customer demands of web applications grew and grew, Struts 1 pretty much stayed the same, leaving more and more plumbing to the web developer.
At JavaOne 2005, several of the Struts developers (Martin Cooper, Don Brown) sat down with Rich Feit (Apache Beehive) and a few Struts users to discuss the future of Struts. We came up with the Struts Ti proposal, which described a framework that brought together a lot of good things that were developing in the web framework community. The problem is that the Struts 1 code base didn’t lend itself to drastic improvements, and its feature set was rather limited, particularly lacking in features such as Ajax, rapid development, and extensibility.
At the same JavaOne, I sat down with Jason Carreira of the OpenSymphony WebWork 2 project to discuss how we could better work together. I was interested in building on XWork, the core of their command pattern implementation, but he suggested building on WebWork 2 directly. As Rich and I worked on the first few versions of Struts Ti, we decided to take Jason’s advice. We thought it was time for a framework to address higher level application needs, and by building on the proven WebWork 2 framework, we could spend our precious spare time where we felt it would make a difference. From then on, Rich and I worked mostly with Patrick Lightbody, also a core WebWork 2 developer, and found ourselves constantly “stealing” each others ideas for our respective code bases.
Around this time, Patrick and Keith Donald of the Spring WebFlow project were kicking around an idea of a web framework to bind them all, Clarity. Clarity brought together Spring WebFlow (Keith), Struts (Ted Husted and myself), WebWork (Patrick and Jason), and Beehive (Rich) to talk about the possibility of combining efforts into one framework. Unfortunately, the devil is in the details as soon as Beehive and WebFlow were unable to make progress on merging their wizard/conversion scope features, and questions about project ownership, brand, and identity soon broke up the party.
Not wanting to lose momentum, Ted and I started discussions with Patrick and Jason on how we could better work together, and after Patrick casually suggested the idea of a merger, Ted jumped on it and the Struts/WebWork merger was born. Since Struts Ti was already based on WebWork, it wasn’t that far a leap to bring the WebWork code into the Struts project. We started the Apache Incubator process for WebWork 2 in January and graduated the WebWork 2 code, developers, and community to Apache Struts that May.
At that time, Struts was struggling with the project’s core identity, whether it was an umbrella for multiple web frameworks or not. We had Apache Shale, a web framework based off JSF, as a Struts subproject, along side Struts Action 1 (now called Struts 1) and Struts Action 2 (the graduated WebWork 2 code). Unfortunately, these subprojects were confusion to the developer and user community, accustomed to the name “Struts” referring to a single framework. After an attempt to unify the Struts Action 2 and Shale subprojects into a single Struts 2 framework, the Shale developers felt it would be better if they were their own top level project (TLP) where they are today. Struts Action 2 was soon after renamed to simply Struts 2.
Today, the Apache Struts project has two major versions of its framework, but it is one action-based framework project. WebWork continues to deliver patch releases, and will certainly continue to do so until Struts 2 goes GA or final, but all new development takes place on the Struts 2 code. For those looking for drama or a controversy in the Struts/WebWork merger story, you’ll have to look elsewhere. Both groups of developers are working happily towards a Struts 2.0 GA release, trying to combine the stability and accessibility of Struts 1 with the elegant architecture of WebWork 2. Since the initial incubation, the Struts 2 code has added major features including a plugin framework, a new API, and better Ajax tags, and as promised in the Struts Ti proposal, we won’t stop there.
I decided to write this down to help clear up where this Struts 2.0 project came from and why it includes WebWork 2 code. Mergers are tricky things and it seems even in the Open Source community, one that champions collaboration, a merger between two projects is a rarity and needs to be defended. Amusing, because you’d be hard pressed to find a Java web developer that felt there are too few web frameworks. I think the WebWork and Struts communities pulled off something special in Struts 2, and hope the merger fever catches on in the Open Source world.
偶也是第一次配這東西,參考了許多網友的帖子,可半路上出現了很多報錯,郁悶得死,
這里我把我自己最后成功的筆記分享給大家.
一 CVS服務器的安裝:
1. 查看你的操作系統上是否安裝了CVS:
#> rpm -qa|grep cvs
guile-1.8.0-8.20060831cvs
cvs-1.11.22-4
2. 建立cvs用戶組:
/usr/sbin/groupadd cvs
3 建立cvs組的cvsroot用戶和所屬的目錄:
#> /usr/sbin/useradd -g cvs -G cvs –d /cvsroot cvsroot
4 為cvsroot用戶添加密碼:
#> passwd cvsroot
密碼:cvsroot123456
5 改變 /cvsroot/ 的目錄屬性:
#> chmod –R 770 /cvsroot
6改變用戶登陸身份:
#> su cvsroot
7 開始創建單個項目:
#> cd /cvsroot
#> mkdir configuration
#>mkdir psgui
#>mkdir davinci
8 開始建立倉庫:
#> cvs –d /cvsroot/configuration init
#> cvs –d /cvsroot/psgui init
#> cvs –d /cvsroot/davinci init
#> chmod -R 770 ./configuration/ ./psgui/ ./davinci/
9建立CVS服務啟動文件,我們使用xinetd方式:
#> [Crtl]+[d] 切換到root用戶身份
#> cd /etc/xinetd.d
#> vi cvspserver
service cvspserver
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/bin/cvs
server_args = -f --allow-root=/cvsroot/configuration --allow-root=/cvsroot/psgui --allow-root=/cvsroot/davinci pserver
log_on_failure += USERID
}
注:由于xinetd的server_args長度限制,當你想運行很多的單個倉庫的時候,可以這么做:
10 加入cvs服務:
#>vi /etc/services
cvspserver 2401/tcp #pserver cvs service
cvspserver 2401/udp #pserver cvs service
已經存在了,如下:(沒有添加了)
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations
11 啟動cvs服務:
#> /etc/init.d/xinetd restart
12 檢查cvspserver服務是否已經啟動:
#> netstat -l |grep cvspserver
應該有如下結果:
tcp 0 0 *:cvspserver *:* LISTEN
已經有上面的顯示結果
二CVS服務的用戶管理:
上面我們已經建立了configuration和psgui、davinci三個CVS倉庫,下面我們分別給這三個倉庫建立cvs用戶。
13創建可以登陸cvs服務器的用戶名和密碼:
#> su cvsroot
#> vi /cvsroot/configuration/CVSROOT/passwd
yujiabo:*****:cvsroot
#>vi /cvsroot/psgui/CVSROOT/passwd
lianghuoyan:*****:cvsroot
yujiabo:*****:cvsroot
這兩個文件的意思是有yujiabo,lianghuoyan兩個cvs用戶,lianghuoyan擁有psgui的使用權限,yujiabo擁有configuration和psgui的使用權限,登陸后的權限是cvsroot權限。
注意:這里的cvs用戶和系統用戶是不同的。
14 *****為密碼,由以下文件生成:
#> vi /cvsroot/passwd.pl
#!/usr/bin/perl
srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
my $plaintext = shift;
my $crypttext = crypt ($plaintext, $salt);
print "${crypttext}
";
#>chmod a+x /cvsroot/passwd.pl
15 如果你想生成一個密碼是“123456”,則:
#> /cvsroot/passwd.pl “123456”
回車即可得到加密密碼,用其替換passwd文件中的*****
16 Ok,cvs現在已經全部安裝完成了,如果你想讓一個用戶擁有psgi的權限,你就在/cvsroot/psgui/CVSROOT/passwd中給他加入一個用戶;如果你想讓一個用戶同時具有psgui和davinci的權限,你就給/cvsroot/psgui/CVSROOT/passwd和/cvsroot/davinci/CVSROOT/passwd里給他加一個用戶名和密碼相同的用戶即可。最后,我們試用一下:
#> cvs -d :pserver:yujiabo@168.68.73.122:/cvsroot/psgui login
敲入命令回車后提示輸入yujiabo的密碼,你按照自己設置的密碼輸入,如果沒有什么錯誤信息出現就是成功了(我的機器IP地址是168.68.73.122)
客戶端測試:
用ash用戶登陸168.68.73.123
運行#
cvs -d :pserver:yujiabo@168.68.73.122:/cvsroot/configuration login
123456(輸入的密碼)
出現錯誤:2401 failed: No route to host
客戶端連接不上,放開服務器防火墻2401端口,方法如下:
在168.68.73.122用root登陸后,運行#system-config-securitylevel
選擇“定制”,其它端口處輸入:2401,然后“確定”設置。
現在客戶端可以連接了。
Windows下的客戶端軟件WinCvs1.3配置如下:
CVSROOT
認證方式:pserver
路徑:/cvsroot/configuration
用戶名:yujiabo
CVSROOT:yujiabo@168.68.73.122:/cvsroot/configuration
安裝好TestLink 和Mantis后,所有配置好以后,發現測試相關的BUG標題中文是亂碼,網上找了若干文章沒有解決,自己摸索出一下方法。
Mantis版本: 1.1.0(RC2)
TestLink版本:1.7.1
PHP版本:5.2.5
MySQL版本:5.0.22
需要修改TestLink的文件:lib\bugtracking\int_mantis.php
function getBugSummaryString($id)
{
if (!$this->isConnected())
return false;
//$this->m_dbConnection->aaa();
$this->m_dbConnection->exec_query("set names 'GB2312'"); //<-新增加的
$status = null;
// 20070302 - {$this->m_dbName}.mantis_bug_table -> mantis_bug_table
// Problems with MS-SQL
$query = "Select summary FROM mantis_bug_table Where id='" . $id."'";
$result = $this->m_dbConnection->exec_query($query);
if ($result)
{
$summary = $this->m_dbConnection->fetch_array($result);
// 20070302 - BUGID - on MS-SQL fetch_array() does not returns numeric indexes, then
// only choice is accessing my field name (IMHO better)
if ($summary)
$summary = iconv("GB2312",TL_TPL_CHARSET,$summary['summary']);//<-修改的
else
$summary = null;
}
return $summary;
}
源文出自:http://www.joyblog.cn/article.asp?id=463
TestLink中集成Mantis bug 管理系統
相信大家在選擇測試管理工具的時候,除了Free這個重要因素之外,是否也想讓其功能更全呢?如果功能不夠全,那么就想著是否能集成其他系統的功能進而完善呢?下面要說的就是一個集成功能的運用,希望對大家有幫助。
簡述
在TestLink和bug 管理系統集成必須具備以下特點:
1. 在TestLink和bug 管理系統之間所有的信息交流都是在數據庫中完成。
2. TestLink(現在版本)既不能發信息給bug 管理系統,也不能從bug 管理系統接收信息,只是單純的調用。
在配置完成之后運行,TestLink用戶的使用步驟如下:
1. 當執行某個測試失敗。
2. 用戶點擊鏈接打開bug 管理系統,將issue提交。
3. 當issue提交完畢之后,用戶必須將bug 管理系統的issue ID記錄到TestLink。
4. 用戶返回到TestLink的測試執行頁面,將issue ID記錄到Bug問題的地方。
5. 在用戶保存執行結果之后,Testlink將顯示從Bug 管理系統獲取的數據。
環境要求示例:
l TestLink和Mantis安裝在同一臺服務器上
l Mantis的鏈接:http://168.68.73.29/mantis/
l TestLink的鏈接:http://168.68.73.29/TestLink/
l Mantis數據庫名字:mantis
l Mysql登錄名字:mantis_user
l 登錄密碼:Mantis_passwd
第一步:編輯config.inc.php
找到$g_interface_bugs='NO';
改成$g_interface_bugs='MANTIS';
第二步:在mantis上設置匿名登錄權限
l 匿名登錄的設置需要打開。
l Mantis的匿名用戶具備對所有的項目都可以瀏覽的權限。
Change the following in your mantis config_inc.php (replace dummy with your created user)
# --- anonymous login -----------
# Allow anonymous login
$g_allow_anonymous_login = ON;
$g_anonymous_account = 'dummy';
注:這個dummy用戶需要administrator在后臺添加,注冊不了的
第三步:在TestLink里配置mantis的界面參數。
你必須編輯TL_ABS_PATH/cfg/mantis.cfg.php,如下所示:
/** The DB host to use when connecting to the mantis db */
define('BUG_TRACK_DB_HOST', 'localhost');
/** The name of the database that contains the mantis tables */
define('BUG_TRACK_DB_NAME', 'manti');
/** The DB type being used by mantis
values: mysql,mssql,postgres
*/
define('BUG_TRACK_DB_TYPE', 'mysql');
/** The DB type being used by mantis */
define('BUG_TRACK_DB_USER', 'mantis_user');
/** The DB password to use for connecting to the mantis db */
define('BUG_TRACK_DB_PASS', 'mantis_passwd');
/** link to the bugtracking system, for viewing bugs */
define('BUG_TRACK_HREF', "http://168.68.73.29/mantis/view.php?id=");
/** link to the bugtracking system, for entering new bugs */
define('BUG_TRACK_ENTER_BUG_HREF'," http://168.68.73.29/mantis/");
測試配置:
首先在TestLink里面執行一條測試用例,執行之后,如果發現問題,則點擊“Create New Bug”,則打開mantis頁面,將發現的問題報告至mantis上,報告成功之后,回到TestLink,將Issue ID填寫到“Bug/Problem Report”的文本框里,然后點擊“Save Result”,這樣,Testlink就能把Mantis上的issue數據顯示在執行測試用例頁面下方了。
此外,你還可以TestLink的bug報表功能,點擊“Total Bugs For Each Test Case”,則在右邊的頁面里顯示該項目所有測試用例下的bug列表。
摘要:
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@... 閱讀全文
可惜不是java 寫的,用的php
在本機裝好兩天了,
今天一天都在用這個系統,
可是發現里面的用戶權限有些亂.
搞不清楚項目經理應該分配什么權限,
項目組員分什么權限,
項目總經理應該是什么權限來的,
中文資料也很少,在opensorce里找到英文手冊看不懂,
有個中文手冊講得不清不楚的~~~暈
看樣子要自己慢慢摸索了
去年8月份做的"房地產案件管理系統"
到現在為止,客戶那邊已經上線,
這兩天客戶反映的問題比較多,
由此,對這個項目有些感慨,現在記錄下來,
以便往后借鑒:
1 需求不穩定,從一開始,需求就沒有完全確定過,直到現在,需求還在增加或變動。
感覺現在整個系統就像在打補丁,客戶那這突然想起哪里缺了什么,就要補什么,
不會顧及系統架構,這樣子多多少少會破壞之前搭建好的系統架構.
2 我自己犯的錯,在實施過程中,發現某些需求有歧義,但未反饋給客戶確認,
自己下了結論,按自己的想法做,結果并不是客戶的意思.
3 這個是最煩人的,整個系統代碼一個月多一點就全部完成,但那時一直打電話要求客戶那邊協助測試,
因為客戶的業務很復雜,也有很多特例,系統哪里有問題,只要他們自己一用就會發現的,可那時客戶那邊
沒有專門負責這方面的人,一直都拖著,直到現在他們沒有怎么測試,就上線,發現問題較多。
要導入的需求xml文件requirement.xml內容如下:
<?xml version="1.0" encoding="gb2312"?>
<requirements>
<requirement>
<docid><![CDATA[需求001]]></docid>
<title><![CDATA[需求001標題]]></title>
<discription><![CDATA[需求001的描述]]></discription>
</requirement>
<requirement>
<docid><![CDATA[需求002]]></docid>
<title><![CDATA[需求002標題]]></title>
<discription><![CDATA[需求002的描述]]></discription>
</requirement>
<requirement>
<docid><![CDATA[需求003]></docid>
<title><![CDATA[需求003標題]]></title>
<discription><![CDATA[需求003的描述]]></discription>
</requirement>
</requirements>
但不知道什么原因,我導入時總是報錯:
"please check the file format,seems is not possible get any requirement"
這是為何,請有經驗的朋友幫我解答一下下,呵呵
操作系統: windows xp
需要安裝的軟件:
ActivePerl-5.8.8.817-MSWin32-x86-257965.msi
apache_2.2.6-win32-x86-no_ssl.msi
mysql-5.0.22-win32_Setup.exe
bugzilla-3.0.2.tar.gz
bugzilla-bundle.zip
win下搭建bugzilla確實太難了,因為本來就不是為工作在win下而設計的,bugzilla也是在最近幾個版本才加強了對win的支持。
我的環境是:
ActivePerl-5.8.8.817-MSWin32-x86-257965.msi安裝為F:\Perl目錄
mysql-5.0.22-win32_Setup.exe安裝為F:\MySQL
apache_2.2.6-win32-x86-no_ssl.msi安裝為F:\Apache2目錄
下面開始安裝:
1. 配置數據庫
打開mysql的command line client
輸入之前設置好的root密碼,創建數據庫bugs,用戶bugs,密碼為空。并賦予這個用戶一定的權限。(因為bugzilla配置文件中默認是數據庫bugs,用戶bugs,密碼為空,所以我們在這里設置好后往下進行就會較方便了。)
創建數據庫:
mysql>create database bugs;
創建用戶并賦予權限:
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES,LOCK TABLES,CREATE TEMPORARY TABLES ON bugs.* TO bugs@localhost IDENTIFIED BY '';
刷新一下:
mysql> FLUSH PRIVILEGES;
mysql的設置就完成了。
2 安裝bugzilla
將bugzilla 2.20.1文件夾所有文件全部拷貝到E:\php\bugzilla\下。在 開始-〉程序-〉運行 中輸入CMD,進入E:\php\bugzilla目錄下,運行
perl checksetup.pl 檢查bugzilla安裝所需模塊是否都已找到,默認情況下是需要安裝許多模塊的。bugzilla-bundle.zip解壓縮這個zip包,放到E:\php,打開CMD,定位到這里,運行ppm,在ppm>下依次輸入并回車:
install AppConfig.ppd
install DBI.ppd
install GD.ppd
install GDTextUtil.ppd
install MailTools.ppd
install PatchReader.ppd
install Template-Toolkit.ppd
install TimeDate.ppd
install Chart.ppd
install DBD-mysql.ppd
install GDGraph.ppd
install MIME-tools.ppd
即可安裝完所有模塊
中間可能某一個模塊會提示安裝失敗,這時請安裝完其他模塊后再重新安裝失敗的模塊
在安裝之前失敗的模塊時,請帶上路徑安裝,如:
ppm intsall http://www.brides.org/perl/ppm/PerlMagick.ppd
ppm uninstall mod_perl 將之前安裝的mod_perl卸載,
由于版本不正確,所以可能會報已經安裝了mod_perl,但還報mod_perl需要ppm install,
所以先卸載再用下面的命令重裝一次
ppm install http://theoryx5.uwinnipeg.ca/ppm/mod_perl.ppd
ppm install http://trouchelle.com/ppm/Email-MIME-Creator.ppd安裝這個時會報還有它的依賴包未安裝,
這時就用這個網址路徑安裝相應的依賴包之后,再用以上命令安裝這個包就行了.
再從命令行到E:\php\bugzilla\下運行 perl checksetup.pl,檢查是否需要的模塊都已經安裝并找到了。是的話則會在目錄下生成一個localconfig文件,這個文件是bugzilla運行時的配置文件。打開這個文件我們只需看一下用戶名和密碼那塊是否和我們在mysql中設置的一樣即可。
再次運行 perl checksetup.pl 會生成bugzilla需要的模版和數據庫中的表。
輸入exchange服務器(這個不要輸入錯誤,因為bugzilla以后很多的操作都是需要發送郵件的,比如新建一個account后初始密碼是發送到你的郵箱里的)。接著會讓你輸入管理員的郵箱地址,名字,密碼
確認輸入后即完成bugzilla的安裝了。
再次輸入perl checksetup.pl 確認數據庫已經連接正常。修改E:\php:\bugzilla\目錄下所有cgi,pl文件,將執行文件最前面的!#路徑改成perl .exe的路徑。
上一篇windowsxp 下安裝php是為了安裝TestLink而配的,
TestLink的安裝有兩種方式,一是自動安裝,二是手工安裝的方式。
我用的是自動安裝
在上篇配置好的php環境下,按如下步驟安裝TestLink
1.將TestLink文件夾拷貝到F:\phpweb目錄下。
2.在瀏覽器輸入訪問地址http://168.68.73.97/testlink/
若沒有安裝就會自動跳到http://168.68.73.97/testlink/install/index.php安裝頁
3.選擇new install,在進入的頁面中,輸入登錄MySQL的用戶名和密碼,如root,如果沒有為TestLink新建一個專用的用戶,也可以輸入初始用戶root。但是因為root權限過多,所以,建議為TestLink新建專用的用戶,并為該用戶賦予ALTER、SELECT、INSERT、UPDATE、INDEX、CREATE、DELETE和DROP權限。
3.提示安裝成功。系統為testlink創建一個默認管理員賬號,用戶名和密碼為:admin/admin。你可以使用這個賬號訪問TestLink
在自動安裝過程中,安裝程序主要做了以下事情:
1.檢查web server的參數、php配置、數據庫版本
2.創建數據庫和表,并導入初始數據
3.完成安裝
我是第一次在xp下配置php
在網上找了很多資料,按照上面的一步步配,總會在半路出現一些問題,
以下是我綜合幾個網友的資料配置成功的步驟:
操作系統:windows xp
apache_2.2.6-win32-x86-no_ssl.msi http://apache.mirror.phpchina.com/httpd/binaries/win32/apache_2.2.6-win32-x86-openssl-0.9.8e.msi
php-5.2.5-win32-installer.msi
http://cn2.php.net/distributions/php-5.2.5-win32-installer.msi
PHP 5.2.5 zip package
http://cn.php.net/get/php-5.2.5-Win32.zip/from/cn2.php.net/mirror(這里面有需要的dll文件)
mysql-5.0.22-win32_Setup.exe
http://www.mysql.com/
開始安裝
一、安裝Apache2.2.6
1 運行安裝程序 圖1
2 下一步,圖2 安裝協議
3 下一步,圖3 Apache HTTP Server的一些說明
4 下一步,圖4 填寫服務信息
Network Domain 域名 ,這里填寫 localhostServer Name 服務器名,這里填寫 localhost
Administrator‘s Email Address 管理員郵箱
5 安裝類型
選擇自定義安裝 Custom,圖5
6 自定義安裝設置,圖6
修改安裝目錄,這里我把目錄修改到F:\Apache2\圖7
7 安裝確認,圖8
8 開始安裝,圖9
安裝最后會出現幾個命令行窗口。
9 安裝完畢,圖10
10 右下角出現圖標,圖11
11 雙擊顯示服務器監控信息,圖12
12 測試,圖13
在瀏覽器地址欄輸入 http://localhost,回車顯示 “It works!”。
如圖,表示安裝成功了!
這樣 Apache就安裝完畢了。
二、安裝PHP5.2.5
1 拷貝需要的組件
解壓php-5.2.5-Win32.zip到“G:/PHPTemp”。這里主要是拷貝一些以后需要的組件。
2 運行安裝程序php-5.2.5-win32-installer.msi
3 接受 安裝協議
4 選擇安裝目錄,

選定目錄.我設置的是F:\php\
5 選擇服務器設置
6 選擇Apache配置文件目錄,按我之前的配置,這里我選的是F:\Apache2\
7 安裝設置
8 準備安裝
9 安裝完畢
10 從G:/PHPTemp拷貝libmysql.dll及ext文件夾到F:/PHP
并在F:/PHP/php.ini中修改成
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;
; ... or under UNIX:
將F:/PHP/php.ini文件拷貝到C:\WINDOWS目錄下
將F:/PHP/libmysql.dll文件拷貝到 C:\WINDOWS\system32目錄下
將F:/PHP/ext/php_mysql.dll 文件拷貝到 C:\WINDOWS\system32目錄下
將F:/PHP/ext/php_mysqli.dll文件拷貝到 C:\WINDOWS\system32目錄下
11 對Apache進行設置
在F:\下建立phpweb子目錄,即“F:/phpweb”目錄。
修改目錄F:\Apache2\conf下的文件“ httpd.conf”。
搜索DocumentRoot "F:/Apache2/htdocs"把冒號中的F:/Apache2/htdocs,替換成“F:/phpweb";
搜索<Directory "F:/Apache2/htdocs"> 把冒號中的F:/Apache2/htdocs,替換成“F:/phpweb";
上面這兩行可以不改,那么以后添加的論壇程序就要放在f:/Apache2/htdocs下面,就是以這個目錄作為根目錄。改的目的就是不想把所有網站程序都放在Apache的目錄下面。
搜索DirectoryIndex index.html 增加為DirectoryIndex index.html index.php
上面這句為了能夠運行缺省的頁面,這里增加了 index.php作為缺省頁面。
修改完畢,保存,并重新啟動Apache服務器,也許會啟動不成功,這時要不按Ctrl+Alt+Del刪除Apache相關程序,要不重新啟動計算機。
12 測試
在“f:/phpweb”目錄中,創建文件 test.php
<html>
<head>
<title>PHP Tes</title>
</head>
<body>
<?php echo "<p>Hello World</p>"; ?>
</body>
</html>
在瀏覽器地址欄中輸入 http://localhost/test.php,顯示如下,
顯示:
Hello World
那么你安裝Apache和PHP成功了。
最近網站總是打開太慢,到后來干脆就不能打開了,
進到服務器重啟tomcat服務時,竟然報了jvm內存設置太大
ps一看,發現了很多mysqld進程,
占內存,也占了很多CPU,
我是用的二進制包安裝的mysql,網上一查,有很多朋友說,這屬正常,
可我擔心過幾天服務器還會出現同樣的問題,怎么辦
看了apache+iis+tomcat可以讓asp,jsp同時跑,
不知道再加個.net,php,cgi的項目站點,
又該怎么配置呢?
${sessionScope.user}
這是我在<sturts2權威指南>里看見的語法
說是jsp2.0的語法, 我用jsp這么久怎么不知道有這樣的語法?
難道jsp1升級到jsp2后,語法也有改變嗎?
sturts1升級到struts2后就有很大不同,
版本升級這么快,感覺自己要是不勤加學習,真的太容易被淘汰掉了.
現在還處于自學struts2階段,所以很多文章都是從網上轉了網友的, 呵呵,
看見好的文章就想自己收藏一份,以備忘.
原文出處:http://bbs.8isp.cn/simple/index.php?t1002.html
struts.action.extension
The URL extension to use to determine if the request is meant for a Struts action
用URL擴展名來確定是否這個請求是被用作Struts action,其實也就是設置 action的后綴,例如login.do的'do'字。
struts.configuration
The org.apache.struts2.config.Configuration implementation class
org.apache.struts2.config.Configuration接口名
struts.configuration.files
A list of configuration files automatically loaded by Struts
struts自動加載的一個配置文件列表
struts.configuration.xml.reload
Whether to reload the XML configuration or not
是否加載xml配置(true,false)
struts.continuations.package
The package containing actions that use Rife continuations
含有actions的完整連續的package名稱
struts.custom.i18n.resources
Location of additional localization properties files to load
加載附加的國際化屬性文件(不包含.properties后綴)
struts.custom.properties
Location of additional configuration properties files to load
加載附加的配置文件的位置
struts.devMode
Whether Struts is in development mode or not
是否為struts開發模式
struts.dispatcher.parametersWorkaround
Whether to use a Servlet request parameter workaround necessary for some versions of WebLogic
(某些版本的weblogic專用)是否使用一個servlet請求參數工作區(PARAMETERSWORKAROUND)
struts.enable.DynamicMethodInvocation
Allows one to disable dynamic method invocation from the URL
允許動態方法調用
struts.freemarker.manager.classname
The org.apache.struts2.views.freemarker.FreemarkerManager implementation class
org.apache.struts2.views.freemarker.FreemarkerManager接口名
struts.i18n.encoding
The encoding to use for localization messages
國際化信息內碼
struts.i18n.reload
Whether the localization messages should automatically be reloaded
是否國際化信息自動加載
struts.locale
The default locale for the Struts application
默認的國際化地區信息
struts.mapper.class
The org.apache.struts2.dispatcher.mapper.ActionMapper implementation class
org.apache.struts2.dispatcher.mapper.ActionMapper接口
struts.multipart.maxSize
The maximize size of a multipart request (file upload)
multipart請求信息的最大尺寸(文件上傳用)
struts.multipart.parser
The org.apache.struts2.dispatcher.multipart.
MultiPartRequest parser implementation for a multipart request (file upload)
專為multipart請求信息使用的org.apache.struts2.dispatcher.multipart.MultiPartRequest解析器接口(文件上傳用)
struts.multipart.saveDir
The directory to use for storing uploaded files
設置存儲上傳文件的目錄夾
struts.objectFactory
The com.opensymphony.xwork2.ObjectFactory implementation class
com.opensymphony.xwork2.ObjectFactory接口(spring)
struts.objectFactory.spring.autoWire
Whether Spring should autoWire or not
是否自動綁定Spring
struts.objectFactory.spring.useClassCache
Whether Spring should use its class cache or not
是否spring應該使用自身的cache
struts.objectTypeDeterminer
The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation class
com.opensymphony.xwork2.util.ObjectTypeDeterminer接口
struts.serve.static.browserCache
If static content served by the Struts filter should set browser caching header properties or not
是否struts過濾器中提供的靜態內容應該被瀏覽器緩存在頭部屬性中
struts.serve.static
Whether the Struts filter should serve static content or not
是否struts過濾器應該提供靜態內容
struts.tag.altSyntax
Whether to use the alterative syntax for the tags or not
是否可以用替代的語法替代tags
struts.ui.templateDir
The directory containing UI templates
UI templates的目錄夾
struts.ui.theme
The default UI template theme
默認的UI template主題
struts.url.http.port
The HTTP port used by Struts URLs
設置http端口
struts.url.https.port
The HTTPS port used by Struts URLs
設置https端口
struts.url.includeParams
The default includeParams method to generate Struts URLs
在url中產生 默認的includeParams
struts.velocity.configfile
The Velocity configuration file path
velocity配置文件路徑
struts.velocity.contexts
List of Velocity context names
velocity的context列表
struts.velocity.manager.classname
org.apache.struts2.views.velocity.VelocityManager implementation class
org.apache.struts2.views.velocity.VelocityManager接口名
struts.velocity.toolboxlocation
The location of the Velocity toolbox
velocity工具盒的位置
struts.xslt.nocache
Whether or not XSLT templates should not be cached
是否XSLT模版應該被緩存
摘要: 這篇文章是從網友http://www.tkk7.com/sterning/archive/2007/09/30/149775.html轉來的,
他真是一位大好人,雖然在別的網站有很多轉走的這篇文章,但我也想在自己的BLOG上再轉一次,
理由很簡單,想自己收藏一份,感謝原創sterning
Struts作為MVC 2的Web框架,自推出以來不斷受到開發者的追捧,得到廣泛的應用。作為... 閱讀全文
從前一直用的jsp+javabean,這種模式寫東西
開發工具方面通常jsp用dreamweaver, java源程序就用eclipse3.2
服務器,像tomcat,apache也是單獨配置,數據庫mysql也是一樣,單獨配置的.
感覺很容易,就是要配置的東西比較多.但卻很少出錯,
就算出了錯,也會知道是哪個環節出錯了,這樣就容易解決得多.
現在即將有一個大點的項目,要求最好用struts做,
之前也做過struts1的例子, 就單獨struts不加spring,hibernate等,布置起來也覺得容易,
于是想著要配置一個struts+spring+hinernate環境來做開發,一開始想到的是將版本升級,
沒想到后來看了struts1與struts2還不是同一個東西,并非版本上的升級.
這些天翻了很多struts1與struts2,主要是struts2的資料看,看起來,這是一個很不錯的東西,
于是便下定心用struts2+spring2+hibernate3來做這個項目,
立馬在網上搜取這方面資料,還有實例,邊看邊配置,
沒想到,讓人頭痛的是,重配了N次實例,我配出來的工程,最后一發布,總是404錯誤,
用的myeclipse6,就是不知道哪出錯了,所有東西都集成在一起,不知道往哪查錯.
現在腦袋快冒煙了, 不知道有沒有朋友,有好的學習struts2的好辦法?
請指點一下吧
|