Debian

General Notes

1) netselect-apt --> for finding the fastest debian apt server

2) munion --> for server monitoring

3) Xorg-7 has issues with Debian/Ubuntu. It can't find the nvidia kernel module after installing the nvidia drivers. In order to fix it one must run the nvidia installer script with the following option: "--x-module-path=/usr/lib/xorg/modules"



Kernel Compilation Notes

1) cd /usr/src/linux

2) cp .config /somewhere-safe/kernel.config

3) make clean (blows away the existing .config)

4) make mrproper

5) cp ../.config . (use a close version to what you really want)

5) make xconfig (modify the 100's of options)

a) make sure to enable "/proc/config.gz" creation

b) joydev

c)

6) edit Makefile (change EXTRAVERSION var --> must be all lowercase alphanumerics)

7) make-kpkg clean

8) make-kpkg buildpackage kernel_image

9) cd ..

10) dpkg -i kernel-image-2.6.X.deb



Figuring out how to deal with kernel modules

1) 'lsmod' to see what's currently loaded

2) 'modinfo' modname --> check out possible options to pass to this module



udev stuff

1) udevinfo -a -p `udevinfo -q path -n /dev/DevName`

2) /etc/udev/rules.d/10-local.rules

3) /etc/udev/rules.d/10-local.permissions

4) logfile: if enabled in udev.conf --> logs to "syslog"

5) appears devices auto-named based on kernel module loading



    * ) The following 3 things NEED to be kept properly aligned:



-) mythtv-setup (mySQL database) pointing to the /dev devices

-) /etc/udev/rules.d/* rules files

-) /etc/init.d/bobo-local script where it configures any /dev devices



Modifying /etc/rcN.d boot sequence scripts

1) update-rc.d ScriptName? start 98 2 3 4 5 . stop 1 6 .

2) update-rc.d Scriptname remove



Applying kernel patches

1) patch -p1 < ../PatchFile





Using SSH with RSA/DSA encryption

1) on LOCAL host: (host running ssh client)

— run "ssh-keygen -t dsa" (to generate ~/.ssh/id_dsa and ~/.ssh/id_dsa.pub keys)

— enter passphrase when asked (always use a passphrase)

— less ~/.ssh/id_dsa.pub (so we can cut & paste the public key below)

2) on REMOTE host: (host running sshd)

— edit file: ~/.ssh/authorized_keys

— append contents of ~/.ssh/id_dsa.pub to this file

— make sure entire key is one continuous line (no <CR>)

— change /etc/ssh/sshd_config to :

  • ... = no
  • PasswordAuthentication? no
3) if using putty to connect

— to use a unix generated private key with putty you must invoke puttygen

and load the unix private key and then write it back out in putty format.



Cloning the root partition

1) copy /dev/hda1 entries in /boot/grub/menu.list and modify to use /dev/hda5

— hd(0,N) == /dev/hdaN+1

2) reboot and make sure all filesystems are clean

3) boot using Knoppix CD

4) Bring up terminal and login as root

5) run: fsck -f -a -C -T /dev/hda1

6) run: fdisk -l /dev/hda1 (note block count size)

7) run: dd if=/dev/hda1 of=/dev/hda5 bs=1024 count=blk_cnt_size_from_above

8) do NOT use the blk count size from the "df" command

9) run: fsck -f -a -C -T /dev/hda5

10) run: mkdir /data

11) mount /dev/hda5 /data

12) change /data/etc/fstab to have "/dev/hda5" as the root filesystem

13) reboot using /dev/hda5 grub entry



Overriding DHCP creation of /etc/resolv.conf

/etc/dhclient-script



Running Apache mod_proxy via ssh tunnel

1) cd /etc/apache2/mods-enabled

2) ln -s ../mods-available/proxy.load

ln -s ../mods-available/proxy_http.load

ln -s ../mods-available/proxy_ftp.load

ln -s ../mods-available/proxy_connect.load

ln -s ../mods-available/proxy.conf

3) edit proxy.load (to do)

ProxyRequests? On

<Proxy *>

Order deny,allow

Deny from all

Allow from all

</Proxy>

4) NOTE: VERY DANGEROUS to "Allow from all"

The only reason this is ok is because the DSLmodem blocks all

port 80 inbound traffic. Otherwise this would let spammers use

this proxy.



A better way of building the root filesystem

1) Get 2ea 73Gb Raptor drives

2) Use fdisk to create 3 identical partions on each drive

a) 1st = 15Gb

b) 2nd = 15Gb

c) 3rd = remaining

3) Mirror all 3 partitions

4) Install bootloader on 1st drive (1st partition) "hd(0,1)"

5) Reinstall bootloader on 2nd drive (1st partition) "hd(1,1)"

6) After everything is working nicely

7) Clone 1st partition to 2nd partition.

8) Use remaining 3rd partition for normal RAID storage

9) Change BIOS to:

a) boot from CD/DVD first

b) boot from 1st drive / 1st partition next

c) boot from 2nd drive / 1st partition last

10) Change grub:menu.lst to boot from 1st, then 2nd partition



Doing backups

1) Clone the root partition to its clone partition

2) Also backup the mySQL database at the same time.





Managing RAID on Linux

1) Pick any 2 partitions that are the same size

2) if needed: mknod /dev/mdN b 9 N

3) mdadm create /dev/mdN level 1 --raid-devices=2 /dev/sda5 /dev/sdb7

4) monitor "/proc/mdstat" until sync completes

4) mke2fs -c -j /dev/mdN

5) Setup mdadm monitor to send mail if something goes wrong.



Problems with GPG signing in apt/aptitude ?

Take the hex number reported in the error message from apt and then run the following command:

gpg keyserver keyring.debian.org recv-keys PlaceHexNumberHere?

This should append the proper key onto the apt-key keyring.



FreeNX Server

1) Session logs in: ~/.nx/temp

2) NX user in either: /home/.nx/.ssh or /var/lib/nx/home/.ssh

3) nxserver --useradd username

4) nxserver --passwd

5) nxsetup --install

6) nxsetup --setup-nomachine-key

7) Only need 2 packages to run server: freenx and nx

8) Only need 1 package to run the client: nxclient

 



TikiWiki assistant

Thank you for installing Tikiwiki!

LoginTo begin configuring Tiki, please login as admin.

The Tikiwiki CommunityTo learn more, visit: http://tikiwiki.org.

Tikiwiki DocumentationFor help, visit http://doc.tikiwiki.org.