Changes between Version 4 and Version 5 of waue/2010/0715
- Timestamp:
- Jul 15, 2010, 7:26:55 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
waue/2010/0715
v4 v5 15 15 * [http://ftp.twaren.net/Unix/Web/apache/nutch/ nutch 1.0 的下載位置] 16 16 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 || 20 20 21 21 = 修改程式碼 = … … 29 29 30 30 {{{ 31 cd nutch-1.0/31 cd $nutch-1.0/ 32 32 vim src/java/org/apache/nutch/analysis/NutchAnalysis.jj 33 33 }}} … … 47 47 48 48 {{{ 49 cd nutch-1.0/src/java/org/apache/nutch/analysis49 cd $nutch-1.0/src/java/org/apache/nutch/analysis 50 50 javacc -OUTPUT_DIRECTORY=./ika/ NutchAnalysis.jj 51 51 mv ./ika/* ./ ; rm -rf ./ika/ … … 54 54 * 編譯剛編出來的 NutchAnalysis.java 55 55 {{{ 56 vim nutch-1.0/src/java/org/apache/nutch/analysis/NutchAnalysis.java56 vim $nutch-1.0/src/java/org/apache/nutch/analysis/NutchAnalysis.java 57 57 }}} 58 58 … … 73 73 74 74 {{{ 75 cd nutch-1.0/75 cd $nutch-1.0/ 76 76 wget http://ik-analyzer.googlecode.com/files/IKAnalyzer3.1.6GA_AllInOne.rar 77 77 mkdir ika … … 83 83 * 修改 !NutchDocumentAnalyzer.java 程式碼 84 84 {{{ 85 cd nutch-1.0/85 cd $nutch-1.0/ 86 86 vim src/java/org/apache/nutch/analysis/NutchDocumentAnalyzer.java 87 87 }}} … … 110 110 * 修改 build.xml,在 <include name="log4j-*.jar"/> 下(約195行),加入 111 111 {{{ 112 cd nutch-1.0112 cd $nutch-1.0/ 113 113 vim build.xml 114 114 }}} … … 131 131 * 補充:我有把預設的 nutch-site.xml 以及 nutch-default.xml放進去一起打包 132 132 {{{ 133 cd nutch-1.0/build/classes133 cd $nutch-1.0/build/classes 134 134 jar cvf nutch-1.0-ika.jar . 135 135 cp nutch-1.0-ika.jar /opt/nutchez/nutch/lib/ … … 142 142 143 143 {{{ 144 cd nutch-1.0144 cd $nutch-1.0/ 145 145 sudo mv $my_nutch_dir/nutch-1.0.job $my_nutch_dir/nutch-1.0-ori.job 146 146 sudo cp build/nutch-1.0.job $my_nutch_dir/nutch-1.0-ika-waue-100715.job … … 153 153 154 154 {{{ 155 cd nutch-1.0/155 cd $nutch-1.0/ 156 156 cp lib/IKAnalyzer3.1.6GA.jar $my_nutch_dir/lib/ 157 cd /opt/nutchez/tomcat/webapps/ROOT/WEB-INF/lib158 cp nutch-1.0/build/nutch-1.0-ika.jar ./159 cp nutch-1.0/lib/IKAnalyzer3.1.6GA.jar ./157 cd $my_tomcat_dir/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 ./ 160 160 }}} 161 161