By chris | January 3rd, 2008
Streaming music on FreeBSD can be very easy with the right applications. I will be outlining how to stream music using the Music Player Daemon and Icecast.
Unfortunately for some reason the Music Player Daemon (mpd henceforth) is set up to not compile with support for libshout which is needed for it to play with Icecast. Luckily as long as you have libshout (/usr/ports/audio/libshout) installed getting mpd to install with support for it is fairly simple. Navigate to /usr/ports/audio/musicpd and open up the Makefile in your favorite editor. Somewhere around line 40 should be a line that reads ‘CONFIGURE_ARGS= –disable-shout’, change this to read ‘CONFIGURE_ARGS= –enable-shout’ and it should compile just fine. Why this option is explicately disabled I do not know but hopefully it will be fixed in the near future. If you go poking around in the Makefile and aren’t able to fine the line to change they may have already fixed it.
Anyway, install musicpd now followed by Icecast (/usr/ports/audio/icecast2). I also installed phpMp, a web interface for mpd to manage the stream and playlists. It can be found in /usr/ports/www/phpmp. After everything is installed go to /usr/local/etc/ to do the configuring. Along with this post are two example configuration files, mpd.cond and icecast.xml for their respective applications. In my mpd.conf I have created a user to place all the required files under. If you use the web interface this users home directory will really only have a database file used by mpd in it along with a log. If you wanted you could create a public_html for the user and run phpMp out of it. In the configuration file for mpd you will need to update the paths if they are different, the stream name if you so desire, and connection information for Icecast (host, port, password). The password and other connection details you choose should be specified the same in icecast.conf. Working from the top down in icecast.xml you should first change/specify the source and relay passwords under authentication (the one used for mpd should also be used here), the administrative username and password, the hostname for the server, and the port to run on. Unless you need to change logging information the rest should be alright.
Edit /etc/rc.conf and add the lines ‘icecast_enable=”YES”‘ and ‘musicpd_enable=”YES”‘. Then do ‘/usr/local/etc/rc.d/icecast start’ followed by ‘/usr/local/etc/rc.d/musicpd start’. If Icecast started correctly you should be able to load the status page at http://hostname:portnumber. Once you have verified that Icecast is running correctly test mpd by executing ‘mpc add <some>’ and then loading /stream.ogg from Icecast. If you can hear the music playing then congratulations, you have properly set up Icecast and musicpd.Musicpd Configuration
Icecast Configuration
Posted in apps, rootbsd | No Comments »
By chris | October 31st, 2007
Hey everyone. Just getting an announcement out there about some new scripts that have been added to the jails of all our VPS users. We have added scripts to view memory usage, view disk usage, reboot, and halt from within the jail (i.e. on the command line). All of this has been available through the web-based RootCP but now it is even easier to check if you are logged in to a shell. The reboot and halt scripts have actually been around for a while but it seems that we never got around to announcing them before.
Reboot
The binaries for the scripts are called “reboot”, “halt” (these are direct replacements for their normal counterparts). Once you halt your VPS, you will need to login to RootCP to start it up again since you will be, well, locked out of your shell.
Resource Usage
To see your RAM usage: jmemstat
To see your disk usage: jdiskstat
Do you have ideas for other improvements we could make? Send them to us! Have a problem? Drop an email to support@rootbsd.net and let us know.
Posted in announcements, vps | No Comments »
By admin | October 16th, 2007
Today we upgraded RootCP, our FreeBSD VPS management tool to version 1.5. This is the first major update we have made to RootCP and it should run noticeably faster for our users. Here are the main changes implemented in this update:
- Major speed improvements The processes that check on status variables for VPSs are streamlined to run a lot faster. This should result in faster page loading times.
- Other behind-the-scenes stuff like security enhancements and more account management functions.
- Standards compliant with XHTML 1.0 strict. Woohoo!
- Real Hostname support - The hostnames for VPSs are updated from the running environment so when you change your hostname it will trickle over to the control panel.

Posted in announcements | No Comments »
By chris | September 28th, 2007
A few weeks ago we set up a local cvsup mirror for FreeBSD at mirror.rootbsd.net that is updated every 12 hours and can be accessed by any RootBSD customers. As part of our set up process we install the most recent version of the ports tree to the new systems but you will most likely wish to update your ports tree and installed ports from time to time. To you can easily do this from the command line by executing the command,
csup /usr/share/examples/cvsup/ports-supfile
Our servers are now preconfigured to automatically use our local mirror but, if you received your server/VPS before the mirror was established you will have to add the option “-h mirror.rootbsd.net” to the above command. This will generate a lot of output which you can supress with a -L 0 to the command. It should take only a minute or so and once it returns your ports tree is fully updated.
Posted in freebsd jails, rootbsd | No Comments »
By chris | September 26th, 2007
I’ve actually made a number of changes after my original patch in the past month or so to fix a number of problems with page faults from the original patch. These page faults were caused by a null pointer in thread structures during forking. It seems to be fairly easy to demonstrate this issue by executing any program that does a decent amount of forking from inside a jail. I’m not exactly sure why these values are null, but it seems to be well outside the context of these patches. I added some simple checks for this null value and that seems to have cleared things up.
You can download the new patch here. It applies against the original version of src/sys/kern/kern_jail.c so you will need to revert it if you had previously tried to patch it.
I’ve done this work on 6.2 so I can’t say if this patch will work on other versions. This patch also includes the changes to get memory limits to be displayed. Let me know how it goes.
Posted in freebsd jails | No Comments »
By admin | September 12th, 2007
You have found the blog of RootBSD - a BSD-centric hosting service. We will be bringing you valuable insight into our top-secret hosting operations

So anyway, stay tuned to important cool stuff.
Posted in rootbsd | No Comments »