Outline
- Outline
- System requirements
- Clean install on Ubuntu Server 8.10 with Mono 2.4
- Connect
- Create user
- Give user sudo rights
- Re-connect and set user environment
- Update aptitude cache
- Install Manuals
- Install and configure Emacs text editor
- Install and configure IPtables firewall
- Install Screen windows/console manager
- Install and configure VSftpd FTP server
- Install and configure Apache2 web server
- Install and configure MySQL
- Install SVN and NANT
- Install and configure Mono 2.4.2.3
- Install OpenSimulator server
- Configure OpenSimulator server for standalone mode
- Increase stack size
- Start OpenSimulator server in standalone mode for the first time
- Connect to OpenSimulator in standalone mode
- Stop Opensimulator server in standalone mode
- Configure OpenSimulator server for grid mode
- Create more OpenSimulator regions
- Start OpenSimulator grid servers for the first time
- Create OpenSimulator master avatar
- Start OpenSimulator region server in grid mode for the first time
- Check OpenSimulator servers console-less in grid mode
- Connect to OpenSimulator in grid mode
- Load OpenSimulator terrains
- Connect to OpenSimulator server in grid mode
- Redraw OpenSimulator world map
- Add OpenSimulator users
- Maintenance
- Update OpenSimulator server
- Stop (old) OpenSimulator server in grid mode
- Re-start (new) OpenSimulator server in grid mode
- Autostart OpenSimulator server in grid mode
- Auto-restart OpenSimulator region server
- De-activate auto-restart of OpenSimulator region server
- Re-activate auto-restart of OpenSimulator region server
- Backup OpenSimulator MySQL database
- Drop OpenSimulator MySQL database
- Initialize OpenSimulator MySQL database
- Restore OpenSimulator MySQL database
- Environment checks
System requirements
You actually can make the server run on almost any system that will survive a 32bit Ubuntu 8 server installation.
However, a virtual world server can be a real hog when it comes to CPU, memory and bandwidth. (Surprise!)
So, I suggest at least 1.5 GHz CPU, 768 Mbyte memory without swap disk, 20 Gbyte HD and a T1 Internet connection.
At least that seems to suffice for the configuration presented below.
page top
Clean install on Ubuntu Server 8.10 with Mono 2.4,
minimal installation with OpenSSH:
This is a simple installation log to set up an environment for OpenSimulator server,
and to install and configure the server and the virtual world some.
There are alternative and perhaps better ways of doing it, but this works for me.
If you follow this log, you will probably want to change some names and passwords
from the generic ones below
(e.g. lx_user, lx_pass, Linux User, ms_pass, os_pass, Firstname, Lastname, gr_pass).
ip_address must be changed to the domain name or ip number to your server,
preferrably the ip number in the configuration files.
Otherwise, much could simply be copied and pasted into a terminal/console.
page top
Connect
New terminal
ssh root@ip_address
rt_pass
page top
Create user
For safety reasons you should use another user than the root user.
adduser lx_user
lx_pass
lx_pass
Linux User
y
page top
Give user sudo rights
For some actions the new user will need root permissions.
Vi manual
sudo visudo
lx_pass #(if requested)
move to end of file
a
lx_user<tab>ALL=(ALL) ALL
<esc>
:x
page top
Re-connect and set user environment
Reducing the risk of messing up the environment, which can easily be done as root.
exit
ssh lx_user@ip_address
lx_pass
mkdir ~/downloads
mkdir ~/backups
mkdir ~/opensim
mkdir ~/www
mkdir ~/www/cgi-bin
page top
Update aptitude cache
To be able to install packages more recent than the present Linux package.
sudo aptitude update
lx_pass #(if requested)
page top
Install Manuals
To be able to check up commands using 'man command'.
sudo aptitude install man-db
lx_pass #(if requested)
y
page top
Install and configure Emacs text editor
A powerful text editor which I prefer.
aptitude search emacs
sudo aptitude install emacs22
lx_pass #(if requested)
y
mkdir ~/.emacs_backups
emacs ~/.emacs
<Ctrl-l>
;; Emacs configuration
;; skip splash screen
(setq inhibit-splash-screen t)
;; save backups in one directory
(setq make-backup-files t)
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))
<Ctrl-x><Ctrl-c>y
sudo -i
lx_pass #(if requested)
mkdir ~/.emacs_backups
emacs ~/.emacs
<Ctrl-l>
;; Emacs configuration
;; skip splash screen
(setq inhibit-splash-screen t)
;; save backups in one directory
(setq make-backup-files t)
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))
<Ctrl-x><Ctrl-c>y
exit
page top
Install and configure IPtables firewall
Increases security on your server, may need adaption depending on your services.
aptitude search iptables
sudo -i
lx_pass #(if requested)
aptitude install iptables
iptables -L
mkdir /etc/iptables
iptables-save > /etc/iptables/default.rules
emacs /etc/iptables/flush.bash
enter text from file
<Ctrl-x><Ctrl-c>y
chmod +x /etc/iptables/flush.bash
/etc/iptables/flush.bash
iptables-save > /etc/iptables/no.rules
emacs /etc/iptables/build.bash
enter text from file
<Ctrl-x><Ctrl-c>y
chmod +x /etc/iptables/build.bash
/etc/iptables/build.bash
iptables-save > /etc/iptables/prod.rules
ls /etc/init.d
emacs /etc/init.d/iptables.sh
#!/bin/bash
iptables-restore < /etc/iptables/prod.rules
exit 0
<Ctrl-x><Ctrl-c>y
chmod +x /etc/init.d/iptables.sh
update-rc.d iptables.sh defaults
exit
page top
Install Screen windows/console manager
Required for running multiple tasks, e.g. OpenSimulator, or in background.
sudo aptitude install screen
lx_pass #(if requested)
screen -ls #(test of installation)
page top
Install and configure VSftpd FTP server
Required for transferring files like backups and archives to and from the server.
sudo -i
lx_pass #(if requested)
aptitude search vsftpd
aptitude install vsftpd
y
emacs /etc/vsftpd.conf
edit or add the following parameters:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
ftpd_banner=Welcome to SomeGrid FTP service.
chroot_local_user=YES
pasv_min_port=62000
pasv_max_port=64000
<Ctrl-x><Ctrl-c>y
/etc/init.d/vsftpd restart
exit
page top
Install and configure Apache2 web server
Useful for presenting information on the web.
sudo -i
lx_pass #(if requested)
aptitude install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert
y
emacs /etc/apache2/sites-available/default
add and edit beginning of file:
NameVirtualHost *
<VirtualHost *>
<Ctrl-x><Ctrl-c>y
emacs /etc/apache2/sites-available/ip_address.vhost
enter text from file
<Ctrl-x><Ctrl-c>y
ln -s /etc/apache2/sites-available/ip_address.vhost /etc/apache2/sites-enabled/ip_address.vhost
exit
emacs ~/www/index.html
<h1>Website </h1>
<Ctrl-x><Ctrl-c>y
sudo apache2ctl restart
page top
Install and configure MySQL
Required for heavy data management.
sudo aptitude install mysql-server mysql-client libmysqlclient15-dev
lx_pass #(if requested)
Y
Y
ms_pass
ms_pass
mysql -u root -p
ms_pass
CREATE DATABASE opensim;
GRANT ALL ON opensim.* TO 'os_user' IDENTIFIED BY 'os_pass';
GRANT ALL ON opensim.* TO 'os_user'@'localhost' IDENTIFIED BY 'os_pass';
SET GLOBAL wait_timeout=604800;
QUIT;
page top
Install SVN
Required for maintaining the OpenSimulator Server.
sudo aptitude install subversion
lx_pass #(if requested)
y
page top
Install and configure Mono 2.4.2.3
The application platform on which OpenSimulator is built.
sudo -i
lx_pass #(if requested)
aptitude install build-essential
y
y
aptitude install pkg-config
y
aptitude install bison
y
aptitude install libglib2.0-0 libglib2.0-dev
y
aptitude install libpng12-dev
y
aptitude install libtiff4-dev
y
aptitude install libjpeg62-dev
y
aptitude install libungif4-dev
y
aptitude install libexif-dev
y
aptitude install libx11-dev
y
aptitude install libfontconfig1-dev
y
aptitude install libfreetype6-dev
y
aptitude install gettext
y
aptitude remove 'mono-*' libgdiplus #(removes old components, if any)
aptitude install mono-common
y
exit
cd /home/lx_user/downloads
wget -c http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.4.2.tar.bz2
tar xvf libgdiplus-2.4.2.tar.bz2
cd /home/lx_user/downloads/libgdiplus-2.4.2/
./configure --prefix=/usr/local
make
sudo make install
lx_pass #(if requested)
cd /home/lx_user/downloads
wget -c http://ftp.novell.com/pub/mono/sources/mono/mono-2.4.2.3.tar.bz2
tar xvf mono-2.4.2.3.tar.bz2
cd /home/lx_user/downloads/mono-2.4.2.3/
./configure --prefix=/usr/local --with-large-heap=yes
make
sudo make install
lx_pass #(if requested)
sudo rm /usr/bin/cli #(only needed if old install exists)
sudo ln -s /usr/local/bin/mono /usr/bin/cli
sudo /sbin/ldconfig
cd /home/lx_user/downloads
wget -c http://switch.dl.sourceforge.net/sourceforge/nant/nant-0.86-beta1-src.tar.gz
tar xvf nant-0.86-beta1-src.tar.gz
cd /home/lx_user/downloads/nant-0.86-beta1/
make
sudo make install
lx_pass #(if requested)
cd /home/lx_user/downloads
rm -rf *
sudo -i
lx_pass #(if requested)
emacs /etc/profile.d/mono.sh
#!/bin/sh
export MONO_THREADS_PER_CPU=500
<Ctrl-x><Ctrl-c>y
chmod +x /etc/profile.d/mono.sh
/etc/profile.d/mono.sh
exit
page top
Install OpenSimulator server
svn info http://opensimulator.org/svn/opensim-track/trunk | fgrep Revision | awk '{print $2}' #(gives latest version, e.g. 455)
svn -r 455 co http://opensimulator.org/svn/opensim-track/trunk ~/opensim/t00455
ln -s ~/opensim/t00455 ~/opensim/prod
cd ~/opensim/prod
chmod +x runprebuild.sh
./runprebuild.sh
nant
page top
Configure OpenSimulator server for standalone mode
Most of these configurations are really over-kill for a test standalone, but sources are necessary.
cp ~/opensim/prod/bin/OpenSim.ini.example ~/opensim/prod/bin/OpenSim.ini
emacs ~/opensim/prod/bin/OpenSim.ini
Edit the following lines except for the section flags [XXX]
The exact configuration in the OpenSim.ini may depend on the OpenSimulator server version installed.
[Startup]
TextureOnMapTile = true
permissionmodules = "DefaultPermissionsModule"
serverside_object_permissions = true
WorldMapModule = "WorldMap"
MapImageModule = "MapImageModule"
[SMTP]
[Communications]
[Standalone]
welcome_message = "Welcome to SomeGrid"
[Network]
[ClientStack.LindenUDP]
[Chat]
[Messaging]
[ODEPhysicsSettings]
[RemoteAdmin]
[RestPlugins]
[RestRegionPlugin]
[RestHandler]
;[IRC]
;[CMS]
;[Sun]
[Wind]
[Cloud]
[Trees]
[VectorRender]
[ScriptEngine.DotNetEngine]
[LL-Functions]
[DataSnapshot]
gridname = "SomeGrid"
[Economy]
[SVN]
[XEngine]
[GridInfo]
login = http://ip_address:9000/
gridname = "Some simple OpenSimulator grid"
gridnick = "SomeGrid"
[OpenGridProtocol]
[Concierge]
[RegionReady]
[MRM]
[Hypergrid]
[VivoxVoice]
[FreeSwitchVoice]
[Groups]
[PacketPool]
[InterestManagement]
[DatabaseService]
[AssetService]
[GridService]
[Architecture]
[Modules]
[XMLRPC]
<Ctrl-x><Ctrl-c>y
cp ~/opensim/prod/bin/config-include/StandaloneCommon.ini.example ~/opensim/prod/bin/config-include/StandaloneCommon.ini
emacs ~/opensim/prod/bin/config-include/StandaloneCommon.ini
Actually, nothing needs to be edited in this file.
<Ctrl-x><Ctrl-c>
page top
Increase stack size
Recommended if using the OpenDynamicsEngine for physics.
ulimit -s 262144
page top
Start OpenSimulator server in standalone mode for the first time
Practical for testing the OpenSimulator server and creating a region XML template (~/opensim/prod/bin/Regions/default.xml).
cd ~/opensim/prod/bin
screen -S osserver mono OpenSim.32BitLaunch.exe
Something Central
1000,1000
0.0.0.0
9000
False
ip_address
00000000-0000-0000-0000-000000000000
Firstname
Lastname
gr_pass
<Ctrl-a>d
screen -ls
page top
Connect to OpenSimulator in standalone mode
Practical for testing the OpenSimulator server.
New terminal
/Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://ip_address:9000/ #(on Macintosh)
Second Life viewer
Firstname
Lastname
gr_pass
Something Central
Check around
Quit Second Life viewer
exit
page top
Stop Opensimulator server in standalone mode
Best practice not to risk corrupting databases.
OpenSimulator terminal
screen -r osserver
quit
page top
Configure OpenSimulator server for grid mode
Mainly changing to grid mode and exchanging storage from light duty SQLite to heavy duty MySQL.
emacs ~/opensim/prod/bin/OpenSim.ini
Edit the following lines except for the section flags [XXX]
The exact configuration in the OpenSim.ini may depend on the OpenSimulator server version installed.
[Startup]
gridmode = true
;storage_plugin = "OpenSim.Data.SQLite.dll"
;storage_connection_string="URI=file:OpenSim.db,version=3";
storage_plugin="OpenSim.Data.MySQL.dll"
storage_connection_string="Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;";
[SMTP]
[Communications]
[Standalone]
; inventory_plugin = "OpenSim.Data.SQLite.dll"
inventory_plugin = "OpenSim.Data.MySQL.dll"
; inventory_source = "URI=file:inventoryStore.db,version=3"
inventory_source = "Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;"
; userDatabase_plugin = "OpenSim.Data.SQLite.dll"
userDatabase_plugin = "OpenSim.Data.MySQL.dll"
; user_source = "URI=file:userprofiles.db,version=3"
user_source = "Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;"
[Network]
[ClientStack.LindenUDP]
[Chat]
[Messaging]
[ODEPhysicsSettings]
[RemoteAdmin]
[RestPlugins]
[RestRegionPlugin]
[RestHandler]
;[IRC]
;[CMS]
;[Sun]
[Wind]
[Cloud]
[Trees]
[VectorRender]
[ScriptEngine.DotNetEngine]
[LL-Functions]
[DataSnapshot]
[Economy]
[SVN]
[XEngine]
[GridInfo]
login = http://ip_address:8002/
[OpenGridProtocol]
[Concierge]
[RegionReady]
[MRM]
[Hypergrid]
[VivoxVoice]
[FreeSwitchVoice]
[Groups]
[PacketPool]
[InterestManagement]
[DatabaseService]
[AssetService]
[GridService]
[Architecture]
;Include-Standalone = "config-include/Standalone.ini"
Include-Grid = "config-include/Grid.ini"
[Modules]
[XMLRPC]
<Ctrl-x><Ctrl-c>y
cp ~/opensim/prod/bin/config-include/GridCommon.ini.example ~/opensim/prod/bin/config-include/GridCommon.ini
emacs ~/opensim/prod/bin/config-include/GridCommon.ini
[AssetService]
AssetServerURI = "http://ip_address:8003"
[InventoryService]
InventoryServerURI = "http://ip_address:8003"
[GridService]
GridServerURI = "http://ip_address:8003"
[Modules]
<Ctrl-x><Ctrl-c>y
cp ~/opensim/prod/bin/config-include/FlotsamCache.ini.example ~/opensim/prod/bin/config-include/FlotsamCache.ini
emacs ~/opensim/prod/bin/config-include/FlotsamCache.ini
Actually, nothing needs to be edited in this file.
<Ctrl-x><Ctrl-c>
cp ~/opensim/prod/bin/config-include/CenomeCache.ini.example ~/opensim/prod/bin/config-include/CenomeCache.ini
emacs ~/opensim/prod/bin/config-include/CenomeCache.ini
Actually, nothing needs to be edited in this file.
<Ctrl-x><Ctrl-c>
cp ~/opensim/prod/bin/OpenSim.Server.ini.example ~/opensim/prod/bin/OpenSim.Server.ini
emacs ~/opensim/prod/bin/OpenSim.Server.ini
[Startup]
[Network]
[AssetService]
ConnectionString = "Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;"
[InventoryService]
ConnectionString = "Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;"
[FreeswitchService]
[AuthenticationService]
[UserAccountService]
[GridService]
<Ctrl-x><Ctrl-c>y
page top
Create more OpenSimulator regions
Visit http://www.famkruithof.net/uuid/uuidgen for UUIDs
Note that the RegionUUID, the Location and the InternalPort must be unique for each region
emacs ~/opensim/prod/bin/Regions/Regions.ini
[Something Central]
RegionUUID = 88888880-8888-8888-8888-888888888888
Location = 1000,1000
InternalAddress = 0.0.0.0
InternalPort = 9000
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
[Something SouthWest]
RegionUUID = 88888881-8888-8888-8888-888888888888
Location = 999,999
InternalAddress = 0.0.0.0
InternalPort = 9001
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
[Something South]
RegionUUID = 88888882-8888-8888-8888-888888888888
Location = 1000,999
InternalAddress = 0.0.0.0
InternalPort = 9002
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
[Something SouthEast]
RegionUUID = 88888883-8888-8888-8888-888888888888
Location = 1001,999
InternalAddress = 0.0.0.0
InternalPort = 9003
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
[Something East]
RegionUUID = 88888884-8888-8888-8888-888888888888
Location = 1001,1000
InternalAddress = 0.0.0.0
InternalPort = 9004
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
[Something NorthEast]
RegionUUID = 88888885-8888-8888-8888-888888888888
Location = 1001,1001
InternalAddress = 0.0.0.0
InternalPort = 9005
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
[Something North]
RegionUUID = 88888886-8888-8888-8888-888888888888
Location = 1000,1001
InternalAddress = 0.0.0.0
InternalPort = 9006
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
[Something NorthWest]
RegionUUID = 88888887-8888-8888-8888-888888888888
Location = 999,1001
InternalAddress = 0.0.0.0
InternalPort = 9007
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
[Something West]
RegionUUID = 88888888-8888-8888-8888-888888888888
Location = 999,1000
InternalAddress = 0.0.0.0
InternalPort = 9008
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
[Something SandBox]
RegionUUID = 88888889-8888-8888-8888-888888888888
Location = 1000,1002
InternalAddress = 0.0.0.0
InternalPort = 9009
AllowAlternatePorts = False
ExternalHostName = ip_address
MasterAvatarFirstName = FirstName
MasterAvatarLastName = LastName
MasterAvatarSandboxPassword = gr_pass
<Ctrl-x><Ctrl-c>y
page top
Start OpenSimulator grid servers for the first time
This mainly creates the grid server and estate configurations.
Must be done in this order (UGSM = User, Grid, Server, Messaging)!
cd ~/opensim/prod/bin
screen -S osuser mono OpenSim.Grid.UserServer.exe
Welcome to ThisGrid - an OpenSimulator grid
http://127.0.0.1:8001/
null
null
http://127.0.0.1:8003/
http://ip_address:8002/
./inventory/Libraries.xml
OpenSim.Data.MySQL.dll
Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;
8002
False
1000
1000
True
True
0
<empty>
<empty>
<Ctrl-a>d
screen -S osgrid mono OpenSim.Grid.GridServer.exe
http://127.0.0.1:8003/
null
null
http://127.0.0.1:8002/
null
null
null
null
OpenSim.Data.MySQL.dll
Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;
8001
True
<empty>
<empty>
<Ctrl-a>d
screen -S osserver mono OpenSim.Server.exe
<Ctrl-a>d
screen -S osmessaging mono OpenSim.Grid.MessagingServer.exe
http://127.0.0.1:8002/
null
null
http://127.0.0.1:8001/
null
null
Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;
OpenSim.Data.MySQL.dll
OpenSim.Region.Communications.OGS1.dll
8006
False
ip_address
<empty>
<empty>
<Ctrl-a>d
page top
Create OpenSimulator master avatar
This must be done before starting the region server for the first time to identify owner!
screen -r osuser
create user Firstname Lastname gr_pass 1000 1000 firstname.lastname@yourmaildomain.com
<Ctrl-a>d
page top
Start OpenSimulator region server in grid mode for the first time
If uncertain about the server environment, OpenSim.32BitLaunch.exe is safer than OpenSim.exe.
screen -S osregion mono OpenSim.32BitLaunch.exe
<Ctrl-a>d
page top
Check OpenSimulator servers console-less in grid mode
screen -ls
screen -r os? #(? for any following unique letter or letters from the names on the list)
<Ctrl-a>d
page top
Connect to OpenSimulator in grid mode
New terminal
/Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://ip_address:8002/ #(on Macintosh)
Second Life viewer
Firstname
Lastname
gr_pass
Something Central
Check around
Quit Second Life viewer
exit
page top
Load OpenSimulator terrains
This is if you have ready custom terrain maps.
OpenSimulator terminal
mkdir ~/opensim/terrains
FTP terrain files, e.g. terrain#.f32 to ~/opensim/terrains
Info at http://opensimulator.org/wiki/Running#Terrain_Specific
screen -r osregion
change region Something Central
terrain save "/home/lx_user/opensim/terrains/default.f32" #(may be good to save the original)
terrain load "/home/lx_user/opensim/terrains/terrain0.f32"
change region Something Southwest
terrain load "/home/lx_user/opensim/terrains/terrain1.f32"
change region Something South
terrain load "/home/lx_user/opensim/terrains/terrain2.f32"
change region Something Southeast
terrain load "/home/lx_user/opensim/terrains/terrain3.f32"
change region Something East
terrain load "/home/lx_user/opensim/terrains/terrain4.f32"
change region Something Northeast
terrain load "/home/lx_user/opensim/terrains/terrain5.f32"
change region Something North
terrain load "/home/lx_user/opensim/terrains/terrain6.f32"
change region Something Northwest
terrain load "/home/lx_user/opensim/terrains/terrain7.f32"
change region Something West
terrain load "/home/lx_user/opensim/terrains/terrain8.f32"
<Ctrl-a>d
page top
Connect to OpenSimulator server in grid mode
This is to check and put finishing touches to custom terrain maps.
New terminal
/Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://ip_address:8002/ #(on Macintosh)
Second Life viewer
Firstname
Lastname
gr_pass
Something Central
Walk, fly or teleport to the regions/sims you have set up
Possibly change ground texture levels in each sim Estate settings
Possibly change water levels in each sim Estate settings
Possibly submit name in each sim Land settings
Possibly submit description in each sim Land settings
Possibly set options in each sim Land settings
Quit Second Life viewer
exit
page top
Redraw OpenSimulator world map Only works with old SVN <r9432
OpenSimulator terminal
screen -r osregion
quit
foreach .xml file in ~/opensim/prod/Regions
emacs ~/opensim/prod/Regions/*.xml
edit the following parameter:
lastmap_refresh="0"
<Ctrl-x><Ctrl-c>y
screen -S osregion mono OpenSim.32BitLaunch.exe
<Ctrl-a>d
page top
Add OpenSimulator users
screen -r osuser
create user Friend First a_pass 999 1000 friend.first@somesite.com
create user Mate Second b_pass 1000 1001 mate.second@somehost.net
<Ctrl-a>d
page top
Maintenance
Some useful routines to maintain the OpenSimulator server.
Update OpenSimulator server
Do this if there is and you want a more recent version than the one originally installed.
svn info http://opensimulator.org/svn/opensim-track/trunk | fgrep Revision | awk '{print $2}' #(gives latest version, e.g. 455)
svn -r 455 co http://opensimulator.org/svn/opensim-track/trunk ~/opensim/t00455
cd ~/opensim/t00455
chmod +x runprebuild.sh
./runprebuild.sh
nant
cp ~/opensim/prod/bin/*_Config.xml ~/opensim/t00455/bin/
cp ~/opensim/prod/bin/estate_settings.xml ~/opensim/t00455/bin/
cp ~/opensim/prod/bin/Regions/Regions.ini ~/opensim/t00455/bin/Regions/
cp ~/opensim/t00455/bin/OpenSim.ini.example ~/opensim/t00455/bin/OpenSim.ini
emacs ~/opensim/t00455/bin/OpenSim.ini
Edit the following lines except for the section flags [XXX]
The exact configuration in the OpenSim.ini may depend on the OpenSimulator server version installed.
[Startup]
gridmode = true
TextureOnMapTile = true
;storage_plugin = "OpenSim.Data.SQLite.dll"
;storage_connection_string="URI=file:OpenSim.db,version=3";
storage_plugin="OpenSim.Data.MySQL.dll"
storage_connection_string="Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;";
permissionmodules = "DefaultPermissionsModule"
serverside_object_permissions = true
WorldMapModule = "WorldMap"
MapImageModule = "MapImageModule"
[SMTP]
[Communications]
[Standalone]
welcome_message = "Welcome to SomeGrid"
; inventory_plugin = "OpenSim.Data.SQLite.dll"
inventory_plugin = "OpenSim.Data.MySQL.dll"
; inventory_source = "URI=file:inventoryStore.db,version=3"
inventory_source = "Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;"
; userDatabase_plugin = "OpenSim.Data.SQLite.dll"
userDatabase_plugin = "OpenSim.Data.MySQL.dll"
; user_source = "URI=file:userprofiles.db,version=3"
user_source = "Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;"
[Network]
[ClientStack.LindenUDP]
[Chat]
[Messaging]
[ODEPhysicsSettings]
[RemoteAdmin]
[RestPlugins]
[RestRegionPlugin]
[RestHandler]
;[IRC]
;[CMS]
;[Sun]
[Wind]
[Cloud]
[Trees]
[VectorRender]
[ScriptEngine.DotNetEngine]
[LL-Functions]
[DataSnapshot]
gridname = "SomeGrid"
[Economy]
[SVN]
[XEngine]
[GridInfo]
login = http://ip_address:8002/
gridname = "Some simple OpenSimulator grid"
gridnick = "SomeGrid"
[OpenGridProtocol]
[Concierge]
[RegionReady]
[MRM]
[Hypergrid]
[VivoxVoice]
[FreeSwitchVoice]
[Groups]
[PacketPool]
[InterestManagement]
[DatabaseService]
[AssetService]
[GridService]
[Architecture]
;Include-Standalone = "config-include/Standalone.ini"
Include-Grid = "config-include/Grid.ini"
[Modules]
<Ctrl-x><Ctrl-c>y
cp ~/opensim/prod/bin/config-include/GridCommon.ini.example ~/opensim/prod/bin/config-include/GridCommon.ini
emacs ~/opensim/prod/bin/config-include/GridCommon.ini
[AssetService]
AssetServerURI = "http://ip_address:8003"
[InventoryService]
InventoryServerURI = "http://ip_address:8003"
[GridService]
GridServerURI = "http://ip_address:8003"
[Modules]
[XMLRPC]
<Ctrl-x><Ctrl-c>y
cp ~/opensim/t00455/bin/config-include/FlotsamCache.ini.example ~/opensim/t00455/bin/config-include/FlotsamCache.ini
emacs ~/opensim/t00455/bin/config-include/FlotsamCache.ini
Actually, nothing needs to be edited in this file.
<Ctrl-x><Ctrl-c>
cp ~/opensim/t00455/bin/config-include/CenomeCache.ini.example ~/opensim/t00455/bin/config-include/CenomeCache.ini
emacs ~/opensim/t00455/bin/config-include/CenomeCache.ini
Actually, nothing needs to be edited in this file.
<Ctrl-x><Ctrl-c>
cp ~/opensim/t00455/bin/OpenSim.Server.ini.example ~/opensim/t00455/bin/OpenSim.Server.ini
emacs ~/opensim/t00455/bin/OpenSim.Server.ini
[Startup]
[Network]
[AssetService]
ConnectionString = "Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;"
[InventoryService]
ConnectionString = "Data Source=localhost;Database=opensim;User ID=os_user;Password=os_pass;"
[FreeswitchService]
[AuthenticationService]
[UserAccountService]
[GridService]
<Ctrl-x><Ctrl-c>y
rm ~/opensim/prod
ln -s ~/opensim/t00455 ~/opensim/prod
page top
Stop (old) OpenSimulator server in grid mode
Should be done in this order (RMSGU = Region, Messaging, Server, Grid, User).
screen -r osregion
quit
screen -r osmessaging
quit
screen -r osserver
quit
screen -r osgrid
quit
screen -r osuser
quit
page top
Re-start (new) OpenSimulator server in grid mode
Must be done in this order (UGSMR = User, Grid, Server, Messaging, Region)!
cd ~/opensim/prod/bin/
screen -S osuser -d -m mono OpenSim.Grid.UserServer.exe
screen -S osgrid -d -m mono OpenSim.Grid.GridServer.exe
screen -S osserver -d -m mono OpenSim.Server.exe
screen -S osmessaging -d -m mono OpenSim.Grid.MessagingServer.exe
screen -S osregion -d -m mono OpenSim.32BitLaunch.exe
<Ctrl-a>d
page top
Autostart OpenSimulator server in grid mode
This script will autostart the OpenSimulator grid and server if the Linux environment is re-booted.
sudo -i
lx_pass #(if requested)
emacs /etc/init.d/opensim-start.bash
#!/bin/sh
echo 'abc' > /tmp/opensim.norestart
CWD=`pwd`
cd /home/lx_user/opensim/prod/bin/
su lx_user -c '/usr/bin/screen -S osuser -d -m /usr/local/bin/mono OpenSim.Grid.UserServer.exe'
sleep 5
su lx_user -c '/usr/bin/screen -S osgrid -d -m /usr/local/bin/mono OpenSim.Grid.GridServer.exe'
sleep 5
su lx_user -c '/usr/bin/screen -S osserver -d -m /usr/local/bin/mono OpenSim.Server.exe'
sleep 10
su lx_user -c '/usr/bin/screen -S osmessaging -d -m /usr/local/bin/mono OpenSim.Grid.MessagingServer.exe'
sleep 5
su lx_user -c '/usr/bin/screen -S osregion -d -m /usr/local/bin/mono OpenSim.32BitLaunch.exe'
cd $CWD
rm /tmp/opensim.norestart
exit 0
<Ctrl-x><Ctrl-c>y
chmod +x /etc/init.d/opensim-start.bash
update-rc.d opensim-start.bash defaults
exit
You can also use the script to start a stopped OpenSimulator server manually with one command:
sudo /etc/init.d/opensim-start.bash
lx_pass #(if requested)
page top
Auto-restart OpenSimulator region server
This script will auto-restart an OpenSimulator region server if it has crashed.
sudo -i
lx_pass
mkdir /etc/opensim
emacs /etc/opensim/restart.sh
#!/bin/sh
if [ ! -f "/tmp/opensim.norestart" ]; then
if [ -z "`ps ax|grep osregion|grep -v grep`" ]; then
CWD=`pwd`
cd /home/lx_user/opensim/prod/bin/
su magnus -c '/usr/bin/screen -S osregion -d -m /usr/local/bin/mono OpenSim.32BitLaunch.exe'
cd $CWD
fi
fi
return 0
<Ctrl-x><Ctrl-c>y
chmod +x /etc/opensim/restart.sh
crontab -e
move to end of file
*/1 * * * * /etc/opensim/restart.sh
<Ctrl-x>Y<Return>
exit
page top
De-activate auto-restart of OpenSimulator region server
Do this when you want to stop the server in grid mode, e.g. when updating.
touch /tmp/opensim.norestart
page top
Re-activate auto-restart of OpenSimulator region server
Do this after you have restarted the OpenSimulator server in grid mode.
rm /tmp/opensim.norestart
page top
Backup OpenSimulator MySQL database
Only do this when all OpenSimulator servers are stopped.
mysqldump -u root -p -e -r /home/lx_user/backups/opensim_090506.sql opensim
-u (user name) -p (password prompt) -e (extended data dump, compacted by several datasets per parameter set) -r (output file path)
ms_pass
Possibly FTP file to backup repository.
page top
Drop OpenSimulator MySQL database
Only do this when all OpenSimulator servers are stopped.
mysql -u root -p
ms_pass
DROP USER 'os_user';
DROP USER 'os_user'@'localhost';
DROP DATABASE IF EXISTS opensim;
QUIT;
page top
Initialize OpenSimulator MySQL database
Only do this when all OpenSimulator servers are stopped.
mysql -u root -p
ms_pass
CREATE DATABASE opensim;
GRANT ALL ON opensim.* TO 'os_user' IDENTIFIED BY 'os_pass';
GRANT ALL ON opensim.* TO 'os_user'@'localhost' IDENTIFIED BY 'os_pass';
QUIT;
page top
Restore OpenSimulator MySQL database
Only do this when all OpenSimulator servers are stopped.
Possibly FTP file from backup repository.
mysql -u root -p opensim < /home/lx_user/backups/opensim_090506.sql
-u (user name) -p (password prompt) < (input file path)
ms_pass
page top
Environment checks
Here are some simple commands to check up the server environment.
Check CPU
more /proc/cpuinfo
page top
Check load
top
page top
Check RAM memory
free -m
page top
Check disk space
df -h
page top
Check status and uptime
who -a
page top
Check up-time
uptime
page top