Misc configurationMisc configuration notesphpwiki
mysql -uroot -prootpasswd drop database phpwiki; quit mysqladmin -uroot -prootpasswd create phpwiki mysql -uroot phpwiki grant all on phpwiki.* to wikiuser@localhost identified by 'wikiuserpasswd'; quit mysql -uwikiuser -pwikiuserpasswd phpwiki < /usr/share/doc/phpwiki/schemas/mysql.sql
if (!defined('WIKI_NAME')) define('WIKI_NAME', 'Courville.org PhpWiki'); if (!defined('ADMIN_USER')) define('ADMIN_USER', "wikiadmin"); if (!defined('ADMIN_PASSWD')) define('ADMIN_PASSWD', "?????????"); if (!defined('ZIPDUMP_AUTH')) define('ZIPDUMP_AUTH', false); if (!defined('ENCRYPTED_PASSWD')) define('ENCRYPTED_PASSWD', true); $DBParams = array(passencrypt.php 'dbtype' => 'SQL', 'dsn' => 'mysql://wikiuser:wikiuserpasswd@localhost/phpwiki', if (!defined('ALLOW_USER_LOGIN')) define('ALLOW_USER_LOGIN', true); if (!defined('ALLOW_BOGO_LOGIN')) define('ALLOW_BOGO_LOGIN', false); if (!defined('REQUIRE_SIGNIN_BEFORE_EDIT')) define('REQUIRE_SIGNIN_BEFORE_EDIT', true);
weeblefm
Alias /weeblefm/ /usr/local/share/weeblefm/
twig
$dbconfig"sqlserver" = "localhost"; $dbconfig"sqlport" = "3306"; $dbconfig"sqlusername" = "www-data"; $dbconfig"sqlpassword" = "wwwdatapasswd"; $dbconfig"defaultdb" = "twig"; $dbconfig"sqltype" = "mysql";
mysql -u root -prootpasswd mysql mysql> CREATE DATABASE twig; mysql> GRANT ALL PRIVILEGES ON twig.* TO "www-data"@localhost IDENTIFIED BY 'wwwdatapasswd'; mysql> \q gunzip -c /usr/share/twig/setup/twig.table.mysql.gz | mysql -u root -prootpasswd twig
<Directory /> Options SymLinksIfOwnerMatch # AllowOverride None AllowOverride All </Directory> <IfModule mod_dir.c> DirectoryIndex index.html index.htm index.shtml index.cgi .index.php index.php3 index.php4 index.php index.phtml </IfModule> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
I accept the risk set disable-plaintext nil Reconfigure console keymapUse dpkg-reconfigure console-common and answer the questions. XFree nice issues?In order to run appl smoothly, modify /etc/X11/Xwrapper.config by changing nice_value=-10 -> nice_value=0 Change dpi resolutionIn order to get lower resolution fonts simply replace 100 by 75 (dpi) in the following file: /etc/X11/xinit/xserverrc. Regeneration of XF86Config-4 file in /tmp/foodpkg-reconfigure -plow xserver-xfree86 dexconf --output=/tmp/foo Migration to ext3:tune2fs -j /dev/hda2 modify /etc/fstab and /etc/lilo.conf append="bootfs=ext3 vga=0x317 video=vesa:ywrap,pmipal,mtrr" Mrtg: view nice graphs of the router traffic history
apt-get install mrtg mrtg-contrib snmpwalk -Os -c public -v 1 192.168.254.254 cfgmaker --global 'WorkDir: /var/www/mrtg' \ --global 'Options[[_]]: kbytes,growright' --ifref=ATM \ --output /etc/mrtg.cfg public@192.168.254.254
#cat /etc/cron.d/mrtg 0-55/5 * * * * root if -x /usr/bin/mrtg && -r /etc/mrtg.cfg ; then /usr/bin/mrtg /etc/mrtg.cfg >> /var/log/mrtg/mrtg.log 2>&1; fi
# Created by # /usr/bin/cfgmaker --global 'WorkDir: /var/www/mrtg' --global 'Options[[_]]: bits,growright' --ifref=ip --output /etc/mrtg.cfg public@192.168.254.254 WorkDir: /var/www/mrtg Options[[_]]: bits,growright Target192.168.254.254_127.0.0.1: /127.0.0.1:public@192.168.254.254: SetEnv192.168.254.254_127.0.0.1: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="loopback (pseudo ethernet)" MaxBytes192.168.254.254_127.0.0.1: 1250000 Title192.168.254.254_127.0.0.1: Traffic Analysis for 127.0.0.1 -- 004-E240-A1X/003-7080-406/Build 69-22PageTop192.168.254.254_127.0.0.1: Traffic Analysis for 127.0.0.1 -- 004-E240-A1X/003-7080-406/Build 69-22### Interface 3 >> Descr: 'Bridge' | Name: | Ip: '192.168.254.254' | Eth: ### Target192.168.254.254_192.168.254.254: /192.168.254.254:public@192.168.254.254: SetEnv192.168.254.254_192.168.254.254: MRTG_INT_IP="192.168.254.254" MRTG_INT_DESCR="Bridge" MaxBytes192.168.254.254_192.168.254.254: 1250000 Title192.168.254.254_192.168.254.254: Traffic Analysis for www.courville.orgPageTop192.168.254.254_192.168.254.254: Traffic Analysis for www.courville.org### SYSTEM courville.org Temperature ### #Optionsgritche_temp: gauge,nopercent #Targetgritche_temp: `/var/www/script/lm_sensors.pl` #MaxBytesgritche_temp: 100 #YLegendgritche_temp: Temperature #LegendIgritche_temp: M/B temp: #ShortLegendgritche_temp: degrees #Titlegritche_temp: courville.org temperature#PageTopgritche_temp: courville.org temperaturespamassassin
cd /etc/spamassassin wget http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf usb camera permission settings for a usermkdir /etc/hotplug/usb /usr/lib/libgphoto2-2/print-usb-usermap > /etc/hotplug/usb/usbcam.usermap cp /usr/share/doc/libgphoto2-2/linux-hotplug/* /etc/hotplug/usb/ addgroup camera adduser marc camera put labels for easy mounte2label /dev/sda1 040Go-HD-IBM-01 mkdir /mnt/040Go-HD-IBM-01 tail -n 1 /etc/fstab LABEL=040Go-HD-IBM-01 /mnt/040Go-HD-IBM-01 ext2 user,noauto 0 0 cat /etc/fstab #Not supermount section /dev/hdc /mnt/cdrom auto ro,iocharset=iso8859-15,codepage=850,umask=0 0 0 /dev/hdc /mnt/dvd auto ro,iocharset=iso8859-15,codepage=850,umask=0 0 0 /dev/fd0 /mnt/floppy auto rw,iocharset=iso8859-15,sync,codepage=850,umask=0 0 0 /dev/sda1 /mnt/flash auto rw,iocharset=iso8859-15,sync,codepage=850,umask=0 0 0 /dev/sda1 /mnt/flasha auto rw,iocharset=iso8859-15,sync,codepage=850,umask=0 0 0 /dev/sdb1 /mnt/flashb auto rw,iocharset=iso8859-15,sync,codepage=850,umask=0 0 0 /dev/sdc1 /mnt/flashc auto rw,iocharset=iso8859-15,sync,codepage=850,umask=0 0 0 Debug apache when it is not starting
/etc/init.d/apache stop rm /var/run/apache.pid /etc/init.d/apache start ps -auxww | grep apache
extension=mysql.so extension=imap.so
Select default dictionary under debianselect-default-ispell select-default-wordlist turboprint installationI use this software [1] in order to get the full capabilities of my deskjet printer. In order to get it working with stock debian and devfs I had to edit manually the device of the printer in the /etc/turboprint and /etc/cups replacing /dev/usblp0 with /dev/usb/lp0 (mainly in /etc/turboprint/turboprint.cfg and in /etc/cups/printers.conf). Secure web services through clean configuration of apache and ssl
# Server Certificate: SSLCertificateFile /etc/apache/ssl.crt/server.crt # Server Private Key: SSLCertificateKeyFile /etc/apache/ssl.key/server.key
Alias /ssh /usr/share/mindterm/ Alias /twig /usr/share/twig/ Alias /weeblefm /usr/local/share/weeblefm/ Alias /squirrelmail/ /usr/share/squirrelmail/ Include /etc/gallery/apache.conf Include /etc/phpwiki/apache.conf how to make windows use cups ipp: add a remote printer under windows
192.168.0.2 gritche
webalizer and dns lookups
DNSCache /var/log/apache/dns_cache.db DNSChildren 20
mkdir /tmp/coucou cd /tmp/coucou cp /var/log/apache/access* . gzip -d access*gz for i in access.log* do webazolver -N 20 -D /var/log/apache/dns_cache.db $i done mkdir out for i in access.log* do webalizer -o out -N 20 -D /var/log/apache/dns_cache.db $i done Samba configuration tips
unix charset = iso8859-15 Automatic updateIn order to download every day all the packages without installing them except the security fixes I use the following script in my daily crontab (this requires the use of dual lists): mkdir -p /var/lib/aptsec/lists/partial cat /etc/cron.daily/debupd #!/bin/sh apt-get update apt-get --assume-yes --download-only dist-upgrade apt-get -o Dir::Etc::SourceList=/etc/apt/security_updates.list -o Dir::State::Lists=/var/lib/aptsec/lists/ update apt-get --assume-yes -o Dir::Etc::SourceList=/etc/apt/security_updates.list -o Dir::State::Lists=/var/lib/aptsec/lists/ upgrade Apache rewrite rule to maintain backward compatibility with phpwikiThe issue: when I upgraded phpwiki, it broke the former syntax for the pages and since my wiki was already referenced it was quite frustrating for the visitors to be redirected to non existing pages. The following rewrite rule fixes this problem. All you need to add is the following line in /etc/phpwiki/apache.conf: <IfModule mod_rewrite.c> RewriteEngine on #MODIF BEGINS RewriteRule ^/phpwiki/index.php/(.*)$ /phpwiki/$1 #MODIF ENDS java setup
ln -s /opt/j2re1.4.2_04 /opt/j2re ln -s /opt/j2re/plugin/i386/ns610-gcc32/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so ln -s /opt/j2re/plugin/i386/ns610-gcc32/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/libjavaplugin_oji.so Income revenue declaration (déclaration d'impots)
cp teleir_cryptolib.jar /opt/j2re/lib/ext/ chmod 770 /opt/j2re/lib/ext/ chown root.adm /opt/j2re/lib/ext/ flash plugin autoupdateSimply apt-get install flashplugin-nonfree my mouse is going crazy when switching back from another node with my KVM
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" # Option "Device" "/dev/misc/psaux" Option "Device" "/dev/gpmdata" Option "Protocol" "IMPS/2" # fix for KVM switch? yes but wheel do not work after # Option "Protocol" "auto" Option "Emulate3Buttons" "false" Option "Buttons" "5" Option "ZAxisMapping" "4 5" EndSection
device=/dev/misc/psaux responsiveness= repeat_type=raw # try this one first!!! #type=imps2 # if you have issues with the wheel under Xfree then switch to broken imps2 type=fuimps2 append="" sample_rate=
Convert Windows TTF to bdf and pfc format#!/usr/bin/perl -w use strict; # wandeln.ttf.pl # converts True Type Fonts from Windows or other sources to # bdf-files and pfc-files # needs ttf2dbf, bdftopcf and perl foreach my $i (@ARGV) { if ($i =~ /(.*?)(|b|bi|bd|i)\.ttf$/) { my $base = "$1$2"; my $face = $2; my $ttf = $i; for my $p (8..16) { my $bdf = "$base$p.bdf"; my $pcf = "$base$p.pcf"; print "ttf2bdf -v -r 82 -p $p -o $bdf $ttf\n"; print "bdftopcf -o $pcf $bdf\n"; } } } print "mkfontdir\n"; Add ttf fonts:
FontPath "/usr/local/share/fonts/truetype/windows"
apt-get install fttools cd /usr/local/share/fonts/truetype/windows mkttfdir
Convert windows format font to unix world
You need to convert these files to *.pcf-files afterwards for i in *.fon do file=`echo $i | sed 's/\.pcf$//g'` bdftopcf $file.pcf $file.bdf fnt2bdf -c $file $file.fon done
for i in *.pcf do file=`echo $i | sed 's/\.pcf$//g'` bdftopcf $file.pcf $file.bdf done
ssh key generation and propagationssh-keygen -t dsa -b 1024 ssh-copy-id -i ~/.ssh/id_dsa.pub root@localhost freetv adsltv configuration
netinstall debian
|
Main Page >