Installing OpenSim in Windows XP with MySQL.
Update 20090201: Included instructions for Windows 64 bit as reported by Xen Zerbino (Thanks! :-)).
Update 20090123:Fixed a bug in OpenSim.ini detected by Alpha Runningbear. (Thanks!)
Update 20090105: Reworded step 6 to eliminate some tech-talk, added a fall-back for initial log-in, and describe the shutdown procedure in as per Vint Falken‘s suggestions 1 and 2 (thanks! :-)).
Note 1: OpenSim is considered to be alpha software. This means that many things you expect from your daily use of Second Life don’t work in the same way, or simply they don’t work at all. Development of OpenSim is very active, tho, so that we can only expect OpenSim quality and features to better with time.
Note 2: This is not for the faint of heart. :-) You’ve been warned! :-)
Note 3: All the information presented here was valid on January the 3rd, 2009. I’ll correct errors that are brought to my attention, but this post should not be taken as a substitute of the official OpenSim wiki.
The purpose of this post is to present a short, comprehensive, do-it-yourself tutorial for the installation of OpenSim in a Windows XP machine, using MySQL as a back-end for persistence. I’ve tried to write the tutorial in such a way that you can understand it even if you’ve got no previous exposure to OpenSim or to database concepts; however, some familiarity with the operating system is required, in particular you’re assumed to know how to 1) open a system prompt; 2) open a text editor and create a file (the “notepad” application will suffice). A step-by-step procedure follows; you’ll be asked to download some files; these files implement OpenSim and MySql.
Step 1: Download OpenSim here and install it, using all default options.
OpenSim (http://opensimulator.org/wiki/Main_Page) is the Open Source Simulator, the set of programs that will allow you to create Second Life-like islands in your own computer, and eventually link them to the world for other people to see.
Step 2: Download MySQL 5.1 (for Win32 or for Win64; the Windows ZIP/Setup.EXE option worked for me). Install with all default options. You will be asked for the “root” password, chose it carefully, you’ll need it below [use that path if you’ve neved worked with a RDBMS, or don’t even know what a RDBMS is; otherwise, you should define a special user for OpenSim-related questions].
Step 3: You’ll need the MySQL GUI tools too: http://dev.mysql.com/downloads/gui-tools/5.0.html. Again, install with all default options.
MySQL is the program that will implement persistence in your islands. “Persistence” is the technical term used to describe the fact that your appearance is the same (it persists) between logins, the islands are the same too (they also persist) between logins (assuming there’s not been somebody to alter them, of course, or a script has altered the world, etc).
To implement persistence, we will need to create a MySQL database. You must chose a name for your database. “OpenSim” is a good choice; or you can think big, and use the name of your own future grid :-)
Step 4: Go to Start -> All programs -> MySQL -> MySQL Server 5.1 -> MySQL Command Line Client and type the root password (alternatively, open a system prompt and connect to MySQL using the OpenSim-specific account). When you get the “mysql>” prompt, type
create database MyGridName;
substitute “MyGridName” by the name you’ve chosen; the final semicolon is necessary; you should get a “Query Ok, 1 row affected” reply.
[If you’ve created an OpenSim-specific account, grant this account all privileges on the database you’ve just created]
Step 5: Go to “C:\Program Files\OpenSim”, and create a file called “OpenSim.ini”. Cut and paste the text below into it, reconstructing the “broken” lines (if a line begins with a blank, eliminate the first three blanks only and join it with the previous line).
-------------------- Cut here ------------------- [Startup] region_info_source = filesystem gridmode = False physics = OpenDynamicsEngine meshing = ZeroMesher physical_prim = True see_into_this_sim_from_neighbor = True serverside_object_permissions = False storage_plugin = "OpenSim.Data.MySQL.dll" storage_connection_string = "Data Source=localhost; Database=DDDD;User ID=UUUU;Password=PPPP;"; storage_prim_inventories = true appearance_persist = true appearance_connection_string = "Data Source=localhost; Database=DDDD;User ID=UUUU;Password=PPPP;pooling=false;" asset_database = "local" startup_console_commands_file = "startup_commands.txt" shutdown_console_commands_file = "shutdown_commands.txt" DefaultScriptEngine = ScriptEngine.DotNetEngine asset_database = local clientstack_plugin = OpenSim.Region.ClientStack.LindenUDP.dll EventQueue = True [StandAlone] accounts_authenticate = True welcome_message = Welcome to Condensation! inventory_plugin = "OpenSim.Data.MySQL.dll" inventory_source = "Data Source=localhost;Database=DDDD; User ID=UUUU;Password=PPPP;" userDatabase_plugin = "OpenSim.Data.MySQL.dll" user_source = "Data Source=localhost;Database=DDDD; User ID=UUUU;Password=PPPP;" asset_plugin = "OpenSim.Data.MySQL.dll" asset_source = "Data Source=localhost;Database=DDDD; User ID=UUUU;Password=PPPP;" dump_assets_to_file = False [Network] default_location_x = 1000 default_location_y = 1000 http_listener_port = 9000 remoting_listener_port = 8895 grid_server_url = http://localhost:8001 grid_send_key = null grid_recv_key = null user_server_url = http://localhost:8002 user_send_key = null user_recv_key = null asset_server_url = http://localhost:8003 inventory_server_url = http://localhost:8004 secure_inventory_server = true -------------------- Cut here -------------------
Now replace all occurences of “DDDD” by the name of the database you created in step 4, all occurences of “UUUU” by “root” (or the name of the OpenSim-specific account you created in step 3), and all occurences of PPPP by root’s password (or the password for the OpenSim-specific account). You should also replace “Welcome to Condensation!” by your own welcome message.
Step 6: Go to Start > Run. Type “cmd” and press ENTER. Type “cd \program files\opensim” and press ENTER. Type “opensim” and press ENTER [if you’re running Windows Vista 64 bit, type opensim32bitLaunch instead — you’ll need to run it as an administrator]. Wait some secs. When asked for “default region config: region name”, enter the name of your first region (I entered “Condensation Land”); you can accept the default for Grid Location (X Axis) and (Y Axis), for the internal IP address or incoming UDP, and for the internal IP port for incoming UDP; you will then be asked for the first and last names and password for the master avatar: you can use your SL first and last names, but I’d suggest you’d not use your SL password, as this password will be stored as plain text.
We’re almost done!
Step 7: Create a copy of the Second Life icon in your desktop, change its name to whatever you fancy (in my case I chosed “Condensation”), right click the new icon and select “Properties”, and add “-loginuri http://localhost:9000/” (without the quotes) to the end of the first entry field.
That’s it.
Now open your newly created icon. You’ll see data about Second Life, which you can disregard, and you’ll know that you’re not in Second Life any more because of the red menu bar. Enter the first name, last name and password you have created in step 6, and press ENTER. [If for any reason you get a “Could not authenticate your avatar” message, you can always re-create your avatar by typing “create user first last password 1000 1000” (without the quotes) and pressing enter at the “Region <root> # :” prompt in the OpenSim window.]
You’ll log in as usual… into your own grid!!! If you’re using the same first name and last name than in SL, you’ll see the last screen of your last SL session; don’t be confused by that: you’ll also see your own welcome message, which tells you that you’re not logging into SL after all.
Wait a few seconds, and… poof! You’re logged in into your own grid!
If you display the map, you’ll see that you’re in an universe with only one island, namely, the one you’ve named in step 6.
Now, ok, you’re ruthed, which means that you’re horrible, and your world is empty, with no other avies, no economy and no shops. However, you can create prims,
upload textures, etc., and this is more than enough to give you a feeling of what the technology can do.
Final step: When you’re finished playing/experimenting/whatever, go to the opensim console and type “quit” (or “shutdown”) and press ENTER. This will guarantee that all the data (i.e., prims, outfits, terrain, etc) is correctly saved so that you’ll find it there next time you open your world.
Rationale for everything above:
- Tareru Nino’s Linden Lab decomissions over 23.000 islands in 24 hours.
- Vint Falken’s It was this… or telling you about script limitations.
- “We believe this is fair”, or how to make business customers and creative residents equally angry.
- You can also take a look at this.
- [Update 20090105:] Vint Falken’s How to OpenSim DIY on Windows XP.
Exactly, indeed what I posted today creates a 1-island grid, what the OpenSim people call “standalone mode” or “sandbox mode”. Creating a full grid is slightly more complicated, and will be the object of a subsequent blog post. Also, making your grid available to the outside world is no trivial task. Still, I feel strongly that’s the way to go.
Sorry if I seem dumb but if I read correctly this will create a personal grid resident on our machine?
That’s awesome!!!!
If I can get that through, ANYBODY will be able to as well. Thank you Zonja for all your efforts. I am still shy and scared of adding a new addiction to the one that bring me such RL trouble. But I feel I must honour your commitment.
Not yet sure what is meant by “to create a personal grid resident” as Gita says. Sounds exciting though.
Thanks, Mikil! :-) Re: Gita’s comment, there’s a parse error in your way of reading I think: that’s “to create (a personal grid) (resident on our [own] machine)”. To create a virtual world in your Windows PC.
Oh, thank you for your kind words! :-) More tutorials will follow soon.
Zonja!!!
this is freakin’ GREAT!!! Let me tell you!
I will post a link to this awesome tutorial on Plurk and Twitter…
I’m so eager to learn more about these things and I am sure I couldn’t find a better teacher!!!
It’s very well done & easy to follow.
Thank you AGAIN!!!
[…] idea of “fair” Miss Zonja Capalini wrote out an easy-to-execute tutorial on Installing OpenSim on Windows XP with MySQL. This isn’t about how to login to an OpenSim, no, this is about running your very own […]
Pingback by How to OpenSim DIY on Windows XP | VintFalken.com | January 4, 2009
[…] Zona Capalini: Installing OpenSim in Windows XP with MySQL – “The purpose of this post is to present a short, comprehensive, do-it-yourself tutorial for the installation of OpenSim in a Windows XP machine, using MySQL as a back-end for persistence. “ […]
Pingback by Jeff Barr’s Blog » Links for Sunday, January 4, 2009 | January 5, 2009
You’re very welcome, and thank you too for your comment. I enjoy writing tutorials! :-)
Excellent post, Zonja. Thank you!
Zonja, on 3rd thought, maybe change this
“Open a system prompt, go to “C:\Program Files\OpenSim” ”
by
Go to Start > Run. Type “cmd” and press ENTER. Type “cd c:\program files\opensim” and press ENTER. Type “opensim” and press ENTER.
Not sure if everybody knows how to err.. mount? (especially not us that started out after Windows 95 :D
You’re of course right. I’ve always thought that if I were a program and was called in the way you describe I’d underperform in silent protest, but of course those are techie prejudices :-)
Incorporated and annotated. Thanks!
Found that in the OpenSim wiki:
————————-
Note: if you are using Windows Vista, remember to start servers as Admin. If not it will prompt you an error in console like “Error – Access denied”
————————-
If you try it, please report back, and I’ll update the post! :-)
I forgot to ask, do you think this will work on Vista?
Gita, I believe if you have 32 bit vista, you’d be fine. some errors were reported with 64 bit vista:
http://www.adamfrisby.com/blog/2008/08/running-opensim-under-a-64-bit-environment/
[…] Zonja Capalini « Installing OpenSim in Windows XP with MySQL. […]
Pingback by HyperGrid, or how to teleport between WORLDS using OpenSim « Zonja Capalini | January 5, 2009
Thanks Vint! I’ll have to give this a try but I want to be sure I have the time to do it with no distractions LOL!
Zonja,
regarding Vints recent troubles, you might be interested in this newly reported bug;
http://opensimulator.org/mantis/view.php?id=2960
Thanks, Stefan! I modified the tutorial to include Vint’s explanations about the create user command, just in case somebody else experiences the same problem until this bug is fixed.
Thanks, Zonja! There is a bug in the .ini, when not using root but using another user id: in the third line containing DDDD and PPPP, the userid is root and should be UUUU. If that root isn’t changed to the same user id that was substituted for UUUU elsewhere, the script crashes and must be rerun after replacing root with the correct user id.
Works well otherwise though! So great to have free uploading for testing sculpties and other textures.
Thanks! I fixed the bug. I’m in love with OpenSim, I’ve been using it quite extensively these last days. With hypergrid, the future is one of small grids hyperlinked between them. No more 12-hours MySQL database regen downtime because you have to share the grid with 80.000 more people! :-)
[…] for a while and looked around for some help on line and finally came across Zonja Capalini’s excellent post about setting up opensim using MSQL as the data base. The instructions were very clear, I only […]
Pingback by Setting up Opensim on my own machine « Plymouth Harbour’s Weblog | January 23, 2009
Does this work with Vista? I tried it but get this:
log4net:ERROR CmlHierarchyConfigurator: No appender named [NHibernateFileLog] not found.
Performing compatibility checks… Environment is compatible.
09:29:34 – [APPLICATION]:
Unhandled Exception: Nini.ini.iniException:Expected closing quote – Line 1,0, position 53
at Nini.Ini.IniDocument.LoadReader<IniReader reader.
at…it lists several at Nini..stuff
Can someone help me :(
I am running vista 64 if this method doesnt work for that please let me know where I can find out how to run the standalone on my system
omg….I cant believe it…I finally got it to work on vista.
YAY and thanks for this great explanation on how to set it all up
FYI it didnt work the first time because I had another opensim file and folders and had to delete them and reinstall the opensim download you recommended
Thanks again :)
oh I forgot to mention everything in your explanation will work for the vista
EXCEPT you have to run the opensim32bitLaunch.exe file as administrator ilo the opensim.exe file
Thanks for the info! :-) I’ve updated the tutorial to include instructions for Vista 64.
Hi, I’ve managed to get a standalone opensim running on my pc when I use the default sqlite database but when I attempted to use mysql by doing as you suggest or even just by amending the existing ini to use mysql, it crashes…
Any suggestions would be welcome… :-)
P.S. My OS is 32bit Vista.
I never worked with sqlite myself, but you may find this very detailed tutorial useful: http://chapter-and-metaverse.blogspot.com/2008/11/4-migrating-to-mysql.html
Thanks, I’ll have look…but I’m a quite ‘green’ to be honest I haven’t worked with any databases at all, I just used the opensim ‘out of the box’.
It was only when I tried to install the mysql that it didn’t work :-)
Update: I’ve got it running with mysql now :-)
[…] Social Links: These icons link to social bookmarking sites where readers can share and discover new web pages. […]
Pingback by Creating Virtual Land | March 24, 2009
I am unable to install MySQL with the necessary command line interface–it stalls if I try. It will only install w/o the command line interface. How can I set up the database for Opensim not using the command line interface?
I’m sorry, but I’m no MySQL expert myself. Maybe somebody can offer some help? :-)
This post has been republished at maxpPing.org, check http://www.maxping.org/technology/platforms/open-simulator/install-opensim-locally-on-windows-xp.aspx
Thank You! I got up and running in about 30 minutes. Appreciate this post.
[…] Opensim was looking better and better, while Second Life was losing the little credibility they had left, if any, and other worlds didn’t look serious and/or stable enough for enterprise use. The only alternative seemed to be Opensim, so that I downloaded Opensim and MySql, created my first region, and blogged about my experience. […]
Pingback by The Openspace fiasco: six months later « Zonja Capalini | April 30, 2009
Hi Zonja!! thanx for the great instructions!!! theres just one thing, when i try to run opensim out of the command pompt it crashes and gives this error:
15:56:31 – ========================= STARTING OPENSIM =========================
15:56:31 – ====================================================================
15:56:31 – [OPENSIM MAIN]: Running in sandbox mode
15:56:31 – [DATASTORE]: Attempting to load OpenSim.Data.MySQL.dll
15:56:31 – [REGION DB]: MySql – connecting: Data Source=localhost; Database=liqu
idmesh;User ID=root;Password=***;
15:56:32 – [APPLICATION]:
Unhandled Exception: MySql.Data.MySqlClient.MySqlException: Unable to connect to
any of the specified MySQL hosts. —> System.Exception: Exception of type ‘Sys
tem.Exception’ was thrown.
at MySql.Data.MySqlClient.NativeDriver.Open()
— End of inner exception stack trace —
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings
)
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at OpenSim.Data.MySQL.MySQLEstateStore.Initialise(String connectionString)
at OpenSim.Region.Framework.StorageManager..ctor(String dllName, String conne
ctionstring, String estateconnectionstring)
at OpenSim.OpenSimBase.CreateStorageManager()
at OpenSim.Region.ClientStack.RegionApplicationBase.StartupSpecific()
at OpenSim.OpenSimBase.StartupSpecific()
at OpenSim.OpenSim.StartupSpecific()
at OpenSim.Framework.Servers.BaseOpenSimServer.Startup()
at OpenSim.Application.Main(String[] args)
if anyone can help it would be great!
thanx.
It looks like the problem is in the Mysql
database
:-
MySql – connecting: Data Source=localhost;
Database=liquidmesh;
User ID=root;
Password=***;
The first thing to do is check you can actually connect to the Mysql database liquidmesh with the User/Password that you have in the OpenSim.ini file.
You might try to delete the reference to the Database, and see if it starts with the default settings.
Hi i followed this however it did not work,
It seems ports 8001 though to 8006 are not open, I want to start my own grid on windows XP
If anyone can help me that would be great, I am on twitter please message me http://twitter.com/russellharrower
Thanks
Great guide, Zonja. I will first try on a Windows comp. because of your guide. ButI plan to use it on Linux or OSX so i will search for instructions for those platforms too.
Thanks a lot!
Ben
@Ben: Thanks, and welcome to the Opensim community! :-) Please send me private email if you need help! :-)
Nice guide, Zonja!
I want to add that running on Linux is definitely possible — my 14-year-old daughter set me up. I can lend her to anyone else! :-)
Also, the first time I did this, I used the built-in SQLite instead of MySQL, which eliminates 90% of the steps. You’ll need MySQL for larger grids, or many concurrent users — but for a region or two, and a handful of guests, SQLite is just fine. Also, running Hippo instead of the Second Life browser eliminates having to change the file path, which I couldn’t figure out how to do in Vista!
– Maria
[…] I decided to give it a try myself. I downloaded Opensim and MySQL and installed my first Opensim. Here’s a blog article I wrote about […]
Pingback by An interview by Alyne Dagger (with some final remarks) « Zonja Capalini | September 2, 2009
Thank you so much. I had been struggling for a week to get Opnsim installed on my Vista laptop and had almost given up hope when I found your website. It worked!
You’re very welcome :-) It’s a very old article, tho — you might want to take a look at Diva’s distribution, described here: http://www.metaverseink.com/blog/?p=21 — it’s almost zero-config and it has an automatic update system.
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>cd\
C:\>cd program files (x86)
C:\Program Files (x86)>cd opensim
C:\Program Files (x86)\OpenSim>opensim.32bitlaunch
log4net:ERROR XmlHierarchyConfigurator: No appender named [NHibernateFileLog] co
uld be found.
log4net:ERROR XmlHierarchyConfigurator: Appender named [NHibernateFileLog] not f
ound.
32-bit OpenSim executor
———————–
This application is compiled for 32-bit CPU and will run under WOW32 or similar.
All 64-bit incompatibilities should be gone.
log4net:ERROR XmlHierarchyConfigurator: No appender named [NHibernateFileLog] co
uld be found.
log4net:ERROR XmlHierarchyConfigurator: Appender named [NHibernateFileLog] not f
ound.
Performing compatibility checks… Environment is compatible.
11:01:01 – [STARTUP]: Beginning startup processing
11:01:01 – [STARTUP]: Version: OpenSimulator Server 0.6.1.7885
11:01:01 – ====================================================================
11:01:01 – ========================= STARTING OPENSIM =========================
11:01:01 – ====================================================================
11:01:01 – [OPENSIM MAIN]: Running in sandbox mode
11:01:01 – [DATASTORE]: Attempting to load opensim.Data.MySQL.dll
11:01:01 – [REGION DB]: MySql – connecting: Data Source=localhost; Database=open
sim;User ID=root;Password=***;
11:01:01 – [REGION DB]: Connection wait timeout 28860 seconds
OpenSim threw an exception:
MySql.Data.MySqlClient.MySqlException: Table ‘migrations’ already exists
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64
& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior
)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at OpenSim.Data.Migration.Initialize()
at OpenSim.Data.Migration..ctor(DbConnection conn, Assembly assem, String typ
e)
at OpenSim.Data.MySQL.MySQLEstateStore.Initialise(String connectionString)
at OpenSim.Region.Environment.StorageManager..ctor(String dllName, String con
nectionstring, String estateconnectionstring)
at OpenSim.OpenSimBase.CreateStorageManager(String connectionstring, String e
stateconnectionstring)
at OpenSim.OpenSimBase.CreateStorageManager()
at OpenSim.Region.ClientStack.RegionApplicationBase.StartupSpecific()
at OpenSim.OpenSimBase.StartupSpecific()
at OpenSim.OpenSim.StartupSpecific()
at OpenSim.Framework.Servers.BaseOpenSimServer.Startup()
at OpenSim.Application.Main(String[] args)
at OpenSim._32BitLaunch.Program.Main(String[] args) in C:\OpenSim\trunk6\Open
Sim\Tools\OpenSim.32BitLaunch\Program.cs:line 47
Application will now terminate!
C:\Program Files (x86)\OpenSim>
I don’t understand what I am doing wrong. I follow the instructions to the letter and get this error.
[…] initial set up is pretty simple. I simply followed this guide. Set by step, word for word, it’s very straight forward though you don’t actually need the […]
Pingback by Creating Virtual Land : JoshMiller.net | December 8, 2011
[…] initial set up is pretty simple. I simply followed this guide. Set by step, word for word, it’s very straight forward though you don’t actually need the […]
Pingback by Creating Virtual Land | Virtual Life | July 2, 2012