Setting up an account: Difference between revisions

From Open Metaverse Wiki
(How to create an account and a tree of folders to install OpenSim into. Get the OpenSim sources and build them.)
 
m (Adding a link to the next page)
Line 63: Line 63:
     dotnet clean
     dotnet clean
     dotnet build --configuration Release
     dotnet build --configuration Release
Next:  [[Editing the Robust.ini file]] for OpenSim and starting Robust

Revision as of 11:45, 24 September 2023

Create a Linux User for OpenSim

When you rented your Linux server in the cloud it came with a 'root' account that you have been using to install software an configure everything. But root is a SUPER USER that has the ability to take over or destroy your system. You should never run OpenSim from the root account! OpenSim is a huge program that may have security holes in it that give access to the underlying account. So it is wise to set up a separate account to run all the parts of an OpenSimulator sytem. The name of this account could be the name of the grid, or it could just be an account named opensim. Here's how to create it from the root terminal window:

   addduser opensim
       #make up a password, other fields can be left blank

Then setup your SSH client program (putty, bitvise, PAC) to log onto your server with this account. You are now in a new window into a new blank account that needs to be filled in.

Create a Tree of Folders for OpenSim

By default OpenSim puts a LOT of junk in the bin folder that it runs out of. The asset files and region caches are HUGE trees of folders. Since the bin folder must be replaced every time you upgrade to a new version of OpenSim, these huge folders must be moved every time. Also the file search tools take forever if they think they have to search these. By judicious editing of the Robust.ini and OpenSim.ini files you can put these folders in their own branch of the file system where they never have to move and don't slow down other tasks. From the opensim account I create these folders:

Data #I set up OpenSim to create big folders here out of the way
OARs #Place to put OARs for upload or downloat
OARfull #Full backups of regions
OARfast #OAR backups without assets, done frequently
IARfull #Full IARs, backed up infrequently
IARfast #IARs without assets, frequent backups
Source #Sources for OpenSim
prompts #My admin system stores temp files here
Temp #my gridmap stores a grid map here

Then I create a separate tree of folders for the grid. I move the GridCommon.ini file up here, since it is common to the whole grid (DUH!) and should not be stored many times over down in all the region folders. To keep Robust and other administration code away from the regions there are folders here for those.

Grid #The working grid files
| Secret #A place for common admin code
| Admin #A place for grid administration code
| Robust #The central server code, asset server, login server
| Regions #A folder to contain all the region folders


Regions is a folder reserved just for the regions. I named this Regions and regretted it since the region setup later will require folders named Regions also. Deal with it, one is the list of all regions, the other contains the Regions.ini file describing each region. Some grid admin systems work off the folder names so it is important to have ONLY folders for regions in this Regions folder, and only one per region instance. Spaces and special characters in file names are allowed but are A PAIN IN THE BEHIND! Unfortunately everyone wants spaces and apostrophes in their region names. In my admin tools I added code to replace spaces and apostrophes with dashes when dealing with file names. For example region "Na'vi Tree of Life" can use that name in the Regions.ini file, everyone will see that name in-world. But it should be stored in a folder here named "Na-vi-Tree-of-Life".

In each region folder I have a complete copy of the bin folder. (It is possible to run all the regions out of a single copy, but that is a pain to set up). The bin folders are not very large and having separate copies of bin for each region allows me to update them one at a time for testing. I move a copy of all the settings in OpenSim.ini that are common to the grid into the GridCommon.ini file (DUH!). And the settings that are specific to each region are in a Local.ini file in each region folder. This allows me to make only a few changes to OpenSim.ini and then use the same copy of that on all regions. For example Local.ini has the http port number for the region. UNFORTUNATELY, OpenSim reads other parameters for each region in a separate process: A Regions folder is searched for any .ini files and they are all read. So you have to have a separate folder for these, even if you have only one Regions.ini file in there. UNFORTUNATELY, the OpenSim.ini and Regions.ini files are processed separately and cannot share data, so you must enter some things, like the http port number for the region in both the Local.ini and the Regions.ini files. Here is an example tree of region files, starting with the Regions folder again:

| Regions #A folder to contain all the region folders
| | Welcome #example welcome region
| | | Local.ini #some parameters for region Welcome
| | | Regions #I put the Regions.ini file here
| | | | Regions.ini #more parameters for region Welcome
| | | bin #every region has its own copy of the opensim binaries here
| | Na-vi-Tree-of-Life #Another example region
| | | Local.ini #I store all settings for a single region here
| | | Regions #I put the Regions.ini file here
| | | | Regions.ini #more parameters for region Na'vi Tree of Life
| | | bin #every region has its own copy of the opensim binaries here

Get the Sasquatch OpenSim Sources

NGC Sasquatch is a branch of OpenSim that has some bug fixes that the main developers refuse to fix. Among other things, it compiles under dotnet. You only have to download it once, then update it from time to time with git. From the Linux opensim account:

   cd ~/Source
   git clone https://github.com/OpenSim-NGC/OpenSim-Sasquatch.git
   cd OpenSim-Sasquatch
   git checkout master

Update to the latest version of Sasquatch

From the opensim account:

   cd ~/Source/OpenSim-Sasquatch/
   git pull

Compile the Sasquatch sources

From the opensim account:

   cd ~/Source/OpenSim-Sasquatch/
   dotnet clean
   dotnet build --configuration Release

Next: Editing the Robust.ini file for OpenSim and starting Robust