Hello Everybody,
Today, I will explain, briefly, how to install and run Webalizer and how to configure apache for webalizer at the same machine box. First download the source code from following address: http://www.webalizer.org/download.html (Download .tgz file). Then go to the location of this file (.tgz)and run following commands:
1. yum install gcc libpng libpng-devel gd gd-devel zlib zlib-devel
2. tar xvzf webalizer-2.23-05-src.tgz
3. cd webalizer-2.23-05
4. ./configure --prefix=/webalizer ------> Here you can specify the destination of installation. You change to somewhere else.
5. make
6. make install
7. cp /webalizer/etc/webalizer.conf.sample /webalizer/etc/webalizer.conf ----> Change to your path if you already changed it.
8. vi /webalizer/etc/webalizer.conf ------> Uncomment and change the following lines(don't forget to change the path to your path):
LogFile /apa2/logs/access_log
OutputDir /apa2/usage
HistoryName /webalizer/webalizer.hist
Incremental yes
IncrementalName /webalizer/webalizer.current
Quiet yes
FoldSeqErr yes
HideURL *.gif
HideURL *.GIF
HideURL *.jpg
HideURL *.JPG
HideURL *.png
HideURL *.PNG
HideURL *.ra
9. mkdir /apa2/usage ------> change the /apa2 to the location of your Server root.
10. vi /apa2/conf/httpd.conf ------> change the path to the location of your httpd.conf
11. Add the following lines to your httpd.conf ------> change the /apa2 to the location of your Server root.
<IfModule mod_alias.c>
Alias /usage/ "/apa2/usage/"
<Directory "/apa2/usage">
Options None
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>
</IfModule>
12. Restart apache: ------> change the /apa2 to the location of your Server root.
/apa2/bin/apachectl restart
13. To run Webalizer manually, to generate reports, use the following command:
/webalizer/bin/webalizer ------> Change /webalizer/ to the location of your Webalizer. For example, if you installed Webalizer in /abc, just change it to /abc/bin/webalizer
Now, whenever you want to get the new report, you should do the step 13 manually. To run this command automatically, use cron job.
14. To see the result, open the browser and enter the following url:
http://127.0.0.1/usage/
Now, you should see the result on the browser. For any question, please leave a comment. I will try to answer as soon as possible.
Regards,
Khosro Taraghi
Thursday, September 29, 2011
Saturday, September 24, 2011
How To Start sshd Service in CYGWIN
Hello All,
Today, I want to explain that how you can start the sshd service in cygwin. First, You should download the installation file from www.cygwin.com for windows. During the installation, you must expand the Admin folder and select cygrunsrv. Also, you must expand Net and select openssh. After installation, open cygwin shell, and run the following commands:
Don't forget to configure your firewall in Windows.
Regards,
Khosro Taraghi
Today, I want to explain that how you can start the sshd service in cygwin. First, You should download the installation file from www.cygwin.com for windows. During the installation, you must expand the Admin folder and select cygrunsrv. Also, you must expand Net and select openssh. After installation, open cygwin shell, and run the following commands:
- ssh-host-config -y --------> This command will create necessary configuration files.
- cygrunsrv -S sshd --------> This command will run the sshd service. This is equal to "service sshd start" command.
Don't forget to configure your firewall in Windows.
Regards,
Khosro Taraghi
Subscribe to:
Posts (Atom)