BSD Magazine October 2010 Issue

Check out my article in this issue, entitled  I.T. Certifications and The Value I Got In It


  • Commissioning FreeBSD with the Drupal Content Management Framework – Part 1

    With nearly 6000 modules and PHP support Drupal offers a sophisticated web development platform as well as a thriving community. Drupal, originally conceived by Dries Buytaert, has a reputation of being an extremely capable DContent Management System (CMS) albeit with a steep learning curve. While many criticisms concerning the complexity of the interface will be addressed in the forthcoming Drupal 7 release (which is currently in the alpha stage), Drupal 6 excels in stability, flexibility and high quality code. The developers also subscribe to a transparent policy towards security issues, and have a dedicated security team which ensures that core modules remain high quality. Used as the basis of many high profile sites.

  • Building VPNs on OpenBSD

    A VPN is a network made up of multiple private networks situated at different locations, linked together using secure tunnels over a public (insecure) network, typically the Internet. VPNs are becoming increasingly popular, as they allow companies to join the LANs of their branches or subsidiaries into a single private network (site-to-site VPNs) or to provide mobile employees, such as sales people, access to their corporate network from outside the premises (remote-access VPNs), thus making accessing and sharing internal information much easier.

    – Daniele Mazzocchio
  • Closed-source and unsupported drivers with FreeBSD

    Sooner or later you come to a conclusion that you need to have an enhanced mobility throughout your home place. And you decide to purchase an Wi-Fi card and put it into a home gate-keeper. Do you know about troubles that could bring this simple transaction like WiFi network card purchase?Some might ask – is it necessary to buy a WiFi-card instead of a simple AccessPoint (AP)? At first glance you can figure out that there exist the fine models of ADSL-modems with wireless capabilities and that could work as AP. However, it should be noticed that: a) not all home connections to an Internet-provider go through a „copper” like phone- or cable-line; b) you simply need to add a WiFi-capability to an already working gate; c) a WiFi-card itself costs several times cheaper of AP.

    – Anton Borisov
  • I.T. certifications and the value I got in it

    Joshua shares his experience with our readers, this time about certifications.

    – Joshua Ebarvia


Click here to download  your FREE copy…


Setting up FreeBSD 8 and Fluxbox from packages

So you want to build a system which doesn’t use KDE and GNOME as your desktop environment. Your reason? Your hardware could be old, you don’t have “big” RAM, or you just want to build a system from scratch.  This guide will help you in setting up a FreeBSD system that is light on resource and is ideal for the “not so powerful” computers you have.

First, you have to download the first disc of FreeBSD 8.1-RELEASE i386 at

It is a 650MB disc image that you will burn and use.

After burning it to a disc, you will now set your BIOS primary boot device to your CD/DVD drive and start the installation.

I will not cover the entire installation process as it is covered at

After you have successfully installed FreeBSD, you will now add the necessary packages to have your desktop ready. You will need an Internet connection here. With root privilege, type the following commands to install packages. (xorg – your x window system, fluxbox – your window manager, fox-filer your file manager, abiword – your word processor, gnumeric – your spreadsheet, firefox3 – your web browser, xine – your multimedia player, eterm – your transparent terminal, zip, unzip, and unrar for your archiving tools). You can add more packages that you want to.

# pkg_add -r xorg

# pkg_add -r fluxbox

# pkg_add -r rox-filer

# pkg_add -r abiword

# pkg_add -r gnumeric

# pkg_add -r xine

# pkg_add -r zip

# pkg_add -r unzip

# pkg_add -r unrar

# pkg_add -r eterm

# pkg_add -r firefox3

After installing all the package (a lot of patience needed here, sigh…),  you must configure your X Server. With root privilege, type the command below

# Xorg -configure

# cp /root/ /etc/X11/xorg.conf

Then you have to create your .xinitrc in your home dir.

# touch ~/.xinitrc

# echo “fluxbox” >> ~/.xinitrc

Then modify your rc.conf and add the following lines



Restart your system

shutdown -r now

Then start your Fluxbox after logging in

# startx

You need to edit your fluxbox menu to include all the packages you have installed. (this is not included in this tutorial)

Google for configuring fluxbox menu, and setting up Eterm.


Starting JBoss 5.1 automatically in FreeBSD 7.2

I have used the ports collection to install JBoss 5.1 on my FreeBSD 7.2 Box. The installation went well and as usual, the ports installation process did all the downloading and compiling of the package and its dependencies.

After installation, I need to test it to start developing. So I did a command to start it

All works well and JBoss starts. I opened a browser in my local machine and visited and the JBoss start page is loaded.

Next thing I have to do is to access JBoss on a different machine.

I then used my netbook to access http://192.168.0.***:8080 to my surprise, I didn’t get a response and an error message was displayed in my browser. I then searched the web for an answer. After a couple of links I was able to get an answer. I need to start JBoss with the option -b supplied to the script By default JBoss is binded to, meaning only the local machine can access it. So I have to find a way to start JBoss passed with that option.

Here are the steps to make JBoss automatically started on boot:
1. Add these lines at the end of /etc/rc.conf

2. The default jboss5 script in the /usr/local/etc/rc.d directory does not work with -b Therefore, you have to replace it by the /usr/local/jboss5/bin/ script. After replacing it, the “start” “stop” and “restart” options does not work with the script, but if you want to, you are free to edit the script to include it.
mv /usr/local/etc/rc.d/jboss5 /usr/local/etc/rc.d/jboss5-original-script
cp /usr/local/jboss5/bin/ /usr/local/etc/rc.d/jboss5

3. Create a bin directory at the /usr/local/etc/
mkdir /usr/local/etc/bin

4. Make a symlink for /usr/local/jboss5/bin/run.jar inside /usr/local/etc/bin
ln -s /usr/local/jboss5/bin/run.jar /usr/local/etc/bin/jbossrun.jar

5. Edit /usr/local/etc/rc.d/jboss5 so that jbossrun.jar will be the file needed to start it
vi /usr/local/etc/rc.d/jboss5

6. Find the line runjar=”$JBOSS_HOME/bin/run.jar” and replace it with runjar=/usr/local/etc/bin/jbossrun.jar

7. Run jboss by using (this does not include the start, restart, and stop options, again if you want to, you are free to edit the script to fit your needs)

8. On your next restart of FreeBSD, JBoss will start and will be accessible to other machines.


Installing Apache Geronimo 2.1 on FreeBSD 7.2

Installing Apache Geronimo 2.1 on FreeBSD using ports is as easy as 1-2-3.

First, you need a JDK, 1.5 or 1.6. Whether it is Sun, Diablo or OpenJDK or other implementations? Its up to you.
Then you need to set your environment variable JAVA_HOME to point to the installation of your JDK.

Before following the steps below, you should be the root user.

1. Go to the ports directory of apache geronimo
cd /usr/ports/www/geronimo

2. Install and compile it
make install clean

3. A configuration screen will prompt you to choose from jetty or tomcat 6
make your choice and press OK

4. Edit rc.conf so that you will start Geronimo automatically on startup
echo "enable=\"YES\"" >> /etc/rc.conf

5. To start Geronimo manually
/usr/local/geronimo2/start-server &

6. To shutdown Geronimo manually

7. If you run into problems, it seems it just a permission problem. /usr/local/geronimo2 should
be owned by www and group www.
chown -R www:www /usr/local/geronimo2

Enjoy Apache Geronimo!

Changing MySQL 5.0 root password in FreeBSD 7.2-RELEASE

So you have forgotten your mysql root password and you now have no access on you mysql server.

Here are the steps to set a new root password. (you need root privileges)

1. Stop the mysql database server
/usr/local/etc/rc.d/mysql-server stop

2. Start mysql and bypass the authentication
/usr/local/libexec/mysqld --skip-grant-tables --skip-networking --user=root &

3. Log in to mysql (without password)
mysql -h localhost -u root

4. When you’re logged and in the mysql command prompt, you set the password.
use mysql;
update user set password=password( 'yournewpassword' ) where user='root';
flush privileges;

5. Stop mysql by process id (PID)
ps ax | grep mysql
34666 p0 I 0:01.53 /usr/local/libexec/mysqld --skip-grant-tables --skip-networking --user=root &
kill -TERM 34666

5. Start mysql via /usr/local
/usr/local/etc/rc.d/mysql-server start

6. Log to mysql and use your new root password
mysql -h localhost -u root -p

7. Enjoy

FreeBSD 7.2-Release dbus error on fresh install

Just downloaded FreeBSD 7.2-RELEASE amd64 at I was so excited to install it, since 7.1 wont install on my AMD Phenom X3 8650 machine. OK, so the usual text-based installation went smooth. I chosed the GNOME packages since I have read that it includes GNOME 2.26. I also had the ports collection installed. After installation, I have to first login at the console. I have edited my .xinitrc to point it to start GNOME using gdm.

When I executed startx at the command prompt, I had this error that has something to do with dbus thing. So I have searched the FreeBSD forums for answers. I then created a thread so as for the Gurus to help. Then after sometime, I learned that the dbus should be enabled before gdm. Here is what I did.

Edit your /etc/rc.conf using your favorite editor and add the following lines to fix the dbus thing and automatically start GNOME after rebooting your computer


Restart your PC
shutdown -r now

Installing MySQL Database Server 5.1 using ports collection on FreeBSD

Installing mysql database server on FreeBSD is fairly easy. Here are the steps:
1. Be the root user
password: ********

2. If you don’t have the ports tree, use portsnap to get it
portsnap fetch extract

3. Go to the mysql directory under your ports tree
cd /usr/ports/databases/mysql51-server

4. Compile it
make install clean

5. Edit your /etc/rc.conf to enable the service and add this line

7. Install the primary databases
mysql_install_db --user=mysql

8. Make sure you change the owner and group of /var/db/mysql
chown -R mysql:mysql /var/db/mysql

9. Have a configuration file for your mysql server and edit it to adjust your needs
cp /usr/local/share/mysql/my-small.cnf /usr/local/etc/my.cnf

10. To try starting the server
/usr/local/etc/rc.d/mysql-server start

Things to remember:

To start
/usr/local/etc/rc.d/mysql-server start

To stop
/usr/local/etc/rc.d/mysql-server stop

To restart mysql
/usr/local/etc/rc.d/mysql-server restart

To check if mysql is running (results may vary specially the PID)
ps ax | grep mysql
64943 p0 R+ 0:00.00 grep mysql
64865 p1 I 0:00.01 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-f
64891 p1 I 0:00.34 /usr/local/libexec/mysqld --defaults-extra-file=/var/

And don’t forget to set root password and remove the anonymous user account/