FreeBSD

From Hackepedia
Jump to navigationJump to search

FreeBSD is an open-source operating system based on 4.4BSD lite2. The FreeBSD Project Homepage. The FreeBSD project has probably the most developers out of any BSD project currently active.


FreeBSD 9.2-RELEASE

The current version of FreeBSD is 9.2-RELEASE

FreeBSD Release page

rc.conf recommendations

/etc/rc.conf recommendations:

This will stop syslog from opening a socket. This is highly recommended unless you do remote syslogging. If you're unsure, you can safely make this change.

syslogd_flags="-ss"


You can get defaults for /etc/rc.conf out of /etc/defaults/rc.conf. This is very helpful, if you use grep against that you can pull out what you need and change it.

Jails

Jails are a way to contain an instance of userland in a chroot-like setting. Some VPS providers use Jails as their service. See Jails.

Ports

Cleanup hints if you're using ports. Once in a while look for:

# ls /usr/ports/distfiles/

which is leftover packages you've downloaded to install. You can remove these if the install is complete

# find /usr/ports/ -name work -type d -print 

this is old work directories left around from an install you've done. When you install from ports if you do:

# make install distclean

the distclean will clean this work directory as well as the distfiles.

Also make sure you have a regular patching process.


FreeBSD:php Help with installing php from ports on FreeBSD. FreeBSD:apache22:ssl Getting SSL working with apache22.


You may want to look at special defines when using ports. For example, if you wanted to compile mtr from ports without X11:

$ cd /usr/ports/net/mtr
$ grep defined Makefile 
.if defined(WITHOUT_X11)
.if defined(WITHOUT_IPV6)

# make -DWITHOUT_X11 install distclean

Hints

Unlike cat(1) on most OS', the cat on FreeBSD can't handle cat'ing directories:

$ cat elcheapo/
Ê
 .

and then the terminal will appear to lock up. If you type "reset" (even though you will not see your typing) when this happens you will rescue your session so you don't have to quit it and start over.


Patching

# cat /bin/update
portsnap fetch update
/usr/local/sbin/portaudit -Fda
pkg_version  -v -l "<"


# cat /bin/upgrade
/usr/local/sbin/portupgrade -a

Once you have these two scripts, run each regularly, at your convenience.

Ported Programs that Originated at FreeBSD

  • ipfw runs on FreeBSD, DragonflyBSD and Mac OS X
  • a lot of wifi and ethernet drivers written mainly by Bill Paul.