http://www.itsrealworld.com/

Pretty nice…

“Play Tagger allows you to easily play mp3 files directly on your website or blog. Simply include a tiny javascript, and your mp3 links will automatically become playable right on the page.”

del.icio.us/help/playtagger

I use Sage for reading RSS in Firefox.

Stumbled across their site after a long while, they’ve consolidated some custom CSS examples.

Sage Styles

http://www.smwr.com/

Build apache2:
export CPPFLAGS=-I/usr/kerberos/include
>./configure –enable-mod-shared=all –enable-ssl
>make all
>make CPPFLAGS=-I/usr/kerberos/include
>make install
All installed in /usr/local/apache2

Build mod_php:
http://www.php.net/downloads.php
>export CPPFLAGS=-I/usr/kerberos/include
>./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql –prefix=/usr/local/apache2/php –with-config-file-path=/usr/local/apache2/php –enable-force-cgi-redirect –disable-cgi –with-zlib –with-gettext –with-gdbm –with-openssl
>make
>make install
Edit httpd.conf and add:
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php
DirectoryIndex index.php

Build Python:
wget http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz
>./configure –prefix=/usr/local
>make
>make install

Build mod_python:
>./configure –prefix=/usr/local/apache2/mod_python –with-python=/usr/local/bin/python2.4 –with-apxs=/usr/local/apache2/bin/apxs
>make
>make install
Edit httpd.conf and add:
LoadModule python_module modules/mod_python.so

Setup MoinMoin:
>python -v setup.py –quiet install –record=install.log
>export PREFIX=/usr
>export SHARE=$PREFIX/share/moin
>export WIKILOCATION=/var/www/moin/mywiki
>export INSTANCE=mywiki
>export USER=apache
>export GROUP=apache
>cd $WIKILOCATION
>mkdir $INSTANCE
>cp -R $SHARE/data $INSTANCE
>cp -R $SHARE/underlay $INSTANCE
>cp $SHARE/config/wikiconfig.py $INSTANCE
>chown -R $USER.$GROUP $INSTANCE
>chmod -R ug+rwX $INSTANCE
>chmod -R o-rwx $INSTANCE
>cd $WIKILOCATION/$INSTANCE
>mkdir cgi-bin
>cp $SHARE/server/moin.cgi cgi-bin
>chown -R $USER.$GROUP cgi-bin
>chmod -R ug+rx cgi-bin
>chmod -R o-rwx cgi-bin
>moin.cgi - sys.path.insert(0, ‘/var/www/moin/mywiki’)
Run wikiconfig.py - specify fullpath for data and instance
data_dir = ‘/var/www/moin/mywiki/data/’
data_underlay_dir = ‘/var/www/moin/mywiki/underlay/’
url_prefix = ‘/wiki’
acl_rights_default = u”All:read”
acl_rights_before = u”AumberBhatti:read,write,delete,revert,admin”
Edit httpd.conf:
Options ExecCGI
Alias /wiki/ “/usr/local/share/moin/htdocs/”
#ScriptAlias / “/var/www/moin/mywiki/cgi-bin/moin.cgi”

RewriteEngine on
RewriteRule ^/wiki/ - [last]
RewriteRule ^/robots.txt - [last]
RewriteRule ^/favicon.ico - [last]
RewriteRule ^/?(.*) /var/www/moin/mywiki/cgi-bin/moin.cgi/$1 [last,type=application/x-httpd-cgi]

[TESTED ON THE FOLLOWING DISTROS/VERSIONS]

1. Red Hat Enterprise Linux WS release 3 (Taroon Update 1)
Kernel 2.4.21-9.0.1.ELsmp, clamav-70-rc, sendmail-8.12.10-1,
2. Fedora Core release 1 (Yarrow)
Kernel 2.4.22-1.2188.nptl, clamav-70, sendmail-8.12.10-1.1.1

#####
These instructions document the installation and configuration of ClamAV 0.70-rc on Red Hat ES Release 3.
I will use the Sendmail libmilter APIs to integrate ClamAV with the MTA.

Note: it is assumed that sendmail is already installed and configured.

RHES’s default sendmail installation does not include libmilter (however, sendmail itself is compiled with milter support), you will need to obtain the sendmail source files. Check rpmfind for rpm’s.

###
Software (your versions may differ):
clamav-0.70-rc.tar.gz
sendmail-8.12.10-1.src.rpm

###
Sendmail libmilter:
> rpm ivh sendmail8.12.10-1.src.rpm
> cd /usr/src/redhat/SOURCES/sendmail-8.12.10/libmilter
> sh Build install

Note: RH9/Fedora(?) do not extract source tree, you must ‘tar zxvf’ the sendmail .tar.gz located in /usr/src/redhat/SOURCES

Note: RHES’s default installation does not include vacation for sendmail, now would be a good time to install vacation also:
> cd /usr/src/redhat/SOURCES/sendmail-8.12.10/vacation
> sh Build install

###
ClamAV:

Create user and group for clamav:
>groupadd -g 601 clamav
>useradd -u 601 -g 601 -d /usr/local/share/clamav -s /bin/false clamav

> cd /usr/local/src/clamav-0.70-rc
> ./configure—enable-milter—sysconfdir=/etc; make; make install

Configure /etc/clamav.conf:
Comment the “Example� line:

1. Example
Included/uncommented the following:
LocalSocket /tmp/clamd
StreamSaveToDisk
StreamMaxLength 10M
MaxThreads 10
ReadTimeout 500 <—USE FOR clamav-70
ThreadTimeout 500 <—USE ONLY for clamav-70-rc, deprecated
User clamav
ScanMail
ScanArchive
ArchiveMaxFileSize 10M

###
Setup init.d to include clamd:
> cp /usr/local/src/clamav-0.70-rc/contrib/init/RedHat/clamd /etc/init.d/
> chmod 755 /etc/init.d/clamd

###
Setup init.d to include clamav-milter:
> cp /usr/local/src/clamav-0.70-rc/contrib/init/RedHat/clamav-milter /etc/init.d/
> chmod 755 /etc/init.d/clamav-milter

###
Customize clamav-milter start arguments:
> pico w /etc/init.d/clamavmilter
Find the ‘daemon’ line in the ‘start()’ section and add the following:
daemon clamav-milter P local:/var/run/clamav/clamav.sock—dontscan-on-error -ol—noreject

###
Setup the socket directory:
> mkdir /var/run/clamav
> chown clamav:clamav clamav

###
Setup system boot scripts in /etc/rc.d/:
IMPORTANT: clamd must be started before clamav-milter
> ln -s /etc/init.d/clamd /etc/rc2.d/S20clamd
> ln -s /etc/init.d/clamd /etc/rc3.d/S98clamd
> ln -s /etc/init.d/clamd /etc/rc4.d/S98clamd
> ln -s /etc/init.d/clamd /etc/rc5.d/S98clamd
> ln -s /etc/init.d/clamd /etc/rc0.d/K20clamd
> ln -s /etc/init.d/clamd /etc/rc1.d/K20clamd
> ln -s /etc/init.d/clamd /etc/rc6.d/K20clamd
> ln s /etc/init.d/clamavmilter /etc/rc2.d/S91clamav-milter
> ln s /etc/init.d/clamavmilter /etc/rc3.d/S99clamav-milter
> ln s /etc/init.d/clamavmilter /etc/rc4.d/S99clamav-milter
> ln s /etc/init.d/clamavmilter /etc/rc5.d/S99clamav-milter
> ln s /etc/init.d/clamavmilter /etc/rc0.d/K30clamav-milter
> ln s /etc/init.d/clamavmilter /etc/rc1.d/K30clamav-milter
> ln s /etc/init.d/clamavmilter /etc/rc6.d/K30clamav-milter

###
Configure sendmail.mc to include clamav milter support:
> pico -w /etc/mail/sendmail.mc
Add the following lines:
INPUT_MAIL_FILTER(`clamav’, `S=local:/var/run/clamav/clamav.sock, F=T, T=S:4m;R:4m’)
define(`confINPUT_MAIL_FILTERS’, `clamav’)dnl

> mv /etc/mail/sendmail.cf /etc/mail/sendmail.cf.sav
> m4 /etc/mail/sendmail.mc > sendmail.cf

###
Now start the daemons in the following order:
> /etc/init.d/sendmail start
> /etc/init.d/clamd start
> /etc/init.d/clamav-milter start
> /etc/init.d/sendmail restart

Check /var/log/maillog and /var/log/messages for errors.

###
Update clamav database:
> pico -w /etc/cron.daily/freshclam

Add the following:

#!/bin/bash
/usr/local/bin/freshclam > /dev/null 2>&1

>chmod 755 /etc/cron.daily/freshclam

###
Now, all messages are scanned for viruses/worms. If an infected message is sent by a user of the system relayed via SMTP, clamav-milter will not allow the message to be sent, instead, the user will receive a “virus detected� error within their email client.

If an incoming message is sent to a user of the system, the message will be discarded (/dev/null), notification will be sent to postmaster@localhost. You may customize the handling of infected messages in /etc/clamd.conf. Also, you should NOT send notification to the sender or receiver of the message if an infected message is detected, this is because the headers are usually spoofed, and doing so will only generate unnecessary email traffic.

[DONE]

If a message is sent to a non-existent user of the system, it is normally bounced back to the sender. In the event of virus/worm outbreaks or spam probes of the system, this can present a problem (i.e. bounce infected messages, increase email traffic).To discard all messages directed to non-existent users of the system, do the following:Note: instructions are based on sendmail version 8.12.10-1

Edit the sendmail.mc file, and add the LUSER_RELAY line:
> pico -w /etc/mail/sendmail.mc
Add this line:
define(`LUSER_RELAY’, “local:mailnull’‘)dnl

> mv /etc/mail/sendmail.cf /etc/mail/sendmail.cf.sav
> m4 /etc/mail/sendmail.mc > sendmail.cf

Edit the sendmail aliases file to direct all messages sent to “mailnull� to /dev/null:

> pico -w /etc/aliases
Find the “mailnull: root� line and change it to:
mailnull: /dev/null

Restart sendmail:
> /etc/init.d/sendmail restart

[DONE]

To get vsftpd to work on Red Hat 9, follow the previous HOWTO
but make the following changes:

The vsftpd.conf file is now located in /etc/vsftpd/vsftpd.conf

When creating the xinetd vsftpd file, include the server_args line (this will let vsftpd know that the vsftpd.conf file is now in the subdir):

Edit /etc/xinetd.d/vsftpd to contain:
service ftp
{

disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
server_args = /etc/vsftpd/vsftpd.conf
nice = 10
per_source = 5
instances = 50
log_on_success += PID HOST DURATION
log_on_failure += HOST
}

Then, edit the ‘Listen=YES’ line of the /etc/vsftpd/vsftpd.conf file to:
Listen=NO

I am using vsftpd-1.1.3-8.i386.rpm, this is an updated rpm from RH that re-enables TCPWrapper support.

[DONE]

‘finger’ for standard users always shows “Never logged in.� To fix this, you must change /var/log/lastlog to allow global read: chmod 644 /var/log/lastlog

[These instructions are for Red Hat 9 and jabber-1.4.2 source]

The latest jabber server fails to compile on RH9. The following is howto make it work:

In /usr/lib make create these symlinks (if not there already):
libcrypto.so -> ../../lib/libcrypto.so.0.9.7a
libcrypto.so.2 -> ../../lib/libcrypto.so.0.9.7a

libssl.so -> ../../lib/libssl.so.0.9.7a
libssl.so.2 -> ../../lib/libssl.so.0.9.7a

Then run:
./configure —enable-ssl

Edit the platform-settings file in the jabber package to include the kerberos include dir. Append
-I/usr/kerberos/include
to the end of the CFLAGS and CCFLAGS lines.

Then, just follow the jabber documentation to compile/install:
make
edit .xml file

Next Page »