2010-12-23

Notes on Compiling SeqHound

  1. Compile NCBI
    1. make sure link the actual makefile in platform/ to the root level
    2. make sure the paths in the linked makefile are modified to your environment
  2. Compile SLRI
    1. make sure $NCBI is set
    2. link lib/*.mk to root level
    3. cd lib && make lib
  3. Compile bzip2
  4. Compile libiodbc (as ODBC dependency)
  5. Set environment var $NCBI, $SLRI, $ODBC, and $BZDIR
  6. Comment out ValNodeUnique in seqhound/include/intrez_misc.h and seqhound/src/intrez_misc.c
  7. cd seqhound && ./makeallsh odbc all

2010-12-17

Secure GRUB

Version 1 (aka 0.98)
Reference cyberciti.biz
  1. #grub-md5-crypt
    Password:
    Retype password:
    $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0
  2. # vi /boot/grub/menu.lst (Red Hat /boot/grub/grub.conf)
    Edit file and add a password line as follows:
    password --md5 $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0

Sample config file:
default 0
timeout 5
password --md5 $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0
title Debian GNU/Linux, kernel 2.6.13.4-cust-en-smp
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda3 ro
savedefault
boot


Version 2 (aka 1.98)
Reference ubuntuforums.org

Linux notes

skill -STOP -u username Pause somebody.
skill -KILL -u username Kick out somebody.
skill -KILL -v /dev/pts/* Kick all out.

last show successful logins
lastb show bad logins
lastlog show latest logins of all/any users.
/var/log/btmp bad logins
/var/log/wtmp successful logins
/var/run/utmp current logins

Set date and time
# date -s "2 OCT 2006 18:00:00"
# date --set="2 OCT 2006 18:00:00"
# date +%Y%m%d -s "20081128"
# date +%T -s "10:13:13"

Get hardware info
/sbin/lspci
/sbin/lsusb
lshw

route -n
shows the routing table, the gateway will be flagged with a 'G'

If DNS is not properly configured, go to /etc/resolv.conf, check or add line nameserver x.x.x.x

To pipe wget download content:
wget -q url -O - | cat > abc.txt

For ubuntu 10.10
Edit /etc/default/grub & run update-grub to set the booting preferences

2010-12-16

Ubuntu Server 10.10 (As desktop use)

Hate OpenOffice? Dislike the integrated IM software? Feel sick about GNOME games? This solution might help to build the desktop from scratch that avoids most unnecessary components.

Installation:
  1. Get a ubuntu server iso, and install it the debian way.
  2. Modify /etc/apt/sources.list to your satisfaction.
  3. Configure Medibuntu source: https://help.ubuntu.com/community/Medibuntu

Addition:
  • Basic:
    • vim
  • Desktop:
    • xserver-xorg
    • gnome-core
    • gdm
    • gnome-themes-selected
    • humanity-icon-theme
    • gcalctool (the calculator)
    • chromium-browser
    • gnome-screensaver
    • flashplugin-installer
    • language-support-??
    • *network-manager
    • *network-manager-openconnect (for Cisco AnyConnect VPN)
    • *wine
  • Security:
    • vlock
  • Development:
    • g++
    • openjdk-6-jre
    • qt4-dev-tools
    • *dia
    • *mysql-server
    • *mysql-admin
    • *python-mysqldb
  • Remote access:
    • vinagre (the client)
    • vino (the server)
  • Media:
    • vlc
    • mozilla-plugin-vlc
    • libdvdcss2
    • ubuntu-restricted-extras
  • Printing:
    • system-config-printer-gnome
    • cups
    • *smbclient (for Windows shared printing)
    • *hplip (HP printer drivers)

Configuration:
  • Clear screen when logout:
    1. ~/.bash_logout
    2. insert single command clear
  • Disable Ctrl-Alt-Del:
    1. /etc/init/control-alt-delete.conf
    2. comment out the actual command line
  • Secure login/out logs:
    1. sudo chmod 640 `sudo find /var -name ?tmp`
  • Stop GDM from auto starting:
    1. /etc/init/gdm.conf
    2. comment out all "start on" stuff
  • Configure GRUB:
    1. /etc/default/grub
    2. update-grub
  • MySQL
    1. /etc/mysql/my.cnf
    2. to reset root password: sudo dpkg-reconfigure mysql-server-5.1