OpenSim Installation (part five)

So far I’ve tried to share with you the easiest way to setup your own OpenSim server. It’s fully functional in Standalone mode and you’re basically ready to go develop or explore this new enviroment.

Before we go any further you’ll have to make some decisions yourself. For now you’re running as stable as you can, but other people can only connect to you directly, your region isn’t connected to a grid yet neither are you running a grid yourself for others to connect their regions to. And if you do choose to enter gridmode, do you want it to be with the ’stable’ mysql option or do you want to continue and connect it to a MS SQL server, which isn’t fully operational as of yet ?

For me, and therefore my blog posts, I will continue to move our standalone server to a grid with a SQL database running the show in the background. You’re welcome to tag along for the ride and read on…

 

Do you remember that currently OpenSim stores all it’s grid information in mysql ? Ow… right we didn’t install that did we? We wanted to go for the full MS SQL support, so let’s do that first before making our OpenSim server a grid. So lets dive into the deep with a big thanks to Chris and James for their SQL work.  

  • Create a new database called ‘OpenSim’ in SQL Management Studio.
    With SQL Management Studio open, right-click on the database nodes and select new database. Call it ‘OpenSim’ and accept the rest of the default options.
  • Enable Mixed Mode authentication on SQL Server.
    Right-click your database server and select Properties. On the security tab check the ‘SQL Server and Windows Authentication mode’ checkbox.
  • Create a new login to administer the new ‘OpenSim’ database.
    Right-click the security-node and create a new user in the login section. Select ‘SQL Server authentication’ and choose ‘OpenSim’ as the default database.
  • Set the new login rights as db_owner.
    On the security section of your ‘OpenSim’ database choose the User section. Create a new user and choose the new user we created in the previous step. Ensure it has the db_owner role.

Take a breather we’re almost there.

  • Run all the SQL Import scripts from OpenSim\Data\MSSQL\Resources.
    Select File > Open script from the topmenu of the SQL Management Studio and select all the SQL scripts located in the OpenSim\Data\MSSQL\Resources folder. Execute them all and close the SQL Managament Studio.

 

There, the MS SQL server part is done, now it’s time to tell OpenSim to actually start using it. First let’s open the file OpenSim.ini located in the bin folder. We’ll need to edit several sections :

  • locate the ## STORAGE section.
    Comment out all the storage_plugin and storage_connection_string lines by adding a ; in front of them.
  • Add our custom SQL storage connection by adding the following lines:
    storage_plugin = OpenSim.Data.MSSQL.dll
    storage_connection_string = “Data Source=computername\sqlservername;Database=OpenSim;User=adminuser;password=password;”;
  • Make sure the ’storage_prim_inventories’ is set to True.
  • locate the ‘Asset database provider’ section.
    Comment out all the asset_plugin and asset_source lines by adding a ; in front of them.
  • Add our custom SQL asset connection by adding the following lines:
    asset_database = “grid”
    asset_plugin = OpenSim.Data.MSSQL.dll
    asset_source =”Data Source=computername\sqlservername;Database=OpenSim;User=adminuser;password=password;”;
  • locate the ‘Inventory database provider’ section.
    Comment out all the inventory_plugin and inventory_source lines by adding a ; in front of them.
  • Add our custom SQL inventory connection by adding the following lines:
    inventory_plugin = OpenSim.Data.MSSQL.dll
    inventory_source = “Data Source=computername\sqlservername;Database=OpenSim;User=adminuser;password=password;”;
  • locate the ‘User Data database provider’ section.
    Comment out all the userDatabase_plugin and user_Source lines by adding a ; in front of them.
  • Add our custom SQL User Data database connection by adding the following lines:
    userDatabase_plugin = OpenSim.Data.MSSQL.dll
    user_source = “Data Source=computername\sqlservername;Database=OpenSim;User=adminuser;password=password;”;
  • Add our custom SQL Appearance connection by adding the following lines:
    appearance_persist = true
    appearance_database = “MSSQL”
    appearance_connection_string = “Data Source=computername\sqlservername;Database=OpenSim;User=adminuser;password=password;”;

The ‘computername\sqlservername’ stands for either internal names or internal IP adress.
 

We need to do one final thing, we need to tell OpenSim which dataprovider connection to use. Yes I know, another ini file to edit but it’s the last one…

  • Copy the mssql_connection.ini.example to mssql_connection.ini and open it in your favorite editor.
  • Replace the following sections with the appropiate values:
    data_source=computername\sqlservername
    initial_catalog=OpenSim
    persist_security_info=True
    user_id=adminuser 
    password=password

 

Ok, that’s it for now. We configured OpenSim to use our SQL server to store all the data. All the credits for figuring this out go to Chris and James, I just followed their guidelines and reworked them into my own experience while installing.

 

The next post will be our final one where we’ll set our OpenSim to gridmode and are finally finished.


About this entry