Jul 06 2008
Build recipe for a BARGC public-facing Opensim server 20080703 being built for the Bay Area Regional Geographic Information Systems Council (BARGC)
OVERVIEW: Pre-OpenSim-install steps from bare hardware to ready environment
0) Ubuntu 8.04 LTS x86_64 operating system 1) VNC Server 2) OpenSim build environment - SVN, nant, mono 3) Local 64-bit build of Mono 1.9.1 4) Local 64-bit build of LibSecondlife's libopenjpeg 5) ODE build environment - autoconf, automake, libtool, bison(?) 6) Local 64-bit build of OpenSim's chosen ODE2 7) MySQL Server 5.0.51 x86_64 8] MySQL Administrator 1.2.12 ---- 9) OpenSim subversion builds...
This post is notes from procedure used to build an OpenSim virtual world on a rehabilitated BARGC server (2006-era) HP DL360 G4, dual 3.4 GHz Xeon, 4 GB system (a 1-U screamer for its time) System was revived from non-boot status, and has a single surviving 146 GB U320 SCSI drive.
0) OS: Ubuntu 8.04 LTS x86_64 architecture (Desktop Edition)
http://ubuntu.com as ISO image burned to produce a single boot/install Live CD
When the OS is running, install system patches and updates (about 216 items as of 20080703)
System > Administration > Update Manager
IMHO there is no shame in choosing Ubuntu Desktop rather than server unless you’re really cramped for memory or disk space—to my understanding, the only difference between server and desktop is the absence of GUI in server. The ease of administering the server via GUI has been important to me for making late-night work sessions more productive. In any case, the following HOWTO steps assume you’re building the OpenSim server on Ubuntu Desktop.
1) Install VNC server
per directions here and ultraVNC client for access to the server console from Windows machines. Ubuntu desktop already has both VNC- and RDP-compatible client preinstalled under
Applications > Internet > Terminal Server Client
2) Prepare Ubuntu for running OpenSim
per directions at opensimulator.org/wiki
which is essentially just this but includes a mono install that we’ll undo in the next step:
sudo apt-get install subversion nant \ mono-gmcs libmono-microsoft8.0-cil \ libmono-system-runtime2.0-cil \ libgdiplus libmono-i18n2.0-cil
3) Upgrade to Mono 1.9.1
per previous page’s performance hint
IMHO it is a big hairy deal to compile the latest Mono from source, but at this point it sort of goes with the 64-bit territory, taking over 50 minutes. And if this is what it takes to outperform dotNET on Windows, so be it Many thanks to Sean Dague for his work in 20080330, and DrScofield for his rev on 20080508 that I ran when it’s all built and done, it’s checked simply enough by entering
4) build libopenjpeg on the 64-bit OS
using instructions here which involved a checkout of LibSecondLife svn_1901 and produced
libopenjpeg-libsl-126.96.36.199.so at 131032 byes size.
5) prep system to build one’s own 64-bit ODE from source
To do this, one must have automake, which seems to work after this:
sudo apt-get install autoconf automake libtool bison
6) build OpenDynamicsEngine on the 64-bit OS
using instructions here that involves a checkout of the version available from opensimulator.org
svn co \ http://opensimulator.org/svn/opensim-libs/trunk/unmanaged/OpenDynamicsEngine2 \ osim_ODE2
which checked out svn_47 on 20080710
after obtaining libtool to run autogen.sh, one should be able to
sh autogen.sh; ./configure --with-trimesh=gimpact --enable-shared; make; sudo make install
for me this built
libode-0.so at 1906756 bytes for X86_64 Ubuntu on a dual Xeon
My last step before the Osim install was to stand up a MySQL instance. This is not required for OpenSim to run (the SVN will work just fine by itself and defaults to included SQLite storage) but I’m preferring MySQL for large, detailed, and hard-to-load terrain and hard-to-build sculptie prim-laden environment that I wish to persist. Like really persist between both client logins and simulator restarts. So I take these few extra steps to install an instance of MySQL, just to run OpenSim’s back end.
7) Obtain MySQL server
sudo apt-get install mysql-server
the download took a long time during Euro-morning hours, but eventually all one needed to do was to set a root/sa password
8] Install MySQL admin GUI
For the sake of being lazy, in keeping with my choice to install Ubuntu desktop to improve late-night productivity, one adds
sudo apt-get install mysql-admin mysql-gui-tools-common
with that install, MySQL Administrator just shows up in the
Applications > Programming menu.
Almost magically, just log in using
Server Hostname: "localhost" Port: "3306" Username: "root" Password" "*****" <<your password>> and Connect.
Welcome to your new MySQL instance.
In the upper-left pane of MySQL Administrator, highlight the Catalogs item at the bottom, then in the Schemata/database box with the magnifying glass, DO NOT TRY to enter your new opensim catalog name, as you will be disappointed with the non-result! Instead, hover over a blank portion of the Schemata window and right-click, selecting Create Schema. Then in the dialog box enter the Catalog/database that you intend to have OpenSim use. I used “opensim” (the schema/database).
For grins, I also went to the User Administration item in MySQL Administrator, and using the same hover-over and right-click, this time in the User Accounts pane, added a user that OpenSim might use. Again, I used “opensim” (the MySQL user). In fact, on this machine I will not be using MySQL for any other purpose than as a back end for OpenSim, so if worse comes to worse, I’m willing to have OpenSim log in to MySQL with database-root credentials.
And that’s most all the prep work
to clear the way for OpenSim on Ubuntu 8.04 x86_64 environment. The previous steps tended to use ‘sudo’ or system root privileges to install most of the supporting items for system-wide use, and now subsequent steps will tend to take place in one’s own development directory. Here’s where we’ve gone so far:
0) Ubuntu 8.04 LTS x86_64 operating system 1) VNC Server 2) OpenSim build environment - SVN, nant, mono 3) Local 64-bit build of Mono 1.9.1 4) Local 64-bit build of LibSecondlife's libopenjpeg 5) ODE build environment - autoconf, automake, libtool, bison(?) 6) Local 64-bit build of OpenSim's chosen ODE2 7) MySQL Server 5.0.51 x86_64 8] MySQL Administrator 1.2.12 9) install and configure OpenSim <== you are here
After that 64-bit detour, I’m returning to the directions here and willfully maintaining the perspective that OpenSim is presently Alpha-stage code , I created a ./dev directory in my Ubuntu user login’s home directory. In ./dev, I expect to have a growing thread of OpenSim svn checkouts that will evolve over time. In each of these there will be a variety of source and support directories, including a /bin that contains the .NET executable that is OpenSim.exe and settings OpenSim.ini and its associated region definition XML files in /bin/Regions. Thus far, to hop from one SVN to the next, I copy over essential configurations from previous SVNs.
/dev /os058_4322 /os058_5234 /os058_5341 /bin /Regions
I grow this tree from one version to the next using SVN into a generic directory below ./dev
svn co http://opensimulator.org/svn/opensim/trunk os058_
Then after the last line of that checkout informs
Checked out revision 5341 one simply
% mv os058_ os058_5341 % cd /os058_5341 % ./runprebuild.sh % nant
This should give one a compiled Opensim.exe in the /bin directory within 30 to 90 seconds.
Next I cd into the /bin directory to rename the supplied
libode.so and replace it with a symlink to the 64-bit library from step 6) above
% mv libode.so libode_32.so % ln -s /usr/local/lib/libode-0.so libode.so
Although I’m presently not certain how it gets chosen (some versions have .dynlib and others don’t) I copy the latest libsl libopenjpeg into bin
% cp ../../libopenjpeg-libsl-188.8.131.52.so \ libopenjpeg-libsl-184.108.40.206-x86_64.so
To get the sim personalized, I download my sim definition for the 40 OpenBerkurodam regions
which contains my 40 functional regions of seamless real-world bare earth terrain, 40 working region definition files, and some PHP scripts to create other region definition XML files with different estate owners, a command script for loading the terrain into 40 sims, and a good luck charm to remind me to create a symlink to mono created above /bin in the main sim directory with
% ln -s `which mono` cli
this symlink is for invoking mono to run the sim, in the belief that should a need arise, it is easier to kill mono when invoked that way than if mono is called directly. I can’t explain why this should be so, but I’m trying it for the sake of smoother remote server administration.
Note that if you’re following the build steps I’ve posted here and choose to try out the berkurodam_OB40 set, it will be necessary for you to input your own root@MySQL password in both the OpenSim.ini and mysql_connection.ini configuration files.
In the Region directory, it appears necessary to specify your machine’s network IP (not
127.0.0.1 loopback) to allow connections from outside. The way that I maintain this with twoscore of regions is based on an example provided in earlier OpenSim svn that is a PHP script. If you’ve not yet got PHP on your machine it’s easy enough with
% sudo apt-get update % sudo apt-get install php5 php5-cli
The relevant script to generate the 40 region.xml configuration files is
obdam_40h.php and edit that file to set
$ourHostNom = "your.ip.addr.here" and just run
% php obdam_40h.php to generate all your region.xml configuration files right there in the sim’s
By way of detail for public server in DMZ, a successful configuration was found that used the loopback alias “0.0.0.0” for internal IP, and the external public IP for the host name. This was necessary because on the DMZ-based host, the server name would resolve differently in different contexts, either loopback, non-routable DMZ address, or public routable address. This caused the outbound UDP to bind to the loopback address, leaving the server mute to outside users.
When all is installed and poised for action, just go into the svn’s bin directory, such as from home
% cd ./dev/os058_5341/bin % ../cli OpenSim.exe
and hopefully your very own OpenSim server is off and running within a mostly 64-bit environment!
2 Responses to “OpenSim 0.5.8 server 64-bit build steps for Ubuntu 8.04 HOWTO”
Leave a Reply
You must be logged in to post a comment.