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!)
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.
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.