1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
AWStats http://awstats.sourceforge.net/ Goal: Install AWStats 5.9 on a Sun Cobalt server and configure to auto generate reports for all virtual domains hosted on the server. Note: Also tested on FreeBSD 4.9-RELEASE with AWStats 6.1 1. Verify Apache version ... > httpd -v Server version: Apache/1.3.20 Sun Cobalt (Unix) Server built: Jul 23 2001 14:55:10 On FreeBSD used: > /www/apache/bin/httpd -v Server version: Apache/1.3.26 (Unix) Server built: Aug 27 2002 01:38:46 2. Verify shared module support ... > httpd -l Compiled-in modules: http_core.c mod_so.c mod_perl.c suexec: enabled; valid wrapper /usr/sbin/suexec On FreeBSD: >/www/apache/bin/httpd -l Compiled-in modules: http_core.c mod_so.c suexec: disabled; invalid wrapper /www/apache/bin/suexec In both cases we're looking for the presence of mod_so.c 3 . Download and unpack AWStats software ... > cd /root > mkdir archive > cd archive > wget http://unc.dl.sourceforge.net/sourceforge/awstats/awstats-5.9.tgz FreeBSD was missing the wget command so I did the download like this: > lynx -source http://unc.dl.sourceforge.net/sourceforge\ /awstats/awstats-6.1.tgz > awstats-6.1.tgz Now unpack the distribution: > tar -xvzf awstats-5.9.tgz > cd awstats-5.9 or on FreeBSD: > tar -xvzf awstats-6.1.tgz > cd awstats-6.1 4. Install AWStats software ... > mv wwwroot /home/awstats > cp tools/awstats_buildstaticpages.pl /home/awstats/cgi-bin 5. Install run script ... > cd /root/archive > wget http://www.reliablepenguin.com/clients/misc/awstats.run.pl or on FreeBSD: > lynx -source http://www.reliablepenguin.com/\ clients/misc/awstats.run.pl > awstats.run.pl You might need to edit this script and adjust the SITE_BASE variable to match your install. On FreeBSD the path to grep had to be changed to /usr/bin/grep at the start of the script. Next do: > chmod 755 awstats.run.pl > cp awstats.run.pl /usr/local/sbin 6. Install config template ... > cd /home/awstats/cgi-bin > wget http://www.reliablepenguin.com/clients/misc/awstats.template.conf or on FreeBSD: > lynx -source http://www.reliablepenguin.com/\ clients/misc/awstats.template.conf > awstats.template.conf The template config file sets the following: LogFile="/home/sites/#SITE#/logs/web" LogType=W LogFormat=1 SiteDomain="#SITE#" DNSLookup=0 DirCgi="/awstats/cgi-bin" DirIcons="/awstats/icon" For FreeBSD the template must be edited to set the following: LogFile="/www/logs/#SITE#-access.log" 7. Setup apache .... Edit /etc/httpd/conf/httpd.conf and add the following lines to the end of the file just before any virtual definitions: Alias /awstats/icon /home/awstats/icon Alias /awstats/js /home/awstats/js Alias /aswtats/css /home/awstats/css On FreeBSD the httpd.conf file is located in /usr/www/apache/conf/ 8. Setup logrotate ... Edit /etc/logrotate.d/apache and add the indicated line. /var/log/httpd/access { prerotate /usr/local/sbin/split_logs web < /var/log/httpd/access ADD --> /usr/local/sbin/awstats.run.pl >> /var/log/awstats.log endscript missingok postrotate /usr/bin/killall -HUP httpd 2> /dev/null || true endscript daily } The logrotate setup was not needed on the FreeBSD server. Instead a cronjob did the trick. That does it! Notes: Basic awstats operations: a. Initialize the database with logs ... > /awstats.pl -config=your.domain -update b. Run reports ... > /home/awstats/cgi-bin/awstats_buildstaticpages.pl \ -config=your.domain \ -dir=/home/sites/your.domain/web/awstats/reports \ -awstatsprog=/home/awstats/cgi-bin/awstats.pl |
Install Fix for Oracle 9i on RHEL 3
I was getting weird jvm errors while running the installer. Fix is documented here:
http://www.redhat.com/archives/fedora-list/2003-November/msg06994.html
1 2 3 4 5 6 7 8 9 10 11 |
At ftp://people.redhat.com/drepper/libcwait.c you find a file which you can compile with gcc -shared -o libcwait.so -fpic -O2 libcwait.c to get a DSO which you then can preload with LD_PRELOAD=/path/to/libcwait.so java ARGS... |
Another problem involved the installer hanging at “Link pending …”. This was fixed with:
1 |
export LD_ASSUME_KERNEL=2.2.5 |
Here a link to a discussion of this issue:
http://dbforums.com/t759429.html
And here’s a link to many more fixes:
http://www.puschitz.com/InstallingOracle9i.shtml
And another good link:
http://www.oracle-base.com/articles/9i/Oracle9iInstallationOnRedHatAS3.php
OpenLDAP Backtrace
http://www.openldap.org/faq/data/cache/59.html
Java Alternatives Settings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
alternatives --verbose \ --install /usr/bin/java java \ /usr/local/j2sdk1.4.2_04/bin/java 10 \ --slave /usr/bin/rmiregistry rmiregistry \ /usr/local/j2sdk1.4.2_04/bin/rmiregistry \ --slave /usr/share/man/man1/rmiregistry.1 rmiregistry.1 \ /usr/local/j2sdk1.4.2_04/man/man1/rmiregistry.1 alternatives --set java /usr/local/j2sdk1.4.2_04/bin/java alternatives --verbose \ --install /usr/bin/javac javac \ /usr/local/j2sdk1.4.2_04/bin/javac 10 \ --slave /usr/bin/jar jar \ /usr/local/j2sdk1.4.2_04/bin/jar \ --slave /usr/bin/rmic rmic \ /usr/local/j2sdk1.4.2_04/bin/rmic \ --slave /usr/share/man/man1/jar.1 jar.1 \ /usr/local/j2sdk1.4.2_04/man/man1/jar.1 \ --slave /usr/share/man/man1/rmic.1 rmic.1 \ /usr/local/j2sdk1.4.2_04/man/man1/rmic.1 alternatives --set javac /usr/local/j2sdk1.4.2_04/bin/javac |
Easy Qmail Install
With a web browser go to http://lazyinstaller.net/pages/generator.xhtml and complete the form.
Copy/paste the generated script to a text file on the target server and make executable.
Edit the script and comment out the first echo line.
Run the script.