以 Linux(centos7) 操做系統爲例centos
1. 取得 scws-1.2.3 的代碼
wget http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2centos7
2. 解開壓縮包
[hightman@d1 ~]$ tar xvjf scws-1.2.3.tar.bz2操作系統
3. 進入目錄執行配置腳本和編譯
[hightman@d1 ~]$ cd scws-1.2.3[hightman@d1 ~/scws-1.2.3]$ ./configure --prefix=/usr/local/scws ; make ; make install.net
注:這裏和通用的 GNU 軟件安裝方式同樣,具體選項參數執行 ./configure --help 查看。
經常使用選項爲:--prefix=<scws的安裝目錄>htm
4. 順利的話已經編譯並安裝成功到 /usr/local/scws 中了,執行下面命令看看文件是否存在
[hightman@d1 ~/scws-1.2.3]$ ls -al /usr/local/scws/lib/libscws.laget
5. 試試執行 scws-cli 文件
[hightman@d1 ~/scws-1.2.3]$ /usr/local/scws/bin/scws -h
scws (scws-cli/1.2.3)
Simple Chinese Word Segmentation - Command line usage.
Copyright (C)2007 by hightman.
...
io