Changes between Version 4 and Version 5 of waue/2010/0715


Ignore:
Timestamp:
Jul 15, 2010, 7:26:55 PM (14 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2010/0715

    v4 v5  
    1515 * [http://ftp.twaren.net/Unix/Web/apache/nutch/ nutch 1.0 的下載位置]
    1616
    17  || nutch-1.0/ || 你下載nutch-1.0 並解壓縮的資料夾目錄位址,也是用來重編nutch的資料夾 || 如:/home/user/nutch-1.0/ ||
    18  || my_nutch_dir || 原有的nutch資料夾,接著會被擴充ika中文詞庫 || /opt/nutchez/nutch/ ||
    19  || my_tomcat_dir || 原本被用來放nutch網頁(在tomcat內)的資料夾 || /opt/nutchez/tomcat/webapps/ROOT/ ||
     17 || $nutch-1.0/ || 你下載nutch-1.0 並解壓縮的資料夾目錄位址,也是用來重編nutch的資料夾 || 如:/home/user/nutch-1.0/ ||
     18 || $my_nutch_dir || 原有的nutch資料夾,接著會被擴充ika中文詞庫 || /opt/nutchez/nutch/ ||
     19 || $my_tomcat_dir || 原本被用來放nutch網頁(在tomcat內)的資料夾 || /opt/nutchez/tomcat ||
    2020
    2121= 修改程式碼 =
     
    2929
    3030{{{
    31 cd nutch-1.0/
     31cd $nutch-1.0/
    3232vim src/java/org/apache/nutch/analysis/NutchAnalysis.jj
    3333}}}
     
    4747
    4848{{{
    49 cd nutch-1.0/src/java/org/apache/nutch/analysis
     49cd $nutch-1.0/src/java/org/apache/nutch/analysis
    5050javacc -OUTPUT_DIRECTORY=./ika/ NutchAnalysis.jj
    5151mv ./ika/* ./ ; rm -rf ./ika/
     
    5454 * 編譯剛編出來的 NutchAnalysis.java
    5555{{{
    56 vim nutch-1.0/src/java/org/apache/nutch/analysis/NutchAnalysis.java
     56vim $nutch-1.0/src/java/org/apache/nutch/analysis/NutchAnalysis.java
    5757}}}
    5858
     
    7373
    7474{{{
    75 cd nutch-1.0/
     75cd $nutch-1.0/
    7676wget http://ik-analyzer.googlecode.com/files/IKAnalyzer3.1.6GA_AllInOne.rar
    7777mkdir ika
     
    8383 * 修改 !NutchDocumentAnalyzer.java 程式碼
    8484{{{
    85 cd nutch-1.0/
     85cd $nutch-1.0/
    8686vim src/java/org/apache/nutch/analysis/NutchDocumentAnalyzer.java
    8787}}}
     
    110110 * 修改 build.xml,在 <include name="log4j-*.jar"/> 下(約195行),加入
    111111{{{
    112 cd nutch-1.0
     112cd $nutch-1.0/
    113113vim build.xml
    114114}}}
     
    131131   * 補充:我有把預設的 nutch-site.xml 以及 nutch-default.xml放進去一起打包
    132132{{{
    133 cd nutch-1.0/build/classes
     133cd $nutch-1.0/build/classes
    134134jar cvf nutch-1.0-ika.jar .
    135135cp nutch-1.0-ika.jar /opt/nutchez/nutch/lib/
     
    142142
    143143{{{
    144 cd nutch-1.0
     144cd $nutch-1.0/
    145145sudo mv $my_nutch_dir/nutch-1.0.job $my_nutch_dir/nutch-1.0-ori.job
    146146sudo cp build/nutch-1.0.job $my_nutch_dir/nutch-1.0-ika-waue-100715.job
     
    153153
    154154{{{
    155 cd nutch-1.0/
     155cd $nutch-1.0/
    156156cp lib/IKAnalyzer3.1.6GA.jar $my_nutch_dir/lib/
    157 cd /opt/nutchez/tomcat/webapps/ROOT/WEB-INF/lib
    158 cp nutch-1.0/build/nutch-1.0-ika.jar ./
    159 cp nutch-1.0/lib/IKAnalyzer3.1.6GA.jar ./
     157cd $my_tomcat_dir/webapps/ROOT/WEB-INF/lib
     158cp $nutch-1.0/build/nutch-1.0-ika.jar ./
     159cp $nutch-1.0/lib/IKAnalyzer3.1.6GA.jar ./
    160160}}}
    161161