Command | Option | Example | Details |
---|---|---|---|
pkg_add | -r | pkg_add -r package_name | download and install package_name and fix dependencies |
pkg_version | pkg_version | summarize installed version of packages | |
pkg_version -vl "<" | list all obsolete packages |
There are 2 methods to install software :
Method | + | - |
---|---|---|
using the ports tree |
|
|
installing pre-compiled packages |
|
|
Installing pre-compiled packages is done through the command :
pkg_add -r package_name
Situation | The system is filling console with kern.maxpipekva exceeded, please see tuning(7), it denies ssh login, and even refuses launching processes once locally logged in. |
---|---|
Details | Kernel memory has "pipes", and "kva pipes".
|
Solution | Found here, but not sure :
|
When I got this error, the root cause was something tricky : due to a power failure, the machine crashed and HDDs where not properly unmounted. Upon reboot, the system launched an automatic fsck on the disks. It's been fast on the first disk, but it lasted way longer for the other. During that time, the system had rebooted and was trying to run "normally".
In the "normal" operations handled by this machine was a Cron job, run every minute, listing the content of the 2 HDDs. Then, since one of them was still busy being fsck'd, the script never ended, and stayed in memory until it was loaded hundreds of times and running out of "pipe kva".
From multi-user, down to single user :
shutdown now
And back to multi-user :
exit
This can also be done through the boot options, but rebooting resets the uptime. And rebooting isn't necessary : we're not running a Windoze machine ;-)
Everything is available in /etc/rc.conf
Situation | When logged as any standard user and trying to log as root via su, an error appears : su: Sorry |
---|---|
Details | Investigation shows : -bash-2.05b$ ls -l /usr/bin/su |
Solution | Just add the user willing to "su" into the wheel group:
|
Connected on : | FreeBSD name | Linux name |
---|---|---|
IDE 1 - Master | ad0 | hda |
IDE 1 - Slave | ad1 | hdb |
IDE 2 - Master | ad2 | hdc |
IDE 2 - Slave | ad3 | hdd |
On top of this, FreeBSD partitions also have a s1 added, then a purely conventional suffix :
Suffix | Meaning |
---|---|
a | reserved for the / filesystem |
b | reserved for swap filesystem |
c | wildcard referring to all filesystems (whole disk) |
d | reserved for the /var filesystem, which is specially designed for anything varying constantly such as log files |
e | reserved for (?) filesystem |
f | reserved for (?) filesystem |
g | reserved for (?) filesystem |
h | reserved for (?) filesystem |
So, on my system, I have :
... which is not very compliant to the convention :-(
FreeBSD organizes HDDs in slices then partitions. When installing a new HDD, the procedure is :
All of this can be done rather easily with the sysinstall tool :
FreeBSD ports come as an easy way of installing software (from source !). To take benefits of these :
*default host=cvsup.fr.freebsd.org *default base=/usr *default prefix=/usr *default release=cvs tag=. *default delete use-rel-suffix *default compress ports-all
Once the ports tree is available (make sure it's up-to-date), installing a FreeBSD port is just a matter of few steps :
Or :
portinstall port_name
sysinstall is a utility used for the system initial setup and for post-install operations such as configuration or applications installation. It must be run as root (in tty mode), with /usr/sbin/sysinstall.
To install the ports tree after the system setup, just run sysinstall, then go to the Distribution | Ports menu.
Notes:
Action | Command | Notes |
---|---|---|
Release a DHCP lease | dhclient -r rl0 | Once the lease has been released, the client exits. |
request a new DHCP lease | dhclient rl0 |
XDM is the X Display Manager. It's a daemon managing X sessions on the local machine. It can be launched at any time with /usr/X11R6/bin/xdm by the root user.
To start it automatically at boot time :