Installing OpenSim

From Micasim

Jump to: navigation, search


Project OpenSim Physics
Project Lead Rob Knop
Project Homepage NewtonPhysics

Contents

Installing OpenSim on Linux

I use Debian and Ubuntu; I was installing on Ubuntu as I created these instructions. I suspect they'll work on most any standard Linux distribution.

Prerequisites

Downloading Mono

You need Mono-2.4 or later. This is a very recent version of Mono, and may not be what comes with your OS. As such, you probably have to go through the pain of installing it yourself.

Go to the Mono sources download page. Download at least:

  • mono-2.4.2.3.tar.bz2
  • nant-0.86-beta1-src.tar.gz

Building and Installing Mono

I strongly recommend that you build and install this under /usr/local, so as not to muck up the standard Mono that comes with your distribution (which may break other things). Here's how I do it. First, make a directory to install it:

  % cd /usr/local
  % sudo mkdir mono-2.4.2.3
  % sudo ln -s mono-2.4.2.3 mono

Change into a directory where you can unpack the mono archive and build it. Then:

  % tar jxvf mono-2.4.2.3.tar.bz2
  % cd mono-2.4.2.3
  % ./configure --prefix=/usr/local/mono-2.4.2.3

At this step, you may get complaints about things that aren't installed. Install them using your distro's package manager.

  % make
  % sudo make install

The make command will take a little while to run. The make install command installs all the various Mono files under /usr/local/mono-2.4.2.3. At this point, I stick symbolic links in the standard /usr/local directories so that the executables and libraries will be found in standard paths. I do it this way so that if I want to de-install it, I will be able to do it very easily. (I could, for instance, just remove the mono-2.4.2.3 directory and then delete all broken links.) Likewise, when I upgrade, all I have to do is repoint the /usr/local/mono symbolic link, and then add any links that are needed in the standard /usr/local directories.

  % cd /usr/local/mono/bin
  % for i in `ls` ; do if [ ! -e /usr/local/bin/$i ] ; then sudo ln -s ../mono/bin/$i /usr/local/bin/$i ; fi ; done
  % cd /usr/local/mono/lib
  % for i in `ls` ; do if [ ! -e /usr/local/lib/$i ] ; then sudo ln -s ../mono/lib/$i /usr/local/lib/$i ; fi ; done
  % sudo ln -s ../mono/share/mono-1.0 /usr/local/share/mono-1.0

Building and Installing libgdiplus

Note: This doesn't seem to be necessary for OpenSim in standalone mode, but is needed if you want to connect your region to a grid.

TO BE WRITTEN

Building and Installing nant

Make an install directory:

  % cd /usr/local
  % sudo mkdir nant-0.86-beta1
  % sudo ln -s nant-0.86-beta1 nant

Go to a directory where you can unpack the archive, and unpack it:

  % tar zxvf nant-0.86-beta1-src.tar.gz
  % cd nant-0.86-beta1
  % make prefix=/usr/local/nant-0.86-beta1
  % sudo make install prefix=/usr/local/nant-0.86-beta1

Finally, make the needed links in the standard /usr/local directories.

  % sudo ln -s ../nant/bin/nant /usr/local/bin/nant
  % sudo ln -s ../nant/share/NAnt /usr/local/share/NAnt

Installing and Running OpenSim

Download and Build OpenSim

Download it from the OpenSim download page. Unpack the archive. In this case, just unpack it where you're going to run it. (NOTE to Rob : at some point in the future, write up instructions for a more clean install.) cd into that directory and build it according to the instructions in README.txt.

  % cd opensim opensim-0.6.6-release
  % ./runprebuild.sh
  % nant

If that completes without error, you've now built OpenSim.

Of course, the directory you cd into will probably be different from this. It will depend on which source tarball you download, or if you pulled the source code out of the opensimulator git server.

Right now (2009-12-09), I recommend pulling the master branch out of the git server. That code is more stable than the last release (0.6.7), and there were changes somewhere between 0.6.6 and the present for which I've adapted the NewtonPhysics engine. As such, the current NewtonPhysics engine won't work with OpenSimulator 0.6.6, and may not work with 0.6.7.

Run OpenSim for the first time to set stuff up

This will run OpenSim in standalone mode. See below for running it in grid mode to connect it to something like OSGrid.

You'll need to make an OpenSim.ini file before you run it:

  % cp OpenSim.ini.example OpenSim.ini
  % mono OpenSim.exe

You'll be asked for a bunch of information to create your standalone OpenSim installation.

  • New Region Name : use whatever you want for your region name
  • Region UUID : accept the default
  • Region Location : accept the default
  • Internal IP Address : accept the default (127.0.0.1)
  • Internal port : accept the default (9000)
  • Allow alternate ports : accept the default (False)
  • External host name : accept the default (it will just be your host's IP)
  • Master Avatar UUID : accept the default
  • Master Avatar First Name : choose whatever you want. I use "Master"
  • Master Avatar Last Name : choose whatever you want. I use "Avatar"
  • Master Avatar sandbox password : choose something you will remember (I use... er, nevermind)]

If everything works, eventually you'll be presented with a prompt:

  Region (Test) # 

Type "quit" and hit ENTER at this prompt to quit the server.

where Test will be replaced by the name of the region you created. (I used "Test" as my region name.)


Wiping out your configuration to do it all again

If you screw up, or want to start over, remove the following files and directories from the bin directory under where you unpacked OpenSim. Then repeat the initial install.

  • userprofiles.db
  • inventoryStore.db
  • Asset.db
  • Regions/
  • OpenSim.db
  • addin-db-001/
  • OpenSim.log
  • estate_settings.xml

Logging in to your standalone OpenSim region

On the same machine where you ran the server, download and run the Hippo OpenSim Viewer. On the front page, you will see a "Grids" button. Click that. The top widget will be "Select a grid". Click on that, and select "local" from the list. Click "OK". Back on the login screen, put in the name and password of your master avatar.

If all works, voila, you've logged in to your OpenSim!

If you get an error about a missing inventory server, try quitting and rerunning the server process (rerun it in the bin directory with mono OpenSim.exe. Then try logging in with your client again.

Files to copy over to keep your region and setup to a new version