VPS for OpenSim on OSGrid, Part 3: Installation

Today we will use what we learned yesterday and use that knowledge till install the components that OpenSim needs to work. That is mainly two things, Mono and MySQL. As OpenSim is intended for the .NET framework and that is proprietary to Microsoft we need to install the OpenSource equivalent that the “free” world uses. That is called Mono and emulates the .NET framework and is in some cases even better that the “real thing”. MySQL is an open source database that can handle a lot more load than the default database for OpenSim called SQLite. 

Did you know My is the name of one of the Swedish creators daughter. If you are like me and want to know more, so here are some links:

Mono: http://www.mono-project.com/Main_Page and http://en.wikipedia.org/wiki/Mono_(software)

MySQL: http://www.mysql.com/ and http://en.wikipedia.org/wiki/Mysql

Lets get to work. In the step-by-step-guide below you should copy and paste only the bold text from the lines to the terminal window and  then press <Enter>. Often there will be a lot of text flying by in the terminal window… sometime it will take seconds and sometimes minutes. Just be calm and wait until the text stops. I have tried to give some short explanations of what we are doing in parenthesis. In the beginning of each line there are line number to help you keep track but sometimes i have also shown the prompt the server shows you at certain places. For example the MySQL prompts when you work with setting up the database and the rights for using it. That is only for you help so just ignore that. You should only copy and paste the part in bold text.

So get a nice cup of italian coffee, sit comfortable and lets get started with some terminal work.

1. Start the SSH terminal and log in as root to the VPS server (see part 2 of this guide of you don’t remember how to do this)

2. sudo apt-get update (update the list of packages that your server should know about)

3. sudo apt-get install mono-complete  (download and install Mono. Answer yes to the question. Be patient as this will take some time. Ignore the messages…  ;o)

4. sudo apt-get install mysql-server (download and install MySQL. Answer Y to the question.)

5. The MySQL installation program will now start and it looks something like this:

Type in the password you would like for the MySQL root user and use the TAB-key to move to the OK sign at the bottom and press <Enter>. A second window pops up where you should repeat the password, TAB  and press <Enter>. Write down the password you just selected!

6. mysql -u root -p (login to the MySQL server)

You will now be asked for roots password, that is the same one you just defined for the MySQL root user.

Now the MySQL prompt appears and it looks like this:

mysql>

Time to define the OpenSim database and give the proper rights to the user. Just copy and paste the bold text below including the trailing semicolon and press <Enter>

7. mysql> create database opensim;

8. mysql> use opensim;

Caution! Be careful with the next line! The XXXXXXXX below should be replaced with a password of your choice for the opensim user. Be sure to leave the ‘ ‘ around the password. Paste it but don’t press <Enter> yet! Use the arrow keys on keyboard to move to the right of the last X and use the backspace key to erase all X but just the X. Type the password of your choice and press <Enter>. Write down the password!

9. mysql> create user ‘opensim’@‘localhost’ identified by ‘XXXXXXXXX’;

Depending on MySQL versions it seems this syntax sometimes does not work and you have to do like this instead:
mysql> CREATE USER ‘opensim’@’%’ IDENTIFIED BY ‘XXXXXXXX’;

10. mysql> grant all on opensim.* to ‘opensim’@‘localhost’;

Depending on MySQL versions it seems this syntax sometimes does not work and you have to do like this instead:
GRANT ALL PRIVILEGES ON *.* TO ‘opensim’@’%’ WITH GRANT OPTION;

11. mysql> quit

Now the MySQL prompt disappears and you return to the normal terminal window with the root prompt. Well done! Take a deep breath of air…

Time for commercials and to make a new cup of coffee!

Back at the desk… now lets get OpenSim up an working.

12. apt-get install nano (download and install an easy to use text editor)

13. mkdir opensim (create a sub directory for OpenSim)

14. cd opensim (change to opensim directory)

Caution! Next one is a bit tricky. The line is it stands here today (friday august 26), works for the current version of OpenSim for OSGrid. When a new version the OSGrid of OpenSim is released (that happens about every second week) this line has to be changed. I will try to keep this line updated for some time but I can not promis for how long. You can also fix this in a very easy way by your self. Just use your desktop computers web browser (like Firefox or Chrome Ineternet expolrer will not work… just joking) and go to http://www.osgrid.org/index.php/downloads and right-click on the download link shown below, and select copy link adress (or something like that depending on the browser). Then just paste that link instead of the link below after the wget command. It is simple as that!

15. wget http://osgrid.googlecode.com/files/osgrid.opensim-08132011.v0.7.2.b80dfb6.zip (downloads the OSGrid prepared version of OpenSim)
15a. wget http://osgrid.googlecode.com/files/osgrid.opensim-08312011.v0.7.2.616e672.zip (updated september 1 2011)

16. unzip osgrid*  (unpacks the download. Be sure to have that star * after osgrid as that keeps us from having to type the whole long file name)

17. nano bin/config-include/GridCommon.ini (change the from the default database to use MySQL instead). Look at the screenshot below and change where the yellow markings are that screenshot is from another editor but dont let that distract you). Put semicolon in front of the lines to comment out SQLite and remove semicolon at the two lower lines to enable MySQL. In nano you move the cursor with the arrow keys, use the backspace-key to erase.

Please note that you have to change the username and password to what you have for your database. In Ubuntu the default user here is root and the password…. well you know that by now, don’t you? When you are done you save the file with ctrl-o (hold the control key and type the letter o) and you exit from nano with ctrx-x.

If you have run a Sim at home you know how to start it up here and if not I advuce you to read the two eralier blog articles i wrote on how to set up a sim at home. Becuse the next step are identical to those i described earlier. Please read these:

https://usvemo.wordpress.com/2011/01/03/setting-up-an-opensim-server-part-2/

https://usvemo.wordpress.com/2011/01/04/setting-up-an-opensim-server-part-3/ (Jump to point number 4 in this post as we have already done the earlier ones)

Please let me know how this worked out for you.

Advertisements
Post a comment or leave a trackback: Trackback URL.

Comments

  • Anonymous  On August 31, 2011 at 3:58 am

    Great tutorial,
    Except, You said “In Ubuntu the default user here is root and the password…. well you know that by now, don’t you?” but didnt we just create a user named opensim and granted all privs to opensim? so why would we now use root as a user in the .ini file?
    In fact the osgrid release has opensim as a user by default.

  • Glenda  On February 1, 2012 at 5:08 am

    Hi, I really like your tutorial and so far, but I got stuck running “mono OpenSim.32BitLaunch.exe”

    It gave me this error:

    —————————————————————————————————————————————————————————————

    root@islandpacifica [/home/opensim/bin]# mono OpenSim.32BitLaunch.exe

    ** (OpenSim.32BitLaunch.exe:24321): WARNING **: The following assembly referenced from /home/opensim/bin/OpenSim.exe could not be loaded:
    Assembly: OpenSim.Region.ClientStack (assemblyref_index=0)
    Version: 0.0.0.0
    Public Key: (none)
    The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/opensim/bin).

    ** (OpenSim.32BitLaunch.exe:24321): WARNING **: Could not load file or assembly ‘OpenSim.Region.ClientStack, Version=0.0.0.0, Culture=neutral’ or one of its dependencies.
    Stacktrace:

    at OpenSim._32BitLaunch.Program.Main (string[])
    at OpenSim._32BitLaunch.Program.Main (string[])
    at (wrapper runtime-invoke) System.Object.runtime_invoke_void_string[] (object,intptr,intptr,intptr)

    Native stacktrace:

    mono [0x517867]
    mono [0x4de85d]
    /lib64/libpthread.so.0 [0x2b99acfc5b70]
    mono(mono_class_vtable+0x41a) [0x4692fa]
    mono(mono_object_new+0x9) [0x46c199]
    mono(mono_exception_from_name_two_strings+0x50) [0x48c6c0]
    mono [0x481fca]
    mono [0x47fbdf]
    mono(mono_class_vtable+0x341) [0x469221]
    mono(mono_object_new+0x9) [0x46c199]
    mono(mono_exception_from_name_two_strings+0x50) [0x48c6c0]
    mono [0x481fca]
    mono [0x5036bb]
    mono [0x438cf9]
    [0x40b7113a]

    Debug info from gdb:

    [Thread debugging using libthread_db enabled]
    [New Thread 0x419e1940 (LWP 24323)]
    [New Thread 0x41ab9940 (LWP 24322)]
    0x00002b99ad731722 in select () from /lib64/libc.so.6
    3 Thread 0x41ab9940 (LWP 24322) 0x00002b99acfc5221 in nanosleep ()
    from /lib64/libpthread.so.0
    2 Thread 0x419e1940 (LWP 24323) 0x00002b99acfc1ee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    * 1 Thread 0x2b99adbc6120 (LWP 24321) 0x00002b99ad731722 in select ()
    from /lib64/libc.so.6

    Thread 3 (Thread 0x41ab9940 (LWP 24322)):
    #0 0x00002b99acfc5221 in nanosleep () from /lib64/libpthread.so.0
    #1 0x00000000004c0ab0 in ?? ()
    #2 0x00002b99acfbd73d in start_thread () from /lib64/libpthread.so.0
    #3 0x00002b99ad7384bd in clone () from /lib64/libc.so.6

    Thread 2 (Thread 0x419e1940 (LWP 24323)):
    #0 0x00002b99acfc1ee9 in pthread_cond_wait@@GLIBC_2.3.2 ()
    from /lib64/libpthread.so.0
    #1 0x00000000004c1035 in ?? ()
    #2 0x00000000004c351d in ?? ()
    #3 0x00000000004bffc9 in ?? ()
    #4 0x0000000000488c51 in ?? ()
    #5 0x000000000044ec9d in ?? ()
    #6 0x00000000004b8917 in ?? ()
    #7 0x00000000004d091e in ?? ()
    #8 0x00002b99acfbd73d in start_thread () from /lib64/libpthread.so.0
    #9 0x00002b99ad7384bd in clone () from /lib64/libc.so.6

    Thread 1 (Thread 0x2b99adbc6120 (LWP 24321)):
    #0 0x00002b99ad731722 in select () from /lib64/libc.so.6
    #1 0x00002b99acb69efc in g_spawn_sync () from /lib64/libglib-2.0.so.0
    #2 0x00002b99acb6a2b8 in g_spawn_command_line_sync ()
    from /lib64/libglib-2.0.so.0
    #3 0x0000000000517908 in ?? ()
    #4 0x00000000004de85d in ?? ()
    #5
    #6 0x00000000004692fa in mono_class_vtable ()
    #7 0x000000000046c199 in mono_object_new ()
    #8 0x000000000048c6c0 in mono_exception_from_name_two_strings ()
    #9 0x0000000000481fca in ?? ()
    #10 0x000000000047fbdf in ?? ()
    #11 0x0000000000469221 in mono_class_vtable ()
    #12 0x000000000046c199 in mono_object_new ()
    #13 0x000000000048c6c0 in mono_exception_from_name_two_strings ()
    #14 0x0000000000481fca in ?? ()
    #15 0x00000000005036bb in ?? ()
    #16 0x0000000000438cf9 in ?? ()
    #17 0x0000000040b7113a in ?? ()
    #18 0x0000000000000278 in ?? ()
    #19 0x000000001d1ccc60 in ?? ()
    #20 0x000000001d126340 in ?? ()
    #21 0x0000000041abebb0 in ?? ()
    #22 0x0000000041abebb0 in ?? ()
    #23 0x00002aaaaaacde60 in ?? ()
    #24 0x0000000041abea54 in ?? ()
    #25 0x00002b99acb34a7e in ?? () from /lib64/libglib-2.0.so.0
    #26 0x00002b99acb3516c in g_hash_table_insert () from /lib64/libglib-2.0.so.0
    #27 0x00000000004e1d0c in ?? ()
    #28 0x00000000004e2487 in ?? ()
    #29 0x0000000000000001 in ?? ()
    #30 0x00007fffadc60ac8 in ?? ()
    #31 0x00002b99acb24e09 in g_array_insert_vals () from /lib64/libglib-2.0.so.0
    #32 0x0000000041abea59 in ?? ()
    #33 0x000000001d1c3c10 in ?? ()
    #34 0x00007fffadc60c20 in ?? ()
    #35 0x00007fffadc60be0 in ?? ()
    #36 0x0000000000000000 in ?? ()

    =================================================================
    Got a SIGSEGV while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    Aborted
    root@islandpacifica [/home/opensim/bin]#

    ————————————————————————————————————————————————————————————–

    What do you think went wrong? 😦
    btw I don’t know if this will help, my VPS is “WHM 11.30.5 (build 6) CENTOS 5.7 x86_64 virtuozzo”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: