Remove .svn directories from ...

December 14th, 2006

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

Apache2 PHP 4.4.x

December 14th, 2006

*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

Apache2-FastCGI, Subversion

December 14th, 2006

*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
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 ! :)
RTS Threshold: 2304 Beacon Interval: 200 MTU Size: 1400

Mysql replace content of field

December 14th, 2006

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

rsync

December 14th, 2006

rsync -a "username@yourdomain.tld:/home/username/public" /path/to/local/backupdir/ --times --links --recursive --hard-links -e ssh --progress --delete # Type ssh-keygen -d to generate your ssh keys # Copy the contents of your public key ~/.ssh/id_dsa.pub in you local directory to the file /home/username/.ssh/authorized_keys on your account.
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

Slack - Manual useradd script

December 14th, 2006

#!/bin/sh user=$1 echo Adding user: $user useradd -g users -s /dev/null -d /www/$user $user echo Create user dir: /www/$user mkdir /www/$user chdmod 755 -R /www/$user chown -R $user.users /www/$user echo Set password for $user passwd $user echo User:$user UserHome: /www/$user Password is Set AddOn:`date` >>/tmp/adduser.log

Slackware, rsync, inetd

December 14th, 2006

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

Mysql 4.1.x utf8

December 14th, 2006

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
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'
MOD SSL cd mod* ./configure \ --with-apache=../apache_1.3.33 \ --prefix=/usr/local/apache #APACHE cd apache* ./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite --enable-module=ssl make make certificate make install #LIBICONV cd libiconv-1.9.1 ./configure make make install #POSTGRE cd postgre* ./configure gmake gmake install #Manual steps: #useradd postgres #mkdir /usr/local/pgsql/data #chown postgres /usr/local/pgsql/data #su - postgres #/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data #/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 & #/usr/local/pgsql/bin/createdb test #/usr/local/pgsql/bin/psql test #PHP cd php* ./configure --prefix=/usr/local/php/ --with-gd --with-mysql --with-openssl --with-zlib --with-jpeg-dir --with-inifile --with-png-dir --disable-cgi --wit h-apxs=/usr/local/apache/bin/apxs --with-mysql-sock --with-iconv=/usr/local make make install

Firefox JRE Manual

December 14th, 2006

In Firefox plugin directory make link: ln -s /usr/java/jre1.5.0_03/plugin/i386/ns7/libjavaplugin_oji.so ./libjavaplugin_oji.so

user add script

December 14th, 2006

ADD_USER: #!/bin/sh user=$1 echo Adding user: $user useradd -s /dev/null $user echo $user add on:`date` >>users