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