aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/install_opensim.sh
diff options
context:
space:
mode:
authorDavid Walter Seikel2011-11-26 10:09:51 +1000
committerDavid Walter Seikel2011-11-26 10:09:51 +1000
commitebc84ad13f6d3f1911672b1a2d449d8cddf1ae2f (patch)
treeb25d5ce40da4019db2b7f1552eda19d91677365c /install_opensim.sh
downloadIGnoble-ebc84ad13f6d3f1911672b1a2d449d8cddf1ae2f.zip
IGnoble-ebc84ad13f6d3f1911672b1a2d449d8cddf1ae2f.tar.gz
IGnoble-ebc84ad13f6d3f1911672b1a2d449d8cddf1ae2f.tar.bz2
IGnoble-ebc84ad13f6d3f1911672b1a2d449d8cddf1ae2f.tar.xz
First commit.
Diffstat (limited to '')
-rwxr-xr-xinstall_opensim.sh90
1 files changed, 90 insertions, 0 deletions
diff --git a/install_opensim.sh b/install_opensim.sh
new file mode 100755
index 0000000..0c8c659
--- /dev/null
+++ b/install_opensim.sh
@@ -0,0 +1,90 @@
1#!/bin/bash
2
3if [ x$1 = x ]
4then
5 MYSQL_PASSWORD="OpenSimSucks"
6else
7 MYSQL_PASSWORD=$1
8fi
9USER=$(whoami)
10
11sudo apt-get install mysql-server screen mono-complete monit mc
12sudo /etc/init.d/mysql restart
13
14echo "Setting up mySQL"
15mysql -u root -p -h localhost << zzzzEOFzzz
16drop database opensim;
17create database opensim;
18drop user opensim;
19drop user 'opensim'@'localhost';
20FLUSH PRIVILEGES;
21create user opensim identified by '$MYSQL_PASSWORD';
22create user 'opensim'@'localhost' identified by '$MYSQL_PASSWORD';
23grant all on opensim.* to opensim;
24grant all on opensim.* to 'opensim'@'localhost';
25FLUSH PRIVILEGES;
26zzzzEOFzzz
27
28echo "Setting up OpenSim"
29sudo deluser opensim
30sudo adduser --system --shell /bin/false --group opensim
31sudo mkdir -p /var/log/opensim
32sudo chown opensim:opensim /var/log/opensim
33sudo chmod 777 /var/log/opensim
34sudo mkdir -p /var/run/opensim
35sudo chown opensim:opensim /var/run/opensim
36sudo chmod 777 /var/run/opensim
37sudo mkdir -p /opt/opensim
38sudo chown $USER:$USER /opt/opensim
39
40cd /opt/opensim
41wget https://github.com/downloads/infinitegrid/InfiniteGrid-Opensim/opensim-0.7.1.1-infinitegrid-03.tar.bz2
42tar xjf opensim-0.7.1.1-infinitegrid-03.tar.bz2
43ln -s opensim-0.7.1.1-infinitegrid-03 current
44mkdir -p config
45mkdir -p modules
46mkdir -p setup
47cp setup/opensim-crontab.txt config
48cat setup/opensim-crontab.txt | sudo crontab -u opensim -
49
50cd current/bin
51mv OpenSim.Forge.Currency.dll ../../modules/
52ln -s ../../modules/OpenSim.Forge.Currency.dll OpenSim.Forge.Currency.dll
53mv OpenSimSearch.Modules.dll ../../modules/
54ln -s ../../modules/OpenSimSearch.Modules.dll OpenSimSearch.Modules.dll
55mv NSLModules.Messaging.MuteList.dll ../../modules/
56ln -s ../../modules/NSLModules.Messaging.MuteList.dll NSLModules.Messaging.MuteList.dll
57mv OpenSimProfile.Modules.dll ../../modules/
58ln -s ../../modules/OpenSimProfile.Modules.dll OpenSimProfile.Modules.dll
59#sudo chown -R opensim:opensim ../../modules
60ln -s ../../config config
61
62cat > OpenSim.ConsoleClient.ini << zzzzEOFzzzz
63[Startup]
64 ; Set here or use the -user command-line switch
65 user = RestingUser
66
67 ; Set here or use the -host command-line switch
68 host = localhost
69
70 ; Set here or use the -port command-line switch
71 ; port = 9002
72
73 ; Set here or use the -pass command-line switch
74 ; Please be aware that this is not secure since the password is in the clear
75 ; we recommend the use of -pass wherever possible
76 pass = SecretRestingPLace
77zzzzEOFzzzz
78
79sed -i 's@<appender name="LogFileAppender" type="log4net.Appender.FileAppender">@<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">@' OpenSim.exe.config
80sed -i 's@; ConsoleUser = "Test"@ConsoleUser = "RestingUser"@' OpenSim.ini
81sed -i 's@; ConsolePass = "secret"@ConsolePass = "SecretRestingPlace"@' OpenSim.ini
82
83cd config-include/
84sed -i 's@Include-Storage = "config-include/storage/SQLiteStandalone.ini";@; Include-Storage = "config-include/storage/SQLiteStandalone.ini";@' GridCommon.ini
85sed -i 's@; StorageProvider = "OpenSim.Data.MySQL.dll"@StorageProvider = "OpenSim.Data.MySQL.dll"@' GridCommon.ini
86sed -i "s@; ConnectionString = \"Data Source=localhost;Database=opensim;User ID=opensim;Password=\*\*\*\*;\"@ConnectionString = \"Data Source=localhost;Database=opensim;User ID=opensim;Password=$MYSQL_PASSWORD;\"@" GridCommon.ini
87
88cd ../../..
89#sudo chown -R opensim:opensim opensim-0.7.1.1-infinitegrid-03
90