Thursday, June 5, 2008

Installing and configuring OpenSim on Fedora (from sources)

This installation was made on a Fedora Core 5 Linux (Updated 08/28/2009).

- Make installed
- gcc compiler installed
- libgdiplus installed
- svn(Subversion) installed

Make sure you have make and gcc compiler installed in your system, you will need that for building mono from sources. My installation path for mono and nant will be /opt. For the Fedora I tried installing and using the mono version from the normal yum repository but that version of mono and nant just didn't work, so we will have do download latest stable sources and build them.

Sources from:

1. Download mono sources and build - Get the latest mono source (as writing this its 1.9.1):
# cd /opt
# wget
# bunzip2 mono-1.9.1.tar.bz2 ; tar -xvf mono-1.9.1.tar

# cd mono-1.9.1
# ./configure --prefix=/opt/mono
# make ; make install

# vi /etc/profile

Add the folling lines:

# For mono install path
export PATH=/opt/mono/bin:$PATH
export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH
export MANPATH=/opt/mono/share/man:$MANPATH
export LD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH

If you run into problems for
libgdiplus and you already have it installed, its best to uninstall and download the latest version and build it yourself. Follow same steps as compiling mono.

Close and reopen your terminal for the changes to take effect.

2. Download Nant sources and Build Nant:
# cd /opt
# wget
# gunzip nant-0.86-beta1-src.tar.gz ; tar -xvf nant-0.86-beta1-src.tar

# make install prefix=/opt/nant

Edit "/etc/profile":
# vi /etc/profile

Add the folling lines:
# For Nant install path
export PATH=/opt/nant/bin:$PATH

Close and reopen your terminar for the changes to take effect

3. Download OpenSim sources and Build - I tried using the prebuild version of OpenSim for Linux, but was just to buggy, a lot of things didn't work, that why we are
#svn co opensim

#cd opensim

4. Configuration and Run
Your configuration depends on what you want, I personally choose to use MySQL database instead of default mssql, but I will explain that later.

If you are impatient aand want to use the defaults, you can just make a copy of OpenSim.ini.example to OpenSim.ini and you are al set to run.

The binaries of your build should be in opensim/bin:

#cd /opt/opensim/bin
#cp OpenSim.ini.example OpenSim.ini

#mono OpenSim.exe

If everything goes ok the terminal should throw a lot of colored text till it gets to the server prompt and will ask you a few things the first time. I assume this is a run on standalone mode, for further configuration options for grid mode refer to the OpenSim page.

The first set of prompts that start with "NETWORK SERVERS INFO", you can just hit return to accept the defaults if you will be running in standalone mode. The prompts that start with "DEFAULT REGION CONFIG" are where you need to start paying attention. Some are self-explanatory. Here are explanations for the others:
  • Grid Location - OpenSim regions can be placed anywhere on a 65536 by 65536 grid. In standalone mode, it is safe to leave these X and Y locations at their defaults.
  • Filename for local storage - Safe to leave at default.
  • Internal IP address - This should always be
  • Internal IP port for incoming UDP client connection - You can make this any port you want, but it is safe to leave at the default 9000.
  • External host name - If you have the server and the client on the same box, use default if you are running the server and the client on the same box, but if the server is in a remote box you should put the IP or hostname of the remote box. I prefer IP.
After that you will get a Region #: prompt, that means that you're done. Now the only thing left is to configure your secondlife client so it can connect to your server. Just make a copy of your access icon and go to properties and add this to the command line switches:

-loginuri -loginpage

Then start your Secondlife client as you normally do. If everything goes ok you should log whit the defaul female av on a circle island.

Ok, now you have played with your server and all, but now you want others to be able to log in with you and join.

There are some things you need to do. First make sure you have ports tcp/udp 9000 open in your ruoter and firewall.

If your Secondlife server is running on a remote box, this is how to open ports (Fedora):
Configuring firewall:
Edit /etc/sysconfig/iptables

Example(this opens port 9000):
# For OpenSim
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 9000 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9000 -j ACCEPT

To restart firewall:
# service iptables restart

Then you need to get your IP and put it in your region configuration. To make it easier I just deleted opensim/Region/default.xml and when you start your server it should ask again all the info for the region but warning, what I did was delete the region file, and I don't know if content you already made goes with it too so, its better to edit that file by hand and replace with your IP.

Next you need to create additional accounts for your friends, at the server prompt type:
create user

It should ask you the info for the new account


Bilal Ahsan said...

Thanks man, it was a great help for me.

DamJal said...

Great tutorial, it works good, thanks a lot.

I have a problem : i don't find how to install gdiplus on my fedora core 4.

Is the libgdiplus for FC3 is good ?

Anonymous said...


Anonymous said...

Hi Ruakuu

A million thanks for this. Works pretty much on Fedora Core 6. Just one thing, it threw some exceptions, on gdiplus first attempt as starting it:

yum install libgdiplus

worked fine and it's showing me a region prompt now. Thanks again, hugh barnard

Anonymous said...

You can also make the profile changes take effect by:

>. /path/to/.profile

Instead of closing/opening terminal.

Ruakuu said...

damjal: Im not really sure because I haven't tested it, if you couldn't find the installer for that library I think its best to compile from sources.

Ruakuu said...

Thanks for that last command

Gary said...

Hey, donno if you still read old comments.. but I'm having a problem with your instructions, you can see the error I'm getting at .. any ideas?