Test environment:
os:centos6.5
wdcp:wdcp_v2.5.10 (20140213)
php:5.3.27
After the introduction of the environment, the following is the installation steps:
The code is as follows |
Copy Code |
Cd/root #已root进入root目录 wget http://www.xunsearch.com/scws/down/scws-1.2.2.tar.bz2 #下载源码 Tar xvjf scws-1.2.2.tar.bz2 #解压源码 CD scws-1.2.2 #进入源码目录 ./configure--prefix=/usr/local/scws; make; Make install #配置, installing Cd/usr/local/scws/etc #进入scws目录 wget http://www.xunsearch.com/scws/down/scws-dict-chs-gbk.tar.bz2 #下载gbk词库 wget http://www.xunsearch.com/scws/down/scws-dict-chs-utf8.tar.bz2 #下载utf8词库 Tar xvjf scws-dict-chs-gbk.tar.bz2 #解压gbk词库 Tar xvjf scws-dict-chs-utf8.tar.bz2 #解压utf8词库 Cd/root/scws-1.2.2/phpext #进入php扩展源码目录 /www/wdlinux/apache_php-5.3.27/bin/phpize #侦测环境 (Phpize tool is in the PHP installation directory, based on this phpize corresponding to the time of the PHP environment, So to generate the corresponding configure file according to the PHP configuration, create a configure file. Must run Phpize in a directory. Then phpize knows which directory your environment is, and configure files are built in that directory. ./configure--with-php-config=/www/wdlinux/apache_php-5.3.27/bin/php-config--with-scws=/usr/local/scws #配置 Make install Configure PHP to add the following lines to the php.ini: [SCWS] ; ; Note Check that the Extension_dir setting in php.ini is correct, or set Extension_dir to null. ; Then extension = scws.so Specifies the absolute path. ; Extension =/www/wdlinux/apache_php-5.3.27/lib/php/extensions/no-debug-non-zts-20090626/scws.so #此路径编译后会显示 Scws.default.charset = UTF8 ; The last line can also be said GBK Scws.default.fpath =/usr/local/scws/etc Service httpd Restart #重启web服务器 |
If the above are correct, Chinese word scws-1.2.2 should be installed successfully. Other versions, please refer to the installation.
Finally, there may be a word in the case of PHP participle, it seems that the thesaurus did not work. After testing, it does not work, because the thesaurus does not have read and write permissions, manually set the OK.