 |
Setting up Authentication and Avatar Storage servers using Microsoft SQL Server 2005 Express Edition
From RexWiki
Note: this document assumes you are installing the SQL Server Express on the same machine as the Avatar Storage & Authentication servers.
Note 2: Make sure you know the hostname or IP address of the machine you are installing the servers on (for example, run ipconfig in the command prompt). As an example, 192.168.0.100 is used throughout; replace with your proper IP.
Download SQL Server Express & SQL Server Management Studio
Go to Microsoft's SQL Server Express website http://www.microsoft.com/sql/editions/express/default.mspx and click “Get SQL Server Express” on the top right. It redirects to a page where you can register if you wish, or just click “No thanks, Please take me to the downloads”. Finally, you should end up at http://msdn2.microsoft.com/en-us/express/bb410792.aspx
If you don't already have it, download and install the .NET Framework 2.0 first, as prompted on the top of the page.
The installation packages you need (on the left side of the page) are:
Microsoft SQL Server 2005 Express Edition (36.5 MB)
SQL Server Management Studio Express (43.1 MB)
Save both of these to your harddisk, but do not run either of them yet.
Install SQL Server Express
(important: Start installation with SQL Server Express. If you install the Management Studio first, the server installation will not finish properly, and you have to first uninstall everything related to the SQL Server, Management Studio, and MSXML parser)
- Run the Microsoft SQL Server 2005 Express Edition package (it should be named SQLEXPR32.EXE).
- Accept the license agreement.
- First the prerequisites (Native Client, Setup Support Files) will be installed. Click “Install”.
- Wait while the prerequisites are installed & configured. Click “Next” when done.
- The Server Installation Wizard itself will now start. Click “Next”.
- Next the wizard checks for possible installation problems. You should get 13 successful checks. Click “Next”.
- Fill in the registration information as applicable, then click “Next”.
- The default feature set should be OK. Modify the installation path if required, then click “Next”.
- In the next screen, choose Mixed Mode Authentication. “sa” is the default account in Microsoft SQL server, type & confirm a password for it (needed later). Then click “Next”.
- On the next screen, it's recommended to check both boxes (the user you are currently installing as, becomes a SQL Server Administrator). Then click “Next”.
- On the next screen one can choose error & usage reporting options. Check these options if you wish, then click “Next”.
- Next the installation wizard presents a summary of components that will be installed. This should just read “SQL Server Database Services”, if you didn't choose to install the additional client components. Click “Install”.
- The installation (especially installation of SQL Server Database Services) will take a while, but afterwards, everything should succeed and look like this:
- If there were errors, go to Control Panel -> Add or Remove Programs, and uninstall everything related to SQL Server and MSXML Parser, then re-run the installation package.
Install SQL Server Management Studio Express
The Management Studio will be convenient for direct editing of the Authentication & Avatar Storage tables, as well as setting up connection permissions for the SQL Server.
- Run the SQL Server Management Studio Express package (it should be named SQLServer2005_SSMSEE.msi).
- Accept the license agreement.
- Enter registration information as applicable, and click “Next”.
- The defaults for installation packages should be OK, click “Next”.
- On the next screen, click “Install”.
- Wait while installation takes place. It should finish successfully. Click “Finish”.
Configure the Avatar Storage
- Go to the directory where you extracted the realXtend 0.2 server platform. The directory structure should look like this:
- Go to the avatarstorage directory and delete all .xml files there (the Avatar Storage's configuration files), these should be sqliteSettings.xml, HttpSettings.xml & AstorageSettings.xml
- Then run AvatarStorage.exe. It should now ask all configuration options. Whenever the default value is OK, one can just press enter.
- Give value for database_dll(default MS_SqlHandler.dll) :
- Because we're using SQL Server Express, the default is OK (press enter)
- Give value for authentication_dll(default AuthenticationEngine.dll) :
- The default is OK.
- Give value for logging_enabled(default False) :
- The default is OK.
- Next it asks settings for MS SQL database interface.
- Give value for dbLogin(default root) :
- Type sa (the default account we set up earlier in SQL Server Express install)
- Give value for dbPassword(default root) :
- Type the password you gave earlier in SQL Server Express install.
- Give value for dbName(default AvatarStorage) :
- The default is OK.
- Give value for dbServer(default .\SQLEXPRESS) :
- For a SQL Server Express running on the same machine, the default is OK.
- Give value for dbInitialCatalog(default avatarstorage) :
- The default is OK.
- Give value for dbPersistSecurityInfo(default True) :
- The default is OK.
- Next it tries to create the database & tables, and this should succeed (the window should now look like this; don't be alarmed because the initial login fails as the database doesn't exist at first)
- Values can be re-edited in mssqlSettings.xml file
- Cannot open database "avatarstorage" requested by the login. The login failed.
- Login failed for user 'sa'.
- Database connection failed, trying to create database..
- Created db starting to create tables
- Database creation succeeded..
- Loaded database dll IDataBaseHandler Interface
- Loaded authentication dll IAuthentication Interface
- Next it asks for the http server settings.
- Give value for address(default 127.0.0.1) :
- Enter the IP address of your machine (the default localhost is only OK for testing local connections), for example
- 192.168.0.100
- Give value for port(default 10000) :
- The default is OK, 10000 is the realXtend default port for avatar storage traffic.
- Give value for ssl(default false) :
- The default is OK.
- Now the avatar storage is set up and you can leave it running (on next startup, it loads the configuration it just created).
Configure Authentication
- Next, go to the authentication subdirectory of the realXtend server platform and delete all .xml files there (Authentication's configuration files), these should be sqliteSettings.xml, HttpSettings.xml & AuthenticationSettings.xml
- The configuration goes much like with Avatar Storage.
- Give value for database_dll(default MS_SqlHandler.dll) :
- Give value for authentication_dll(default AuthenticationEngine.dll) :
- Give value for logging_enabled(default False) :
- The defaults are all OK.
- Next you have to input the default start region X & Y coordinates for your sim/grid (affects creating new users within Authentication). For example with a standalone sim, X 1000, Y 1000 are OK.
- Then it asks for default avatar storage URL for new users. It's in the form http://avatarstorageaddress:avatarstorageport. For example, if the Avatar Storage is running on the default port 10000 and your machine's external IP address is 192.168.0.100, it would be http://192.168.0.100:10000
- (Note that different users can have completely different Avatar Storage addresses, but to get started, we are assuming just one Avatar Storage running on the same machine as Authentication.)
- Next it asks the default grid login URI for your sim/grid. This can also be changed for different users, when creating them, but that is just the default value. For a standalone sim, it is usually http://simaddress:9000 . If you also run the sim on the same machine, you'd enter for example
- http://192.168.0.100:9000
- Next the SQL Server database interface has to be configured. This is much like for Avatar Storage.
- Give value for dbLogin(default sa) :
- The default is OK.
- Give value for dbPassword(default rex) :
- Type the password you gave earlier in SQL Server Express install.
- Give value for dbServer(default .\SQLEXPRESS) :
- For a SQL Server Express running on the same machine, the default is OK.
- Give value for dbInitialCatalog(default rexAuthentication) :
- The default is OK.
- Give value for dbPersistSecurityInfo(default True) :
- The default is OK.
- The database & table creation should succeed. Next the HTTP settings are configured.
- Give value for address(default 127.0.0.1) :
- Enter the IP address of your machine (the default localhost is only OK for testing local connections), for example
- 192.168.0.100
- Give value for port(default 10001) :
- The default is OK, 10001 is the realXtend default port for authentication traffic.
Now Authentication is set up and you can leave it running (on next startup, it loads the configuration it just created).
Configure the Sim
- From the rexserver subdirectory of the realXtend server platform, edit opensim.ini, and make sure the following lines exist:
- rex_mode = True
- rex_authentication = True
Next, start the reX server (opensim.exe). When it has finished starting up, you need to set it up to trust the Authentication server by its IP address. By default a local Authentication server (127.0.0.1) is always trusted, but we no longer use the localhost address.
This is accomplished by typing authentication in the reX server console. A window opens where you can input the external IP address of the Authentication server (your machine's IP), and then press “Add”, and finally “Save and Close”
Create a user
- Type create user in the console window of the Authentication server.
- Enter first & last names (any you wish, will be displayed inworld). These are not significant for logging in using the realXtend authentication mode
- Enter account. This is what users need to input when logging in. Typically a one-piece lowercase string, like testuser
- Enter real name. This is so far not displayed inworld.
- Enter password.
- Now an avatar storage URL should automatically be created OK (of the form http://avatarstorageaddress:avatarstorageport/avatar/useruuid) if the default avatar storage URL was previously given correctly, so you can just press enter.
- Grid url is also initially the default you gave earlier, if this is OK, just press enter.
- Same for start region X & Y coordinates.
- The new user should now be saved to Authentication database, and you can proceed to login with the user, or to create an avatar. The username you need to input in the realXtend viewer or Avatar Generator is of the form account@authenticationaddress
- For example testuser authenticating to authentication server at 192.168.0.100:
testuser@192.168.0.100
|
 |