This article is based on a system with RedHat 7.2 and Apache 2.0.40 installed manually (not the rpm version) .We are going to user the Awstats program so we will connect to its web site to download the rpm package. http://awstats.sourceforge.net/ the version used is awstats-5.1-1.noarch.rpm We install the package with this command rpm -ivh awstats-5.1-1.noarch.rpm and we get, [root@takeshi
src]# rpm -ivh awstats-5.1-1.noarch.rpm I'll leave here a link so that we can check at any moment where are located the files in the system once we have installed the awstats package. This way we'll know where from we have to move the files. Fist thing we are going to do is to create a folder called awstats under the root folder of our web server. The root folder of our web server is defined in the Apache configuration file httpd.conf with the directive "DocumentRoot". In our case it will be /usr/local/apache/htdocs so once we have created the folder it will look like, /usr/local/apache/htdocs/awstats Now, we go to the /opt/awstats folder where the rpm has left the files and we move its contentes to the folder we just have created mv /opt/awstats/* /usr/local/apache/htdocs/awstats Then we have copy a number of files and folders to the cgi-bin folder of our Apache Server cp -R /usr/local/apache/htdocs/awstats/wwwroot/cgi-bin/* /usr/local/apache/cgi-bin/ This will copy the awstats.pl and the lib and plugins folder. Now we'll copy the folder lang and this will allow us to see the web data in different languages. cp -R /usr/local/apache/htdocs/awstats/lang/ /usr/local/apache/cgi-bin/ We copy the file /etc/opt/awstats/awstats.model.conf as awstats.www.mydomain.com.conf cp /etc/opt/awstats/awstats.model.conf /usr/local/apache/cgi-bin/awstats.www.mydomain.com.conf Now we have to edit this configuration file awstats.www.midomino.com.conf We are going to modify the following values: LogFile LogFormat DNSLookup DirData DirIcons SiteDomain HostAliases AllowToUpdateStatsFromBrowser LogFile="/usr/local/apache/logs/access_log" LogFormat=1 (The format used byApache) DNSLookup=1 (We enble dns reverse search) DirData="/usr/local/apache/htdocs/awstats/data/" The data folder doesn't previoulsy exists so we have to manually create it and chmod it to become 777. DirIcons="/awstats/wwwroot/icon" (so we can see the graphics in the returned web page) SiteDomain="www.mydomain.com" (here you change mydomain for your own ej, www.bubagamb.com) HostAliases="www.bubagamb.com 234.141.154.52 localhost 127.0.0.1" Different ways to access to your machine. AllowToUpdateStatsFromBrowser=1 (we set it to 1 because we want to update the data from the web page with its own button. ) Now all you have to do is open an internet browser and type http://www.mydomain.com/cgi-bin/awstats.pl
|
|
|
|
Once we have done this, we can have a look on the original installation instructions on the web, this always comes handy. You have to bear in mind that the program can do a lot of things and I just mention here how to make it work in a very basic way. To see the installation instructions,
http://www.mydomian..com/awstats/docs/awstats_setup.html