Cool looking discussion site for all forms of BSDen.
This time, it lead me to a cool command:
FreeBSD Hypertext Man Pages: newsyslog
This command has a config file that lists all the log files that syslogd creates. You can control how often the log files are rotated. One neat thing is just seeing all the various log files listed. You can also find more syslog info in the man entry for syslog.conf.
FreeSBIE - Free System Burned In Economy
$ /usr/games/fortune freebsd-tips
$ /usr/games/fortune -m col freebsd-tips | less
$ col -bx < DOSFIle > BSDFile
This page has lots more splash and desktop screens, including some vaguely erotic and futuristic BSD Daemons:
sshd_enable="NO"
The Complete FreeBSD by Greg Lehey. Published by O'Reilly Community Press.
From what I understand, this is a patch to GCC that adds "stack protection". The stack is part of a computer program where data is stored, and a common hack is to "overflow" the stack and using the effects of that to insert your own remote program. This patch prevents GCC, the compiler normally used on FreeBSD from allowing that to happen. You patch GCC, and rebuild the world to add the protection into the kernel. I haven't tried this yet, but I'm intrigued nonetheless.
An interesting little side note in the above web page - it has about as concise a set of instructions for rebuilding and installing the kernel that I've ever seen!
Two excellent articles on synchronizing your systems clock with the rest of the world using NTP:
Here is a complete list of the current CVS tags for FreeBSD. Use these in conjunction with cvsup and your cvsups file to grab the latest version of the source for your system:
Caught a mention of this interesting looking security package on a Linux list I'm on. Thought I'd snapshot the link so when I make my big push to harden my machine, I can look into it. First step is ifpw, though.
Here's another helpful page from FreeBSDDiary.com on using pkgdb -F.
I'm on a quest to clean up my packages database using the pkgdb -F command. When I use it now, I get dozens of errors, and it isn't very clear where to go with these. Here's a page that I found that might help:
Short tutorial on how to make certificates for http/imap servers. Scroll down to the "1. Create a local Certificate Authority".
Cool status program:
FreeBSD Hypertext Man Pages: vmstat
It's like ps, but gives you kernel statistics. Use:
$ vmstat -w 2
Okay, I finally got the new drive in there. It was complicated a little because I couldn't find the big foldout instructions for the drive (a Western Digital WD4000). Not that I haven't installed dozens of hard drives, but I was a little confused about the jumper on the CS jumpers. But I just moved it to the Slave jumpers, and later found the folder in my mess on the desk. CS means Cable Select, where I guess the Master/Slave stuff can be done automagically. I never use it.
Then I tried following the directions in the FAQ as mentioned earlier, but it is so out of date as to be almost useless. Here's how I ended up doing it, after a few false starts:
/dev/ad1s1b none swap sw 0 0
/dev/ad1s1e /usr/data ufs rw 2 2
The first line is for my new swap space and the second line is for the 39gb data partition. I couldn't find anything that easily displayed the /dev devices, so I had to go back into sysinstall and see what it displayed.
Shutdown has an option that I didn't know about. Not that I use it at all for my server machine, but still it's a handy thing to know about.
$ shutdown -p now
The '-p' option will make your computer power down after the shutdown, so you don't have to hold in the power switch. Mind you, there seems to be some controversy on the -questions list as to whether it works in 4.x or 5.x. I'll have to try it later today when I shut down my server to install a new hard drive.
I'm going to be moving the MySQL server on my machine from 3.x to 4.0 pretty soon, so I'm always on the lookout for notes on this process. It seems a little scary, because a few things depend on this, like PHP and Apache, so I'm not entirely clear on all the ramifications. Luckily, it seems that backing up the database is pretty easy:
$ mysql
mysql> flush tables with read lock
mysql> ^Z
$ cd /var/db
$ cp mysql mysql.today'sdate
$ fg
mysql> unlock tables
mysql> ^D
$
That will create a nice copy of the database files. Here's a nice message on how to upgrade to 4.1 (which isn't production yet, so I'm just going to 4.0):
su
cvsup -g -L2 /usr/share/examples/cvsup/ports-supfile
cd /usr/ports/databases/mysql4.1-server
make install distclean
rehash
mysqld_safe &
mysqladmin -u root password 'this_is_the_password'
mysql -u root --password='this_is_the_password''
mysql>
There should be a file in /usr/local/etc/rc.d called 'cups.sh.sample'.
If you want cups to start with every boot (most likely) copy that file
to 'cups.sh'. Make sure you are not running the base system lpd. Check
your '/etc/rc.conf' file and make sure there is no "lpd_enable=yes" line
present. To start cups without rebooting, enter: