<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>OpenSim</title>
        <link>http://blogs.ipona.com/chris/category/182.aspx</link>
        <description>Working with Open Source alternatives to Second Life</description>
        <language>en-GB</language>
        <copyright>Chris Hart</copyright>
        <managingEditor>chris@digitalstrawberry.co.uk</managingEditor>
        <generator>Subtext Version 2.0.0.43</generator>
        <item>
            <title>OpenSim on SQL Server</title>
            <link>http://blogs.ipona.com/chris/archive/2008/06/11/8502.aspx</link>
            <description>&lt;p&gt;Over the past week I've made some great progress on my OpenSim experiment. For starters, I've got my server configured in Grid mode, and I have all four of the main servers running on SQL Server. This did require a bit of development - the inventory server was quite broken for SQL Server, so James and I fixed the code and submitted a patch, but the good news is that this means it'll be in a better state for the rest of you from now on.&lt;/p&gt; &lt;p&gt;If you're committed to switching from SQLite as much as possible then I would recommend configuring your server to run in grid mode. Even if you are working locally, there's something a bit more comforting about seeing messages relevant to each server on each of the console windows, rather than all jumbled up in one console window. Makes it much easier to see bugs and have a think about how to fix them, for starters.&lt;/p&gt; &lt;p&gt;So, where to start? Well, good news and bad news - the good news is that this is possible, the bad news is that it's not simple, and unless you figure out how to export content from a SQLite-based OpenSim, you'll be starting from scratch on your new sim. Before you start, you obviously need a SQL Server to work with. As long as you can install SQL Express on your OpenSim server, you have everything you need, and since SQL Express is a free download, there's no cost involved. Get SQL Express from &lt;a title="SQL Express product page" href="http://www.microsoft.com/sql/editions/express/default.mspx" target="_blank"&gt;here&lt;/a&gt;, then get SQL Management Studio Express from &lt;a title="SQL Server Management Studio Express" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c243a5ae-4bd1-4e3d-94b8-5a0f62bf7796&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt; - this will give you a tool for running queries and editing your database.&lt;/p&gt; &lt;p&gt;Now, I'm assuming you've done the right thing and already configured your system so you have a Subversion client installed, right? &lt;a href="http://tortoisesvn.tigris.org/" target="_blank"&gt;TortoiseSVN&lt;/a&gt; is my favourite, with its extremely simple shell integration. So, you have an OpenSim directory and you can grab the latest source code from the Subversion repository - this is pretty important, since the code changes very frequently. Now you will need to head to SQL Management Studio Express and create a database ready to store your OpenSim data. Right-click on the Databases node and and select &lt;strong&gt;New Database&lt;/strong&gt;. Call it &lt;strong&gt;OpenSim&lt;/strong&gt;, accept all defaults and click OK.&lt;/p&gt; &lt;p&gt;The next step is to create a user account for running your OpenSim on SQL Server. Firstly, you need to enable Mixed Mode authentication on SQL Server.  &lt;/p&gt;&lt;p&gt;Right-click on your database server in Management Studio and select &lt;strong&gt;Properties&lt;/strong&gt;, then go to the &lt;strong&gt;Security&lt;/strong&gt; tab and select &lt;strong&gt;SQL Server and Windows Authentication&lt;/strong&gt; mode, click OK. Back in Management Studio, expand the &lt;strong&gt;Security&lt;/strong&gt; node and in the &lt;strong&gt;Logins&lt;/strong&gt; section right-click and create a new user, called whatever you like, select &lt;strong&gt;SQL Server authentication&lt;/strong&gt;, give it a strong password and select the &lt;strong&gt;OpenSim&lt;/strong&gt; database as the default database. Click OK.  &lt;/p&gt;&lt;p&gt;Then navigate to the OpenSim database and go to the &lt;strong&gt;Security&lt;/strong&gt;, then &lt;strong&gt;Users&lt;/strong&gt; section. In there, create a new user, select your new admin account and make sure it has the &lt;strong&gt;db_owner&lt;/strong&gt; role in the &lt;strong&gt;Database role membership&lt;/strong&gt; section. Click OK and you should be ready to use that account to connect to the database.  &lt;/p&gt;&lt;p&gt;Next step is to create the tables you'll need to store all the data from OpenSim. I have my OpenSim code in C:\OpenSim, so on my system, I navigate to &lt;strong&gt;C:\OpenSim\OpenSim\Data\MSSQL\Resources&lt;/strong&gt; to find the SQL scripts you'll be needing to create the base tables in the database. Open each script in turn in Management studio and click Execute against them all. Provided you have no errors, you will be good to go with running OpenSim in grid mode on SQL Server!  &lt;/p&gt;&lt;p&gt;Time to edit the Ini file. I recommend heading to the OpenSim documentation on &lt;a href="http://opensimulator.org/wiki/OpenSim_Configuration" target="_blank"&gt;configuration&lt;/a&gt; for more in-depth details on this process, but here's an abbreviated version that might help fill in some gaps for you. While there is a mssql_connection.ini file, I also have settings in my main ini file too - I haven't yet dug through the code thoroughly enough to know which ones are used and which ones are not. There's a sample mssql_connection.ini.example file in the OpenSim code repository, so make a copy, rename it &lt;strong&gt;mssql_connection.ini&lt;/strong&gt; and replace the appropriate values with the correct data for your server. As an example: &lt;/p&gt;&lt;pre&gt;[mssqlconnection]&lt;br /&gt;data_source=servername\SQLEXPRESS&lt;br /&gt;initial_catalog=OpenSim&lt;br /&gt;persist_security_info=True&lt;br /&gt;user_id=adminuser&lt;br /&gt;password=password &lt;/pre&gt;&lt;br /&gt;
&lt;p&gt;In the main ini file,&lt;/p&gt;&lt;pre&gt;gridmode = True&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;storage_plugin = OpenSim.Data.MSSQL.dll&lt;br /&gt;storage_connection_string = "Data Source=servername\sqlexpress;Database=OpenSim;User=adminuser;password=password;";&lt;br /&gt;storage_prim_inventories = True &lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;appearance_persist = true&lt;br /&gt;appearance_database = "MSSQL"&lt;br /&gt;appearance_connection_string = "Data Source=servername\sqlexpress;Database=OpenSim;User=adminuser;password=password;";&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;inventory_plugin = OpenSim.Data.MSSQL.dll&lt;br /&gt;inventory_source = "Data Source=servername\sqlexpress;Database=OpenSim;User=adminuser;password=password;";&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;userDatabase_plugin = OpenSim.Data.MSSQL.dll&lt;br /&gt;user_source = "Data Source=servername\sqlexpress;Database=OpenSim;User=adminuser;password=password;";&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;asset_database = MSSQL&lt;br /&gt;asset_plugin = OpenSim.Data.MSSQL.dll&lt;br /&gt;asset_source ="Data Source=servername\sqlexpress;Database=OpenSim;User=adminuser;password=password;";&lt;/pre&gt;&lt;br /&gt;
&lt;p&gt;The other part of the puzzle is getting your sim running in grid mode, and for that to work you need to be a little more clever with IP addresses and the like, but don't let that put you off. Know your server's IP address, then enter it in the following section with the following port numbers:&lt;/p&gt;&lt;pre&gt;grid_server_url = http://192.168.0.1:8001&lt;br /&gt;grid_send_key = null&lt;br /&gt;grid_recv_key = null&lt;br /&gt;user_server_url = http://192.168.0.1:8002&lt;br /&gt;user_send_key = null&lt;br /&gt;user_recv_key = null&lt;br /&gt;asset_server_url = http://192.168.0.1:8003&lt;br /&gt;inventory_server_url = http://192.168.0.1:8004 &lt;/pre&gt;&lt;br /&gt;
&lt;p&gt;Notice there are some keys listed in here that are null - you should change these so that you only allow access to people who know both your server's IP AND the appropriate keys to grid up with you. And from looking through the code, it appears that the keys are any valid string value, though I haven't yet tested this out. 
&lt;/p&gt;&lt;p&gt;You may also want to double-check that the IP address is configured correctly for your region (head to the OpenSim\bin\Regions\default.xml file) and make sure that the IP addresses are set appropriately. Again, check the OpenSim site for a bit more information on this. 
&lt;/p&gt;&lt;p&gt;Once you have configuration sorted, time to run the servers and keep your fingers crossed! The OpenSim site strongly recommends starting servers in a specific order: UGAIS: UserServer, GridServer, AssetServer, InventoryServer, Sim. Note that the first time that you fire up the servers in grid mode, you are asked for some information to create some system-specific configuration files. Make sure that when you start up each server you enter the data correctly - the data you will need to enter is exactly the same as that entered in the ini file, so make sure you fill in the fields so that they match. Once you have configured one server, move on to the next. Once you have all five running, you're almost ready to log in! 
&lt;/p&gt;&lt;p&gt;Here's a handy tip - now you have 5 console windows open, click on one of them on the task bar, then &lt;strong&gt;ctrl+click&lt;/strong&gt; on the other four windows. Right-click on any of them and select &lt;strong&gt;Tile Horizontally&lt;/strong&gt; and you will see all your servers neatly arranged, and you can watch things happening as you log in and do stuff on your sim. 
&lt;/p&gt;&lt;p&gt;Just before you connect, you need to create a user account, so go to the user console and create a new user account. Then it's time for the client bit - if you're using the SL client, set your loginuri startup switch as before, but this time you'll connect to port 8002, not port 9000, so for example: &lt;/p&gt;&lt;pre&gt;"C:\Program Files\SecondLife\SecondLife.exe" -loginuri http://192.168.0.1:8002 &lt;/pre&gt;
&lt;p&gt;Once you launch your client, you should be able to connect to your grid and off you go. Fingers crossed, and I hope it works for you. Note that I think there's a bug with creating folders in your inventory, so watch for errors there. You may have to go with a completely unorganised inventory for a while until that's fixed (which may well be soon).&lt;/p&gt;&lt;img src="http://blogs.ipona.com/chris/aggbug/8502.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Hart</dc:creator>
            <guid>http://blogs.ipona.com/chris/archive/2008/06/11/8502.aspx</guid>
            <pubDate>Thu, 12 Jun 2008 01:03:11 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/chris/comments/8502.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/chris/archive/2008/06/11/8502.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ipona.com/chris/comments/commentRss/8502.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Exploring the OpenSim Universe</title>
            <link>http://blogs.ipona.com/chris/archive/2008/05/28/8495.aspx</link>
            <description>&lt;p&gt;Over the past few weeks I've taken a big leap into the world of Open Source development and started messing around with &lt;a title="OpenSim Main Site" href="http://opensimulator.org/wiki/Main_Page"&gt;OpenSim&lt;/a&gt;, the BSD licenced 3D virtual world based on Second Life, but reinvented from scratch using C#. It's an immense project that's been in development for a while, and it's starting to look pretty good.&lt;/p&gt;
&lt;p&gt;Getting hold of OpenSim is relatively easy, especially if you're a developer and have used &lt;a title="Subversion" href="http://en.wikipedia.org/wiki/Subversion_(software)"&gt;Subversion&lt;/a&gt; before. Grab the latest &lt;a title="Download OpenSim" href="http://opensimulator.org/wiki/Download"&gt;code&lt;/a&gt;, run the pre-build tool, build the solution and you're just about ready. Make sure you run the correct exe for your system (64bit machines have to run a 32bit launcher), and you are hosting your own little simulator that you can connect to.&lt;/p&gt;
&lt;p&gt;So, next step is to connect to the newly-created world. You can either use the standard Second Life client with a modified startup shortcut, or you can download and use the &lt;a title="realXtend viewer" href="http://www.realxtend.org/page.php?pg=downloads"&gt;realXtend&lt;/a&gt; viewer and specify your server as part of the launch. And then you're in your own little world...&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.ipona.com/images/blogs_ipona_com/chris/WindowsLiveWriter/ExploringtheOpenSimUniverse_9B49/sf5_2.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="151" alt="sf5" width="244" border="0" src="http://blogs.ipona.com/images/blogs_ipona_com/chris/WindowsLiveWriter/ExploringtheOpenSimUniverse_9B49/sf5_thumb.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now, since that picture was taken I've completely broken the server by attempting to hook it up to SQL Server, but that's all part of the fun - and there are so many bits and pieces to look at and tweak that this is proving to be quite an entertaining project. &lt;/p&gt;
&lt;p&gt;So, why am I doing this? Well, I've been working with &lt;a title="Reaction Grid" href="http://www.reactiongrid.com/"&gt;Kyle&lt;/a&gt; for a while on MS Island on Second Life, and this is part of an exploration of open source alternatives to the Linden Labs controlled world. &lt;a title="Project Manhattan" href="http://www.reactiongrid.com/projects.aspx"&gt;Project Manhattan&lt;/a&gt; is the first project we're working on, and it's still in its early stages - but it certainly makes a welcome change from SharePoint development. &lt;/p&gt;&lt;img src="http://blogs.ipona.com/chris/aggbug/8495.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Hart</dc:creator>
            <guid>http://blogs.ipona.com/chris/archive/2008/05/28/8495.aspx</guid>
            <pubDate>Wed, 28 May 2008 22:58:59 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/chris/comments/8495.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/chris/archive/2008/05/28/8495.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ipona.com/chris/comments/commentRss/8495.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>