This file is a combination of two documents I wrote in 2001 to list changes that I would make to stock Windows and Unix systems back then. Most of the information is out of date, but some of the Unix stuff is still useful.
Changes I make to a fresh Windows 2000 system:
Some stuff I've done to my Unix system.
You've got /usr/lib, and /usr/local/lib. You've got /usr/bin, and /usr/local/bin. You've got /usr/include, and /usr/local/include. The theory is to keep your software provider's binaries and libraries around, but the result is an incompatibility-producing mess that makes DLL Hell look like a blessing. For anything in /usr/local with an equivalent in /usr, I tar up both directories and shove them under /root to be backed up later, then symlink the /usr/local item to the /usr one.
Finding files takes a hell of a long time on a Unix system. The fact that there are *checks* 566,669 files on my system might have something to do with it. I was able to check it that quickly because I set up a cron job to make a list of all the files on my system every day and store that in a file somewhere. Now finding a file (if it existed before this morning) is a simple matter of grepping through this list, much faster than the find command. The list takes up 30 megs of space, but I can afford it.
13 17 * * * root find / > /root/system.map.2; mv /root/system.map.2 /root/system.map #0 19 * * * root for i in `cat /root/system.map`; do if [ ! -L $i -a ! -d $i ]; then echo $i; fi done > /root/system.map.files.2; mv /root/system.map.files.2 /root/system.map.files
And here's something else I have in my crontab, since I'm the only person on the planet who can't get Apache to remain stable:
* */12 * * * root /usr/local/apache/bin/apachectl restart
I have added several settings, some required by user programs to work, others to simplify certain acts. The export keyword makes them available to shell scripts run by the user.
ANT_HOME=/usr/local/ant; export ANT_HOME
ANT_PATH=/usr/local/ant; export ANT_PATH
Ant has something to do with Java. Some programs need it to install. You can get it from the Apache guys.
C_INCLUDE_PATH=/usr/local/include:/usr/local/include/wx; export C_INCLUDE_PATH
CFLAGS="-pthread -g -O6 -funroll-all-loops"; export CFLAGS
-pthread is required for apps to be threaded. -g turns on debugging, which creates a larger and some say slower executable. I find myself needing debugging more than not needing it, so I can reset CFLAGS if I don't want it.
CLASSPATH=/usr/local/java:/usr/local/java/jaxp:/usr/local/java/classes; export CLASSPATH
CVSEDITOR=vi; export CVSEDITOR
CVSIGNORE="ouch test *.class"; export CVSIGNORE
CVSROOT=/usr/local/cvsroot; export CVSROOT
JAVA_HOME=/usr/local/java; export JAVA_HOME
LD_LIBRARY_PATH=/usr/lib:/usr/lib/compat:/usr/X11R6/lib:/usr/local/lib:/usr/local/lib/mysql; export LD_LIBRARY_PATH
LD_LIBRARY_PATH is a bitch. You have to include every single directory that can possibly contain a library file, and far too many apps add their own.
PAGER=/usr/bin/less; export PAGER
PATH=$PATH:/usr/local/sbin:/usr/local/java/bin:/usr/local/pgsql/bin:/usr/games:/usr/games/X; export PATH
PGDATA=/usr/local/pgsql/data; export PGDATA
PS1='[\u@\H]\w\$ '
QTDIR=/usr/local/qt; export QTDIR
QTLIB=$QTDIR/lib; export QTLIB
QTINC=$QTDIR/include; export QTINC
XML=$JAVA_HOME/jaxp; export XML
CLASSPATH=$CLASSPATH:$XML/jaxp.jar:$XML/crimson.jar:$XML/xalan.jar; export CLASSPATH; export CLASSPATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QTLIB; export LD_LIBRARY_PATH
These two are seperated from the rest because they require previously declared variables. They've been defined before, so the new statement appends to the old variable.
alias psql="psql -U postgres"
alias createdb="createdb -U postgres"
postgres is a pain in the ass. From what I understand of it, this is a major security hole equivalent of giving every user the same UID, but this is required for postgres to work at all.
alias ls="ls -F"
ls -F shows symbols that differentiate executables, directories, symlinks, etc. I use it far more often than I don't want it. If FreeBSD had ls-colours, I would turn that on here, but it doesn't so it sucks.
alias diff="diff -u"
alias gzip="gzip -9"
-9 is highest level of gzip compression. My computer's fast enough that it's not much of a performance hit. I've taken to using bzip2 instead of gzip lately.
alias mtr="mtr --curses"
Keeps mtr in your xterm rather than popping up its own useless window.
CVS_CVS=:pserver:guest@cvs.cvshome.org:/cvs; export CVS_CVS CVS_FREEBSD=:pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs; export CVS_FREEBSD CVS_MOZILLA=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot; export CVS_MOZILLA CVS_TANGY=:pserver:anoncvs@24.5.222.79:/cvsroot; export CVS_TANGY CVS_X=:pserver:anoncvs@anoncvs.xfree86.org:/cvs; export CVS_X
I defined special variables for CVS servers I use, because CVS is a pain in the ass to use and I'll never remember this shit.
DATE="date +%y%m%d"
If you use this and say `$DATE`, it spits out a numerical representation of the date. I'm in a situation where this will be useful and I'm not going to remember the formatting code(even though it's a simple one).