<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=Ogltree_Install_Instructions</id>
		<title>Ogltree Install Instructions - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=Ogltree_Install_Instructions"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=Ogltree_Install_Instructions&amp;action=history"/>
		<updated>2026-05-12T07:34:34Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/index.php?title=Ogltree_Install_Instructions&amp;diff=23546&amp;oldid=prev</id>
		<title>MakoBot: Removed 'Template:' prefix from template includings and/or changed external-link into internal-link</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=Ogltree_Install_Instructions&amp;diff=23546&amp;oldid=prev"/>
				<updated>2011-06-10T23:16:11Z</updated>
		
		<summary type="html">&lt;p&gt;Removed &amp;#039;Template:&amp;#039; prefix from template includings and/or changed external-link into internal-link&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:16, 10 June 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;__NOTOC__&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;__NOTOC__&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Template:&lt;/del&gt;Quicklinks}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{Quicklinks}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MakoBot</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=Ogltree_Install_Instructions&amp;diff=13344&amp;oldid=prev</id>
		<title>Ideia Boa at 23:44, 21 May 2009</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=Ogltree_Install_Instructions&amp;diff=13344&amp;oldid=prev"/>
				<updated>2009-05-21T23:44:24Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:44, 21 May 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;__NOTOC__&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{Template:Quicklinks}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;Instructions:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;Instructions:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;1.	Install expect and sudo packages&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;1.	Install expect and sudo packages&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ideia Boa</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=Ogltree_Install_Instructions&amp;diff=4714&amp;oldid=prev</id>
		<title>AFrisby: New page: &lt;pre&gt;Instructions: 1.	Install expect and sudo packages 	apt-get install expect 	apt-get install sudo 2.	Create a special user account with a password and using the bash shell. 	NOTE: repla...</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=Ogltree_Install_Instructions&amp;diff=4714&amp;oldid=prev"/>
				<updated>2008-02-29T18:40:41Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;lt;pre&amp;gt;Instructions: 1.	Install expect and sudo packages 	apt-get install expect 	apt-get install sudo 2.	Create a special user account with a password and using the bash shell. 	NOTE: repla...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;Instructions:&lt;br /&gt;
1.	Install expect and sudo packages&lt;br /&gt;
	apt-get install expect&lt;br /&gt;
	apt-get install sudo&lt;br /&gt;
2.	Create a special user account with a password and using the bash shell.&lt;br /&gt;
	NOTE: replace all occurrances (below) of &amp;lt;SPECIALUSER&amp;gt; and &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
		with the name of your special user and it's password.&lt;br /&gt;
3.	make a '/root/scripts' directory and install the following scripts in it:&lt;br /&gt;
	3.a	restartOpenSim&lt;br /&gt;
	3.b	expect.in&lt;br /&gt;
	3.c	LOS&lt;br /&gt;
	3.d	KOS&lt;br /&gt;
4.	create the '/home/OSimLogs' directory to contain the OpenSim logs.&lt;br /&gt;
5.	set up the crontab for root using the entry found below.&lt;br /&gt;
Addendum:&lt;br /&gt;
	I am working on using monit to monitor the OpenSim and automatically run /root/scripts/KOS&lt;br /&gt;
	whenever required. At the moment I have to login to the server as root and run 'KOS'&lt;br /&gt;
	manually when OpenSim hangs up.&lt;br /&gt;
Explanation:&lt;br /&gt;
	The cronjob makes sure that restartOpenSim is running. It attempts to start it every 10 minutes.&lt;br /&gt;
	The script itself goes to great lengths to ensure that only one instance of it actually runs.&lt;br /&gt;
	If it ever dies you will have to remove the file '/root/scripts/ROS.running' to allow a fresh&lt;br /&gt;
	instance of it to run.&lt;br /&gt;
	the restartOpenSim script will (if needed) start expect running the expect.in script.&lt;br /&gt;
	expect will spawn a login shell and login to the special user account. This will cause the&lt;br /&gt;
	execution of sudo to run LOS which in turn will launch OpenSim with logging to '/home/OSimLogs'&lt;br /&gt;
	directory. The log files will be date and time stamped.&lt;br /&gt;
------------  restartOpenSim script  ----------------------------------------------&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;/root/scripts/ROS.running&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	exit 0&lt;br /&gt;
fi&lt;br /&gt;
RES=`ps -ef |grep -i restartOpenSim |grep -v grep |grep bash |wc -l |awk '{print \$1}'`&lt;br /&gt;
if [ &amp;quot;$RES&amp;quot; -gt &amp;quot;3&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;RES=$RES aborting&amp;quot;&lt;br /&gt;
	exit 0&lt;br /&gt;
fi&lt;br /&gt;
echo 1 &amp;gt;/root/scripts/ROS.running&lt;br /&gt;
while [ 1 ]&lt;br /&gt;
do&lt;br /&gt;
	RES1=`ps -ef |grep &amp;quot;mono OpenSim.exe&amp;quot; |grep -v grep`&lt;br /&gt;
	if [ &amp;quot;$RES1&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		RES2=`who |grep &amp;lt;SPECIALUSER&amp;gt;`&lt;br /&gt;
		if [ &amp;quot;$RES2&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			RES3=`ps -ef |grep &amp;lt;SPECIALUSER&amp;gt; |grep -v grep`&lt;br /&gt;
			if [ &amp;quot;$RES3&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
			then&lt;br /&gt;
				echo &amp;quot;running LOS&amp;quot;&lt;br /&gt;
				expect -f /root/scripts/expect.in&lt;br /&gt;
				sleep 5&lt;br /&gt;
			fi&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
	sleep 10&lt;br /&gt;
done&lt;br /&gt;
------------  expect.in script  ----------------------------------------------&lt;br /&gt;
spawn login&lt;br /&gt;
expect Login:&lt;br /&gt;
send &amp;lt;SPECIALUSER\r&lt;br /&gt;
expect Password:&lt;br /&gt;
send &amp;lt;PASSWORD&amp;gt;\r&lt;br /&gt;
expect &amp;quot;by applicable law.&amp;quot;&lt;br /&gt;
wait 255&lt;br /&gt;
send exit&lt;br /&gt;
wait 500&lt;br /&gt;
------------  LOS script  ----------------------------------------------&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# LOS&lt;br /&gt;
RES=`tty`&lt;br /&gt;
DT=`date +%Y%m%d_%H%M`&lt;br /&gt;
echo &amp;quot;In LOS tty=$RES&amp;quot; &amp;gt;&amp;gt;/root/scripts/LOS.out&lt;br /&gt;
cd /root/opensim/bin; mono OpenSim.exe &amp;gt; /home/OSimLogs/OSimLog.$DT&lt;br /&gt;
------------  KOS script  ----------------------------------------------&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
MON=`ps -ef |grep &amp;quot;mono OpenSim&amp;quot; |grep -v grep |awk '{print \$2}'`&lt;br /&gt;
ULI=`ps -ef |grep &amp;lt;SPECIALUSER&amp;gt; |grep -v grep |grep bash |awk '{print \$2}'`&lt;br /&gt;
EXP=`ps -ef |grep expect |grep -v grep |awk '{print \$2}'`&lt;br /&gt;
if [ &amp;quot;$MON&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	kill -9 $MON&lt;br /&gt;
fi&lt;br /&gt;
if [ &amp;quot;$ULI&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	kill -9 $ULI&lt;br /&gt;
fi&lt;br /&gt;
if [ &amp;quot;$EXP&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	kill -9 $EXP&lt;br /&gt;
fi&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
---------  Excerpt from &amp;lt;SPECIALUSER&amp;gt;'s .bashrc  ----------------------&lt;br /&gt;
RES=`tty`&lt;br /&gt;
DT=`date`&lt;br /&gt;
echo &amp;quot;${DT}: Simmer logged in with tty = $RES&amp;quot; &amp;gt;&amp;gt;/home/Simmer/loginlog&lt;br /&gt;
sudo /root/scripts/LOS&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
---------------  /etc/sudoers file ------------------------------------&lt;br /&gt;
# /etc/sudoers&lt;br /&gt;
#&lt;br /&gt;
# This file MUST be edited with the 'visudo' command as root.&lt;br /&gt;
#&lt;br /&gt;
# See the man page for details on how to write a sudoers file.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
Defaults        env_reset&lt;br /&gt;
&lt;br /&gt;
# Host alias specification&lt;br /&gt;
&lt;br /&gt;
# User alias specification&lt;br /&gt;
User_Alias      OPENSIM=&amp;lt;SPECIALUSER&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Cmnd alias specification&lt;br /&gt;
Cmnd_Alias      OSIM = /root/scripts/LOS&lt;br /&gt;
&lt;br /&gt;
# User privilege specification&lt;br /&gt;
root    ALL=(ALL) ALL&lt;br /&gt;
OPENSIM         db4151109=NOPASSWD:OSIM&lt;br /&gt;
--------------------------------------------------------------------&lt;br /&gt;
---------------  root's crontab entry  -----------------------------&lt;br /&gt;
0,10,20,30,40,50 * * * * /root/scripts/restartOpenSim 2&amp;gt;&amp;gt;/root/scripts/restart.err &amp;gt;&amp;gt;/root/scripts/restart.out&lt;br /&gt;
--------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>AFrisby</name></author>	</entry>

	</feed>