FreeBSD quote of the day #31
Monday, January 31st, 2011Need to remove all those ^M characters from a DOS file? Try
tr -d \\r < dosfile > newfile
Need to remove all those ^M characters from a DOS file? Try
tr -d \\r < dosfile > newfile
Want to strip UTF-8 BOM(Byte Order Mark) from given files?
sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
IP aliasing is the process of assigning more than one IP address to a network interface. This is useful for Apache web server virtual hosting or other network servers such as ftp server.
This tutorial explains how to assign one or more IP address to a single network interface under FreeBSD operating system.
It is possible to create network alias or assign 2 ip address to a single NIC under FreeBSD operating system.
Netmask must be different otherwise you will get an error ifconfig: ioctl (SIOCAIFADDR): File exists.
Login as the root user.
Now, use ifconfig command as follows to set alias:
# ifconfig lnc0 192.168.1.5 netmask 255.255.255.255 alias
Edit file /etc/rc.conf to setup persistent ip aliasing option by appending following configuration, so that next time FreeBSD comes up (after restart/shutdown) it will create alias for you:
ifconfig_lnc0_alias0="192.168.1.5 netmask 255.255.255.255"
Finally, Restart FreeBSD network service using network restart script:
# /etc/rc.d/netif restart && /etc/rc.d/routing restart
More information about this here: http://www.cyberciti.biz/tips/freebsd-how-to-setup-2-ip-address-on-one-nic.html
Since system administration is a difficult and perplexing task, many powerful tools were developed to make life easier for the administrator. These tools mostly provide enhancements of some sort to the way systems are installed, configured and maintained. Part of the tasks which an administrator is expected to do is to properly configure the security of a system, so that it can continue serving its real purpose, without allowing security violations.
One of the tools which can be used to enhance the security of a FreeBSD system are jails. Jails were introduced in FreeBSD 4.X by Poul-Henning Kamp phk@FreeBSD.org, but were greatly improved in FreeBSD 5.X to make them a powerful and flexible subsystem. Their development still goes on, enhancing their usefulness, performance, reliability, and security.
More information about this can be found here:
For a number of years, FreeBSD was not officially supported as a host OS by any of the available virtualization solutions. Some people were using older and mostly obsolete versions of VMware (like emulators/vmware3), which utilized the Linux® binary compatibility layer. Shortly after the release of FreeBSD 7.2, the Open Source Edition (OSE) of Sun’s VirtualBox™ appeared in the Ports Collection as a native FreeBSD program.
VirtualBox is an actively developed, complete virtualization package, that is available for most operating systems including Windows®, Mac OS®, Linux and FreeBSD. It is equally capable at running Windows or UNIX® like guests. It comes in two flavors, an open source and a proprietary edition. From the user’s point of view, perhaps the most important limitation of the OSE is the lack of USB support. Other differences may be found in the “Editions” page of the VirtualBox wiki, at http://www.virtualbox.org/wiki/Editions. Currently, only the OSE is available for FreeBSD.
More about this here: http://www.freebsd.org/doc/handbook/virtualization-host.html
Grab a newspaper because the download will take quite a while.
I have installed Tomcat from ports: cd /usr/ports/www/tomcat7/ && make install clean, added tomcat7_enable=”YES” to /etc/rc.conf but there was still something missing.
It turned out I had to add the java home to /etc/rc.conf: tomcat7_java_home="/usr/local/diablo-jdk1.6.0/"