Linux Gridserver

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(rewrite according to moo installation)
Line 5: Line 5:
 
* Mono 1.9.1 - .NET framework
 
* Mono 1.9.1 - .NET framework
 
* OpenSSH - Remote terminal connection
 
* OpenSSH - Remote terminal connection
 +
* RSync - Remote backup tool
 
* Nant - Building tool
 
* Nant - Building tool
* Ratbox Ircd - IRC chat
+
* Ngircd  - Easy and fast IRC-server
* Asterisk - Voice
+
 
* SVN - Backup
 
* SVN - Backup
 
* Screen - Multiple terminal-sessions
 
* Screen - Multiple terminal-sessions
 +
  
 
==Setup a Grid==
 
==Setup a Grid==
===Step 1: Create a suitable production direction structure===
+
===Step 1: Installation with Moo===
  cd /opt
+
* Download the Moo script from console as root in somedir (e.g. ~/source/moo)
  mkdir opensim opensim/production opensim/builds opensim/scripts opensim/library/ opensim/source opensim/backup
+
  wget http://os-networks.net/downloads/Moo.tar.gz
 +
* Unpack
 +
  tar xvfz Moo.tar.gz
 +
* Start the Moo-installer
 +
./moo install
 +
Moo: Install OpenSimulator in /opt/opensim? (y/n) <=y
 +
This will install the latest svn along with the "right" directory structures in /opt/opensim
 +
Next thing you see something like:
 +
Moo: Ok, we need some basic config-files. Renaming...
 +
Moo: Take a sip of coffee. This part might be important.
 +
Moo: I will try to create a database based on the information you provide.
 +
Moo: Now edit mysql_connection.ini, so MySQL can do it's thing...
 +
 
 +
Press any key to continue
 +
If you don't know the vi-editor, please read up a bit about that before editing or you may become frustrated with it :-)
 +
So, change database, username and password to reflect your MySQL settings. Save the file now, and quit the editor. After this you'll
 +
notice you end up in yet another config-file. This is OpenSim.ini...
 +
 
 +
There are alot of settings you can tweak, but for now I'll stick with the most basic settings to start a grid.
 +
* Set gridmode to true
 +
* Disable current storage_plugin and storage_connection_string (disabling by putting ';' at the start of the line)
 +
* Enably mysql storage_plugin and storage_connection_string (and enter the right db-info into the connection string)
 +
* Change asset_database to "grid"
 +
* Set serverside_object_permissions to true
 +
* Set meshing to Meshmerizer
 +
* Set physics to OpenDynamicsEngine
 +
* Save and exit
 +
The administrator menu will now autostart.
 +
* Select services menu > Start UGAIM Services
 +
When it says done, press exit
 +
* Now select User-Service
 +
USER SERVER: Default Startup Message [Welcome to OGS]: Welcome to my gridservices
 +
USER SERVER: Default Grid Server URI [http://127.0.0.1:8001/]: <enter>
 +
USER SERVER: Key to send to grid server [null]: <enter>
 +
USER SERVER: Key to expect from grid server [null]: <enter>
 +
USER SERVER: Default Inventory Server URI [http://127.0.0.1:8004/]: <enter>
 +
USER SERVER: DLL for database provider [OpenSim.Data.MySQL.dll]: <enter>
 +
USER SERVER: Connection String for Database []:
 +
Data Source=localhost;Database=opensim;User ID=dbuser;Password=dbpw;
 +
USER SERVER: Http Listener port [8002]: <enter>
 +
USER SERVER: Use SSL? true/false [False]: <enter>
 +
USER SERVER: Known good region X [1000]: <enter>
 +
USER SERVER: Known good region Y [1000]: <enter>
 +
Setup is now completed, and the User service should be fine now. Press ctrl-a + d to return to the Moo-menu.
 +
 
 +
Select the Grid-service
 +
 
  
===Step 2: Get the software===
 
We are going to install the latest and greatest opensim svn-server from the svn-trunk.
 
cd /opt/opensim/builds
 
svn info http://opensimulator.org/svn/opensim/trunk
 
Now get the revision-number(4523 at the moment), and make a directory for it...
 
mkdir 4523
 
cd 4523
 
svn co http://opensimulator.org/svn/opensim/trunk .
 
  
 
===Step 3: Setup a first run===
 
===Step 3: Setup a first run===

Revision as of 04:05, 3 July 2008

This tutorial is meant to setup a production environment on your Linux-server.

Contents

Recommended Software and Versions

  • Archlinux - Fast and lightweight linux-distro
  • Mono 1.9.1 - .NET framework
  • OpenSSH - Remote terminal connection
  • RSync - Remote backup tool
  • Nant - Building tool
  • Ngircd - Easy and fast IRC-server
  • SVN - Backup
  • Screen - Multiple terminal-sessions


Setup a Grid

Step 1: Installation with Moo

  • Download the Moo script from console as root in somedir (e.g. ~/source/moo)
wget http://os-networks.net/downloads/Moo.tar.gz
  • Unpack
tar xvfz Moo.tar.gz
  • Start the Moo-installer
./moo install
Moo: Install OpenSimulator in /opt/opensim? (y/n) <=y

This will install the latest svn along with the "right" directory structures in /opt/opensim Next thing you see something like:

Moo: Ok, we need some basic config-files. Renaming...
Moo: Take a sip of coffee. This part might be important.
Moo: I will try to create a database based on the information you provide.
Moo: Now edit mysql_connection.ini, so MySQL can do it's thing...
Press any key to continue

If you don't know the vi-editor, please read up a bit about that before editing or you may become frustrated with it :-) So, change database, username and password to reflect your MySQL settings. Save the file now, and quit the editor. After this you'll notice you end up in yet another config-file. This is OpenSim.ini...

There are alot of settings you can tweak, but for now I'll stick with the most basic settings to start a grid.

  • Set gridmode to true
  • Disable current storage_plugin and storage_connection_string (disabling by putting ';' at the start of the line)
  • Enably mysql storage_plugin and storage_connection_string (and enter the right db-info into the connection string)
  • Change asset_database to "grid"
  • Set serverside_object_permissions to true
  • Set meshing to Meshmerizer
  • Set physics to OpenDynamicsEngine
  • Save and exit

The administrator menu will now autostart.

  • Select services menu > Start UGAIM Services

When it says done, press exit

  • Now select User-Service
USER SERVER: Default Startup Message [Welcome to OGS]: Welcome to my gridservices
USER SERVER: Default Grid Server URI [1]: <enter>
USER SERVER: Key to send to grid server [null]: <enter>
USER SERVER: Key to expect from grid server [null]: <enter>
USER SERVER: Default Inventory Server URI [2]: <enter>
USER SERVER: DLL for database provider [OpenSim.Data.MySQL.dll]: <enter>
USER SERVER: Connection String for Database []:
Data Source=localhost;Database=opensim;User ID=dbuser;Password=dbpw;
USER SERVER: Http Listener port [8002]: <enter>
USER SERVER: Use SSL? true/false [False]: <enter>
USER SERVER: Known good region X [1000]: <enter>
USER SERVER: Known good region Y [1000]: <enter>

Setup is now completed, and the User service should be fine now. Press ctrl-a + d to return to the Moo-menu.

Select the Grid-service


Step 3: Setup a first run

  • We first build the binaries now
sh ./runprebuild.sh
nant
  • I hope for you that the build will be succesful. If not, check out your mono-version and check out if all dependencies are available. Now we copy the build to the production directory
cd bin
cp -R * /opt/opensim/production
  • Prepare the configuration-files
cd /opt/opensim/production
cp OpenSim.ini.example OpenSim.ini
cp mysql_connection.ini.example mysql_connection.ini
  • Setup mysql-storage in OpenSim.ini and mysql_connection.ini (don't setup Grid-mode yet)
  • Run /opt/opensim/scripts/iptables.sh, to fix the router-loopback issue
  • Edit /etc/hosts.allow, and make sure it allows the service you are running (OpenSim thinks localhost is your LAN-IP, not the loopback-device). The 192.68.1. part is your local-ip range. We are setting up local allowance for the mysql-daemon, and global allowance of the SSH-daemon:
mysqld: 192.168.1. 127.0.0.1 localhost
sshd: ALL
  • Now run OpenSimulator
cd /opt/opensim/production
mono OpenSim.exe
  • If the settings are correct, OpenSim will ask you to setup initial settings. Enter your administrator avatar info, the LAN-IP for internal IP, and the WAN-IP for external ip. After everything is entered, the region-server will run in standalone mode. We now setup Grid mode.

Step 4: Setup a Grid server

In our configuration, we will have the mysql-server, the UGAI-services and one Region-Service on our box. It's easy to extend it later with more Region-Services and/or other boxes.

  • Copy the ugair script to /opt/opensim/scripts
  • Run the script
cd /opt/opensim/scripts
sh ugair.sh
  • Start the UGAIR-services
  • Switch to each Screen session, and go through the initial service setup of each service
  • Make sure you have the Region Server running in grid-mode (check OpenSim.ini)


Step 4:Adding custom textures

Check out Inworld Data


See also Ogltree_Install_Instructions

Personal tools
General
About This Wiki