aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xBuildIt.sh5
-rw-r--r--INSTALL.md161
-rwxr-xr-xInstallItAll.sh17
-rwxr-xr-xscripts/fix_var_run.sh6
4 files changed, 172 insertions, 17 deletions
diff --git a/BuildIt.sh b/BuildIt.sh
index da41f8e..76c54d7 100755
--- a/BuildIt.sh
+++ b/BuildIt.sh
@@ -2,7 +2,12 @@
2 2
3./runprebuild.sh 3./runprebuild.sh
4 4
5# Debian no longer provides nant.
6#./nant-color
7
8# Use this for Mono 4.
5xbuild /target:clean 9xbuild /target:clean
6xbuild /p:TargetFrameworkVersion="v4.5"xbuild /p:TargetFrameworkVersion="v4.5" 10xbuild /p:TargetFrameworkVersion="v4.5"xbuild /p:TargetFrameworkVersion="v4.5"
7 11
12# Use this for Mono 5.
8#msbuild /p:Configuration=Release 13#msbuild /p:Configuration=Release
diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 0000000..bfab985
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,161 @@
1NOTE - this is the OpenSim 0.9.0.1 version in the SledjChisel branch,
2which isn't quite ready yet. Use 0.8.2.1 in the master branch for the
3stable well tested version.
4
5
6Use this to create a sim that links into Infinite Grid or Misfitz Grid
7from Linux.
8
9It's only been tested on Ubuntu 10.04, 11.04, 12.04, 16.04, as well as
10Debian 8, and Devuan 9, YMMV. This is also a WIP, use it at your own
11risk. It's been used to set up a few freshly installed servers though.
12
13The directory layout.
14---------------------
15
16The various directories are -
17
18.git Used by git for it's internal accounting, and the older versions.
19
20.nant Used by the nant build tool.
21
22OpenSim OpenSim source code.
23
24Prebuild Used by the build system.
25
26ThirdParty For third party OpenSim modules.
27ThirdPartyLicenses
28
29addon-modules Also for third party modules. Don't ask me why there's two.
30
31bin The OpenSim binaries, and other files.
32
33doc Supposedly for documentation, which I wish OpenSim devs would write some.
34
35example An example of how to set this all up.
36
37scripts Various Linux scripts for managing OpenSim.
38
39share No idea really.
40
41Also, the installation script moves the following directories from the
42example directory, to outside of this main directory, they are all used
43for writing various things. Makes it easy to upgrade, and separates them
44from actual executable stuff.
45
46AssetFiles Stores assets if running in grid mode.
47
48backups All sim and inventory backups are stored here.
49
50caches Various cached things.
51
52config All your configurtion files.
53
54db If you are not using MySQL, your data lives here.
55
56logs Log files get stored here.
57
58
59Follow these steps.
60-------------------
61
62Go to -
63
64https://www.infinitegrid.org/drupal/content/How_to_link_your_OpenSim_region_to_Infinite_Grid_LinuxMySQL
65
66and follow the directions to create an admin user account. You can skip
67that bit if you already have a suitable user with sudo access.
68
69Note that these scripts pretty much follow that above wiki description,
70with some exceptions. The configuration information per sim has been
71rearranged so that there is only ONE copy of the OpenSim installation.
72
73Next you need to figure out what password you want to use for OpenSims
74access to the database. We will call this "DatabasePassword". Run the
75following script, from inside the OpenSim directory -
76
77./InstallItAll.sh DatabasePassword
78
79This will do most of the work for you, except for creating sims. There
80is a final step that needs to be done manually for now. Edit
81/etc/rc.local, make sure it has the following line in it somewhere,
82probably at the end -
83
84/opt/opensim/current/scripts/fix_var_run.sh
85
86
87Creating sims.
88--------------
89
90A separate script is here for sim creation, you can use it to create many
91sims. You will need -
92
93Your host name, or it could be your IP, we will use "sims.example.net".
94
95A name for your sim, we will use "My new sim". It should be unique on
96the grid.
97
98A location for your sim, we will use "1234,5678". You can use the
99Infinite Grid web based map to poke around and find a good location.
100Choose an empty spot.
101
102Once you have all that information sorted out, run this script from the
103installed scripts directory -
104
105./create_sim.sh "My new sim" "1234,5678" "sims.example.net"
106
107Or this if you want to override the detected IP address -
108
109./create_sim.sh "My new sim" "1234,5678" "sims.example.net" "1.2.3.4"
110
111Also, you can create a varregion with something like -
112
113./create_sim.sh "My new sim" "1234,5678" "sims.example.net" "1.2.3.4" 512
114
115Note that the size has to be a multiple of 256, so 512, 768, 1024, etc.
116
117Running sims.
118-------------
119
120Now you can go to /opt/opensim/config/sim01 and run the following script
121to start it up -
122
123./start-sim
124
125You will see the screen console. You can run the screen console again by
126running that command once more, or running the sim-console command.
127
128You can stop the sim with -
129
130./stop-sim
131
132You can backup the sim with -
133
134./backup-sim
135
136
137
138Finishing up.
139-------------
140
141Once it's all tested, you can use this to finish things off (back in
142the scripts directory) -
143
144./go_live.sh
145
146Which sets up the monit control file/s, though you should double check
147it all, and you still have to do the basic configuration and enabling of
148monit yourself. This is in case you already have monit set the way you
149like.
150
151
152NOTES -
153
154This attempts to use only one copy of the OS install for all sims. We
155are running one instance of OS for each sim though, as this prevents one
156sim crashing from bringing down the others. OS however really wants to
157write data to directories within it's own bin directory. I'm not at all
158certian if that data can be shared. For the same reason, so far I've
159not been able to get to the point where we can make the OS directory
160read only. This complicates things during upgrades.
161
diff --git a/InstallItAll.sh b/InstallItAll.sh
index 81ff54f..db6c148 100755
--- a/InstallItAll.sh
+++ b/InstallItAll.sh
@@ -6,7 +6,7 @@ MYSQL_DB="InfiniteGrid"
6MYSQL_USER="opensim" 6MYSQL_USER="opensim"
7OS_USER="opensim" 7OS_USER="opensim"
8 8
9OSVER="0.8.2.1" 9OSVER="0.9.0.1"
10 10
11 11
12# Figure out where we are, most of this mess is to troll through soft links. 12# Figure out where we are, most of this mess is to troll through soft links.
@@ -51,7 +51,9 @@ fi
51USER=$(whoami) 51USER=$(whoami)
52 52
53echo "Installing software." 53echo "Installing software."
54sudo apt-get install mysql-server tmux mono-complete mono-gmcs nant nunit uuid-runtime monit mc 54sudo apt-get install mysql-server tmux mono-complete mono-gmcs nunit uuid-runtime monit mc
55# nant is done separately, coz it was removed from Debian for some mysterious reason.
56sudo apt-get install nant
55sudo /etc/init.d/mysql restart 57sudo /etc/init.d/mysql restart
56 58
57echo "Setting up OpenSim users." 59echo "Setting up OpenSim users."
@@ -70,10 +72,7 @@ sudo adduser --system --shell /bin/false --group $OS_USER
70sudo addgroup $USER $OS_USER 72sudo addgroup $USER $OS_USER
71 73
72echo "Building OpenSim." 74echo "Building OpenSim."
73./runprebuild.sh 75./BuildIt.sd
74./nant-color
75#xbuild /target:clean
76#xbuild /p:TargetFrameworkVersion="v4.5"
77 76
78echo "Setting up OpenSim." 77echo "Setting up OpenSim."
79sudo rm -fr $OSPATH/opensim-IG_* 78sudo rm -fr $OSPATH/opensim-IG_*
@@ -88,9 +87,7 @@ cd current
88for dir in AssetFiles backups caches config db logs 87for dir in AssetFiles backups caches config db logs
89do 88do
90 if [ ! -f ../$dir ]; then 89 if [ ! -f ../$dir ]; then
91 sudo cp -fr $dir .. 90 sudo cp -fr example/$dir ..
92 sudo rm -fr $dir
93 sudo ln -fs ../$dir $dir
94 fi 91 fi
95done 92done
96 93
@@ -125,6 +122,4 @@ sudo cp scripts/opensim.tmux.conf /home/$OS_USER/.tmux.conf
125sudo chown $USER /home/$OS_USER/.tmux.conf 122sudo chown $USER /home/$OS_USER/.tmux.conf
126sudo chmod 644 /home/$OS_USER/.tmux.conf 123sudo chmod 644 /home/$OS_USER/.tmux.conf
127 124
128sudo scripts/fix_var_run.sh
129sudo cat scripts/opensim-crontab.txt | sudo crontab -u $OS_USER -
130echo "Done installing OpenSim." 125echo "Done installing OpenSim."
diff --git a/scripts/fix_var_run.sh b/scripts/fix_var_run.sh
deleted file mode 100755
index 97567cb..0000000
--- a/scripts/fix_var_run.sh
+++ /dev/null
@@ -1,6 +0,0 @@
1# Create the opensim run dir.
2mkdir -p /var/run/opensim
3chown opensim:opensim /var/run/opensim
4chmod ug+rwx /var/run/opensim
5chmod o-rwx /var/run/opensim
6chmod g+s /var/run/opensim