Sunday, September 23, 2007

Installing OpenSim 0.4 on CentOS 5 (updated 06-02-2008)

This weekend, I had the pleasure of installing OpenSim 0.4 on CentOs 5. The OpenSim project wiki has a page on installing OpenSim, which helped me on the way. But it wasn't complete enough for my taste, so here's my experiences. Enjoy!

Install Mono
First off, it was clear I needed to install Mono, even though the Opensim wiki page only mentions this for Mac OSX. For installing Mono on CentOS, I found a howto here: "Installing Mono on CentOS 5". The first thing was easy: get the latest build with wget.
# wget
# wget
# wget
Next, after bunzipping, tar -xvf etcetera, I installed Mono using the instructions linked above, like this:
# ./configure --prefix=/<installed_path>/mono
# make
# make install
Based on instructions found here I also modified my .bashrc file, and added these parameters:
export PATH=/bin:$PATH
export MANPATH=/
At this point, I was not able yet to correctly compile and install the OpenSim software. Without any clear error, NAnt didn't do what it was supposed to do. I decided to download and install Nant. The OpenSim wiki page doesn't specify this as a separate task, but I had to do it nonetheless. Again, after downloading and unzipping I executed this trinity:

# ./configure --prefix=/<installed_path>/nant
# make
# make install

After this, I was able to successfully install OpenSim itself using the commands on the OpenSim install page; but because Nant wasn't anywhere in my PATH, I had to execute them like this:

# cd opensim
# ./
# ./

I could have fixed the path, but figured that could wait until later. This worked, in any case, so I proceeded to start OpenSim.exe for the first time. Initially that seemed to work, the console logging looked good, but then I hit this snag:

Failed generating terrain map: System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: gdiplus.dll

According to the OpenSim troubleshooting page, which is called "slightly outdated" by the site maintainers, this problem is caused by incorrect versions of software on the operating system level. It was suggested to include 'unstable' packages when updating the system, as to get the newest versions. This didn't seem such a good idea, as the stability of my system is quite important to me. However, I did update or install some tools with these Yum commands, as suggested on a related website:

#yum install glib*
#yum install libtiff-devel.i386
#yum install libjpeg-devel.i386
#yum install libpng-devel.i386
#yum install giflib-devel.i386
#yum install libexif-devel.i386
#yum install libX11-devel.i386
#yum install fontconfig-devel.i386
#yum install freetype-devel.i386
#yum install libtiff-devel.i386
#yum groupinstall "Development Tools"

This didn't help. I poked around the internet for a while, and then decided to do the thing I should have done in the first place. The error says it can't find a dll, so I decided to check if the darn thing is indeed missing! It turns out it is indeed not there, and I should have installed libgdiplus ( together with Mono. I retrieved libgdiplus from this mono project page and again, I executed the configure - make - make install trilogy. Also, I didn't forget to modify the LD_LIBRARY_PATH statement in .bashrc to point to the correct install path for libgdiplus.

After that, OpenSim started just fine. I was able to run OpenSim in standalone mode, and we were able to connect to the thing.

Some useful configuration data is in this file:


It contains the sim name, master avatar username and password, ip addresses, ports and stuff like that. Handy in the first stages of configuration and running OpenSim. According to this blogpost it's possible to run multiple regions on one OpenSim installation by cloning and then modifying this default.xml page. Haven't tested that, though!

Next up: I'm going to try to run in grid mode. I actually tried that yesterday using these instructions, but that didn't work yet. Probably my error, as I've seen others run in grid mode, even though it's officially 'not supported' for OpenSim 0.4.

Update 05-02-2008: OpenSim 0.5 Earlier this week, I upgraded an earlier install of OpenSim 0.4 on a recent RedHat distro to OpenSim 0.5. It seems that the instructions above still hold true for OpenSim 0.5!


GnuX said...

hi, mi problem with centos 5, is server hang wher user closed connection. i suppose fro mono incompatibity.. have you same problem?

Sered said...

Hi gnux,
No, I do not have that problem. I start the OpenSim.exe with this script command:

#! /bin/sh

cd /opt/opensim/bin

screen -d -m mono /opt/opensim/bin/OpenSim.exe -physics=OpenDynamicsEngine

echo "opensim running in standalone mode"

It's four lines in total, I have seperated them with a whites line here for clarity.

Angel Tzara said...


I have been a long time mac user, but unfortunatly I am not very knowledgeable into the whole development side of the platform. I have been trying to follow the instructions as I have a PPC mac, and frankly it is all japanese to me.

My SL husband who is on PC was able to set it all up fine and I can do anything. I admit I have been searching for tutorials for dummies but no such luck. My main goal is to eventually connect to the OSGRID.

I would be eternally grateful if you would help me out.

Best Regards,
Angel Tzara