OpenSimulator
From Snix.hk
Contents |
OpenSimulator on Fedora 9 x64
The OpenSimulator Project is a BSD Licensed Virtual Worlds Server which can be used for creating and deploying 3D Virtual Environments. [1]
This guide was written based on a Fedora 9 x64 installation. All build packages were installed into /opt.
Building & Installing on Fedora 9 x64
Prerequisites
The following packages were required for successful installation of OpenSimulator.
make gcc binutils mysql-server mysql-clients mysql bison wget zlib-devel subversion glib2-devel libtiff-devel libjpeg-devel libpng-devel libX11-devel freetype-devel libXrender-devel fontconfig-devel
Step 1: Installing Mono
Sources from: http://ftp.novell.com/pub/mono/sources-stable/
Download the latest mono source (this example used 1.9.1):
# cd /opt # wget http://ftp.novell.com/pub/mono/sources/mono/mono-1.9.1.tar.bz2 # 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
Note "glibc 2.8 no longer defines ARG_MAX constant in linux"
So you may get the following error during the compile:
foobar.c:N: error: 'ARG_MAX' undeclared (first use in this function)
To fix this problem add this to the top of the source file with the error:
#if defined(_SC_ARG_MAX) # if defined(ARG_MAX) # undef ARG_MAX # endif # define ARG_MAX sysconf (_SC_ARG_MAX) #endif
After installing, edit your .bash_profile and add the following lines:
# Mono 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
Close and reopen your terminal for the changes to take effect.
Step 2: Installing libgdiplus
Download the latest libgdiplus source (this example used 1.9):
# cd /opt # wget http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-1.9.tar.bz2 # bunzip2 libgdiplus-1.9.tar.bz2 ; tar -xvf libgdiplus-1.9.tar # cd libgdiplus-1.9 # ./configure --prefix=/opt/libgdiplus # make ; make install
After installing, edit your .bash_profile and add the following lines:
# libgdiplus export LD_LIBRARY_PATH=/opt/libgdiplus/lib:$LD_LIBRARY_PATH
Step 3: Installing Nant
Note: The BETA 1 of Nant is required for successful installation on Fedora 8
Download Nant source:
# cd /opt # wget http://ftp.novell.com/pub/mono/sources/nant/nant-0.86-beta1-src.tar.gz # gunzip nant-0.86-beta1-src.tar.gz ; tar -xvf nant-0.86-beta1-src.tar # cd nant-0.86-beta1 # make install prefix=/opt/nant
After installing, edit your .bash_profile and add the following lines:
# Nant export PATH=/opt/nant/bin:$PATH
Close and reopen your terminal for the changes to take effect.
Step 4: Installing OpenSimulator
Use Subversion to checkout the latest version of the OpenSimulator codebase:
# svn co http://opensimulator.org/svn/opensim/trunk opensim # cd opensim # ./runprebuild.sh # nant
Running OpenSimulator in Standalone Mode
Make a copy of OpenSim.ini.example to OpenSim.ini and edit to suit your desired configuration:
# cd /opt/opensim/bin # cp OpenSim.ini.example OpenSim.ini
Start the simulator:
# 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.
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 make some choices. Some are self-explanatory; and some explanations for the others:
- Grid Location - OpenSimulator 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 0.0.0.0
- Internal IP port for incoming UDP client connection - safe to leave at the default 9000.
- External host name - If you have the server and the client on the same box, use default 127.0.0.1, otherwise put your externally accessible IP address here.
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. In order for you to use the secondlife client, you will need to add the following to the startup shortcut:
-loginuri http://127.0.0.1:9000/ -loginpage http://127.0.0.1:9000/?method=login
Then start your Secondlife client as you normally do. If everything goes ok you should login on a small circle island.
Once you have everything working, the last things you will need to do is open tcp/udp port 9000 (assuming you used the default ports) on your firewall to allow external access to the server.
Creating Users
create user
Starting SecondLife Clients
Windows
C:\>"C:\Program Files\SecondLife\SecondLife.exe" -loginuri http://ipAddrOfYourSystem:9000 -loginpage http://ipAddrOfYourSystem:9000/?method=login
OSX
From the Unix command line (this will connect to your OpenSim server for this session only, reverting to the Linden servers when you start SL in the normal way):
/Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://ipAddrOfYourSystem:9000 -loginpage http://ipAddrOfYourSystem:9000/?method=login
You can edit your Second Life configuration so that it uses your OpenSim server every time you start Second Life.
Browse to where your Second Life.app file is located (by default /Applications/Second Life.app) Right-click/control click it and select Show Package Contents. Navigate to Contents and then Resources, and change the arguments.txt file to:
-loginuri http://ipAddrOfYourSystem:9000 -loginpage http://ipAddrOfYourSystem:9000/?method=login
