2014年4月9日 星期三

CentOS 安裝 wwwcount 計數器

CentOS 安裝 wwwcount 計數器
# cat /etc/redhat-release
CentOS release 6.5 (Final)

下載
# wget http://www.muquit.com/muquit/software/Count/Count2.6/Count2.6/download/src/wwwcount2.6.tar.gz



解壓縮
# tar zxvf wwwcount2.6.tar.gz

進入資料夾
# cd wwwcount2.6.tar.gz

看安裝說明
# ./build

# ./build --with-cgi-bin-dir=/var/www/cgi-bin --without-database
(更改安裝目錄,apache以tar安裝者用./build --all)

# ./build --install 開始安裝
...
Continue [y|n]? y
proceeding...

Now if you know what user and group id child processes of http
server use, I can change the ownership and access permission
accordigly. If you do not know, they are usually defined in the
file httpd.conf with User and Group. I suggest create a unique
user and group say httpd and set the User and Group to httpd.

*Do you know the user and group id of httpd' child process [y|n]:? y
(apache以tar安裝者回答n,使用預設值nobady)
*Enter user id of httpd's child process [no default]:? apache
*Enter group id of httpd's child process [no default]:? apache

設定
# vi /usr/local/etc/Counter/conf/count.cfg
最後增加可使用的網域
[authorized]
...
www.cnes.tcc.edu.tw
web.cnes.tcc.edu.tw
school.cnes.tcc.edu.tw

因 Selinux 不能寫入資料檔
# cd /usr/local/etc/Counter/
# chcon -R -t httpd_sys_content_t data/
# chcon -R -t httpd_sys_content_t logs/

沒有留言:

張貼留言