Friday, June 09, 2006

Remove subversion directories from project, directory tree or ...

find ./ -name ".svn" -type d -exec rm -rf \{} \;

Apache 2.0.x with PHP 4.4.x

*PHP

./configure --prefix=/usr/local/php/ --with-gd --with-mysql=/usr --with-openssl --with-zlib --with-jpeg-dir --with-inifile --with-png-dir --disable-cgi
--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql-sock --with-iconv=/usr/local
make
make install
cp -p .libs/libphp4.so /usr/local/apache/modules

*Apache2
httpd.conf
include /usr/local/apache2/conf/modules/*.conf

php.conf
# PHP Configuration for Apache
#
# Load the apache module
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter handle files with a .php extension.
#
Files *.php
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 9524288
/Files
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

Sqlite - Trac - Subversion - Slackware 10.2

Install Trac with sqllite and subversion under slackware 10.2

*Swig
tar -xzvf swig-1.3.27.tar.gz
cd swig-1.3.25
./configure --with-python=/usr/bin/python
make && make install

*subversion
tar -xzvf subversion-1.3.0.tar.gz
cd subversion-1.3.0
./configure --with-apxs=/usr/local/apache2/bin/apxs --with-swig=/usr/local/
make && make install
make swig-py && make install-swig-py
ldconfig

*clearsilver
tar -xzvf clearsilver-0.10.1.tar.gz
cd clearsilver-0.10.1
./configure
make && make install
cd python
python setup.py install

*mod_python
tar -xzvf mod_python-3.1.4.tgz.gz
./configure --with-apxs=/usr/local/apache2/bin/apxs
make && make install
make install_dso
make install_py_lib

LoadModule python_module /usr/local/apache2/modules/mod_python.so
AddModule mod_python.c

/usr/local/apache2/bin/apachectl stop
/usr/local/apache2/bin/apachectl start

*Sqlite

tar -xzvf sqlite-3.2.8.tar.gz
cd sqlite-3.2.8
./configure
make
make install

*pysqlite
tar -xzvf pysqlite-2.0.5.tar.gz
cd pysqlite-2.0.5
python setup.py build
python setup.py install

*Trac
tar -xzvf trac-0.9.2.tar.gz
python ./setup.py install


ln -s /usr/local/lib/svn-python/svn/ /usr/lib/python2.4/site-packages/svn

ln -s /usr/local/lib/svn-python/libsvn/ /usr/lib/python2.4/site-packages/libsvn

ln -s /usr/local/lib/svn-python /usr/lib/python2.4/site-packages/svn-python

trac-admin /somedir/trac/project_name initenv
tracd --port 8000 /somedir/trac/project_name

http://localhost:8000/project_name

*Apache conf

ScriptAlias /trac /usr/share/trac/cgi-bin/trac.cgi

SetEnv TRAC_ENV "/somedir/trac/project_name"


http://localhost/trac/

Software links:

wget -r -L -c -nd http://initd.org/pub/software/pysqlite/releases/2.0/2.0.5/pysqlite-2.0.5.tar.gz
wget -r -L -c -nd http://kent.dl.sourceforge.net/sourceforge/swig/swig-1.3.27.tar.gz
wget -r -L -c -nd http://www.clearsilver.net/downloads/clearsilver-0.9.14.tar.gz
wget -r -L -c -nd http://pysvn.tigris.org/files/documents/1233/26687/pysvn-1.3.1.tar.gz
wget -r -L -c -nd http://ftp.edgewall.com/pub/trac/trac-0.9.2.tar.gz
wget -r -L -c -nd http://www.sqlite.org/sqlite-3.2.8.tar.gz
wget -r -L -c -nd http://apache.online.bg/httpd/modpython/mod_python-3.1.4.tgz


Have Fun !
:)

Apache 2.0.x - FastCGI, Subversion

*Apache-2.0.x
./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-cgi --enable-vhost-alias --enable-suexec --enable-dav
make
make install

*mod_fastcgi-2.4.2

cp Makefile.AP2 Makefile
make
make install

*Subversion 1.3.0

./configure --with-apxs=/usr/local/apache2/bin/apxs
rm /usr/local/lib/libsvn* -v
make clean && make && make install
ldconfig

svnadmin create /somedir/svn/repos/test

Apache config adds:


DAV svn
#SVNPath /somedir/svn/repos
SVNParentPath /somedir/svn/repos
Satisfy Any

Mysql replace content of field

update dbtable set field = replace(field,'search_string','replace_with ');

Cool settings for linksys wrt54g wireless router

RTS Threshold: 2304
Beacon Interval: 200
MTU Size: 1400

Install Postfix with mysql, sasl on slackware (todo: postfix conf files, clamav, pop-before-smtp)

Cyrus-sasl -> ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
Couirier(Imap. Maildrop, Auth)-> http://www.courier-mta.org/
http://kent.dl.sourceforge.net/sourceforge/courier/courier-imap-4.0.6.tar.bz2
AuthLib-> http://kent.dl.sourceforge.net/sourceforge/courier/courier-authlib-0.57.tar.bz2

Clamav -> http://www.clamav.net/
PopBeforeSmtp -> http://popbsmtp.sourceforge.net/
Postfix -> http://www.postfix.org/


#######################################################################
###Postfix

tar -xzvf postfix-*.tar.gz
cd postfix-*
make makefiles CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -I/usr/local/include/sasl AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/local
/lib -lsasl
make

mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF
mv /usr/bin/newaliases /usr/bin/newaliases.OFF
mv /usr/bin/mailq /usr/bin/mailq.OFF
chmod 755 /usr/sbin/sendmail.OFF /usr/bin/newaliases.OFF /usr/bin/mailq.OFF
#Adding postfix, postdrop user and groups
groupadd postfix
useradd -g postfix -s /dev/null postfix
groupadd postdrop
#Install Postfix
make install

#######################################################################
###Courier AuthLib ver 0.57

./configure --with-mysql-libs=/usr/lib/mysql/ --with-mysql-includes=/usr/include/mysql/ --with-authmysql --with-authmysql=yes
make
make install
make install-configure

#######################################################################
###Courier Imap
#Options foc courier-imap
#--enable-unicode
#--with-trashquota
#--disable-root-check

./configure --enable-workarounds-for-imap-client-bugs --with-authchangepwdir --enable-unicode --with-trashquota --disable-root-check
make
make install
make install-configure
#######################################################################
###postfix.sh
#!/bin/sh

case "$1" in
start)
echo "Starting POSTFIX..."
/usr/sbin/postfix start
;;
stop)
echo "Stopping POSTFIX..."
/usr/sbin/postfix stop
;;
restart)
echo "Restarting POSTFIX..."
/usr/sbin/postfix stop
sleep 1;
/usr/sbin/postfix start
;;
reload)
echo "Restarting POSTFIX..."
/usr/sbin/postfix reload
;;
*)
echo "usage [start] [stop] [restart] [reload]"
;;
esac
exit 0
#######################################################################

###Pop Before Smtmp
#Install requiered Perl modules
perl -MCPAN -e 'install Time::HiRes'
perl -MCPAN -e 'install File::Tail'
perl -MCPAN -e 'install Date::Parse'
perl -MCPAN -e 'install Net::Netmask'
perl -MCPAN -e 'install DB_File'

XLiquid GTK theme manual install ot Slackware

1.Download Xliquid_GTK-x.x.x.tar.gz ( http://themes.freshmeat.net/projects/xliquid_gtk/ )
2.Extract
3.Make directory "$HOME/.gtk_themes/"
4.Move extracted Xliquid_GTK-x.x.x dir to "$HOME/.gtk_themes/"
5.make in your $HOME directory file .gtkrc-2.0
6. Put in .gtkrc-2.0
include "$HOME/.gtk_themes/XLiquid_GTK-1.0.3/gtk-2.0/gtkrc"
7.From KDE->Control Center->Appearance & Themes->Colors - uncheck "Apply colors too non-KDE applications"
8. Restart your GTK Application and check the result :)

I think this work with manual instalation of other GTK themes too.

Other Links:
http://baghira.sourceforge.net/download.shtml

Baghira src install:
./configure --prefix=`kde-config --prefix` --disable-debug --enable-final
make
make install

Use rsync with inetd in slackware linux

rsyncd configuration:
/etc/rsyncd.conf - For configuration details see http://rsync.samba.org/

rsync and inetd - add to /etc/inetd.conf
#rsync
rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon
killall -HUP inetd - restart inetd

Migrate from mysql 4.0.x to mysql 4.1.x - use utf8

my.cnf
[client]
port = 3306
character-sets-dir=/usr/share/mysql/charsets/
default-character-set=utf8


# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306

#init_connect='SET collation_connection = utf8_general_ci'
#init_connect='SET NAMES utf8'
default-character-set=utf8
character-set-server=latin1
#collation-server = utf8_general_ci

[mysql]
default-character-set=utf8


mysqldump --user=username --password=password --default_character-set=latin1 --skip-set-charset dbname > dump.sql
chgrep latin1 utf8 dump.sql
mysql --user=username --password=password --execute="DROP DATABASE dbname; CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;"
mysql --user=username --password=password --default-character-set=utf8 dbname < dump.sql