#ubuntu repository mirror --- #dutch sources.list contents: deb ftp://ftp.het.net/ubuntu [dist_of_choice] main restricted universe multiverse deb ftp://ftp.het.net/ubuntu [dist_of_choice]-backports main restricted universe multiverse deb ftp://ftp.het.net/ubuntu [dist_of_choice]-updates main restricted universe multiverse deb ftp://ftp.het.net/ubuntu [dist_of_choice]-security main restricted universe multiverse --- #additional packages: apt-get install procinfo rdate lftp nmap openssl lynx links-ssl denyhost --- #mrtg apt-get install snmpd mrtg mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig echo "rocommunity public" > /etc/snmp/snmpd.conf /etc/init.d/snmpd restart cfgmaker --output /etc/mrtg.cfg public@localhost cd /var/www/mrtg ln -s *html index.html (this doesn't work for me at the moment) --- #MORE INFO http://ubuntuguide.org/wiki/Ubuntu_Edgy --- #Ubuntu setup #A Mini-Howto for apache2-SSL apt-get install apache2 apache2-ssl-certificate #(and answer the questions) #Now, enable ssl: a2enmod ssl #configure ssl: cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl #"/etc/apache2/sites-enabled/ssl" should look like this: NameVirtualHost *:443 (... configure the directories too...) and "/etc/apache2/sites-enabled/default" should look like this: NameVirtualHost *:80 (... configure the directories too...) In /etc/apache2/ports.conf, add Listen 443 In the middle of /etc/apache2/sites-available/ssl file, insert this two lines: SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem ---------------- RAID1 bootable 2 harddisks: --------------------------- reinstalled the boot loader so that the system will boot even if the primary disk (sda) disappears in the future. grub-install /dev/sda $ grub grub> device (hd0) /dev/sdb grub> root (hd0,0) grub> setup (hd0) grub> quit ====================== add partition to raid group mdadm -a /dev/mdX /dev/sdYZ ====================== #lm-sensors setup mkdev.sh #!/bin/bash # The number of devices to create (max: 256) NUMBER=32 # The owner and group of the devices OUSER=root OGROUP=root # The mode of the devices MODE=600 # This script doesn't need to be run if devfs is used if [ -r /proc/mounts ] ; then if grep -q "/dev devfs" /proc/mounts ; then echo "You do not need to run this script as your system uses devfs." exit; fi fi i=0; while [ $i -lt $NUMBER ] ; do echo /dev/i2c-$i mknod -m $MODE /dev/i2c-$i c 89 $i || exit chown "$OUSER:$OGROUP" /dev/i2c-$i || exit i=$[$i + 1] done #end of file ============================== #maildir delivery postconf -e 'home_mailbox = Maildir/' postconf -e 'mailbox_command =' /etc/init.d/postfix restart ============================== #Change default editor apt-get install vim-full update-alternatives --config editor =============================== Dealing with Bandwith Theft #56 Posted by ajt on Wed 18 Oct 2006 at 20:43 I run a few web sites. I don't care if people copy any images off them to use on their own site. I don't mind if they use one of my own images to link back to my site. I do care if they just use an image on their site because they are to lazy to copy the image or to save thair bandwidth. A friend suggested an Apache re-write rule to prevent it happening. After a tweak, I've found it most useful, I just need to wait long enough to take effect. RewriteEngine on RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png)$ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !(www\.)?domain\.com [NC] RewriteCond %{HTTP_REFERER} !google\. [NC] RewriteCond %{HTTP_REFERER} !search\?q=cache [NC] RewriteRule (.*) - [F,NC,L] UPDATE: Note that domain.com means your domain. ------------- EDGY -> firefox2.0 #let xmms play mp3/m3u instead of mplayer-plugin infirefox browser (who ever came up with that ?!) 1. Type "about:config" on the address bar to get to firefox config settings. 2. Do a filter search for "hide_plugins" and double click on "browser.download.hide_plugins_without_extensions" to change the settings value to "false". 3. Open up "Edit > Preferences", go to the "Content" area and click on "Manage". 4. It should now list all the "File Type". Do a search for audio and change the "MP3 audio (streamed)" to open up in the external xmms player. --------------- Keyboard detection problem after boot (pxe or cd) use following boot arguments: noapic irqpoll usb-handoff ------------------- http://www.cryptocity.net/blog/2007/05/16/installing-grsecurity-on-ubuntu-feisty-704/ ------------------- The gnome-terminal uses a termcap file for its basic settings. To change these: vi /usr/share/vte/termcap/xterm Now look for a line about 1/3 of the way down the file that looks like this: Code: :co#80:it#8:li#24:\ To change the number of columns, change the co# number, in this case 80. To change the number of rows, change the li# number, in this case 24. So as an example if you want a terminal window of 132x25: Code: :co#132:it#8:li#25:\