1. Log into silo. 

 2. Copy the archive:

cp /l/www/classes/a348/spr2013/software/apache-tomcat-7.0.35.tar.gz .

 3. Uncompress and unarchive the software: 

tar xvf apache-tomcat-7.0.35.tar.gz

 4. Go into the folder that was created: 

cd apache-tomcat-7.0.35/

 5. Go into the conf folder:

cd conf

 6. Move server.xml into a different file (rename it):

mv server.xml server.xml-old 

 7. Open server.xml

nano -w server.xml

 8. Place this in the empty window:

<Server port="52595" shutdown="SHUTDOWN">

  <GlobalNamingResources>
    <!-- Used by Manager webapp -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <Service name="Catalina">
    <Connector port="52594" />

    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase" />
      <Host name="localhost" appBase="webapps" />
    </Engine>

  </Service>
</Server>

Note: please put your own port numbers. For example Matt has:

[mrlonis@silo conf]$ cat server.xml
<Server port="60254" shutdown="SHUTDOWN">

  <GlobalNamingResources>
    <!-- Used by Manager webapp -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <Service name="Catalina">
    <Connector port="60253" />

    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase" />
      <Host name="localhost" appBase="webapps" />
    </Engine>

  </Service>
</Server>
[mrlonis@silo conf]$

 9. Open the ~/.bash_profile: 

nano -w ~/.bash_profile

10. Add this at the end of the file:

export EDITOR

JAVA_HOME=/usr/lib/jvm/java-1.8.0/
export JAVA_HOME

CATALINA_HOME=/u/mrlonis/apache-tomcat-7.0.35
export CATALINA_HOME

CLASSPATH=.:$CATALINA_HOME/lib/servlet-api.jar
export CLASSPATH

11. Save the file and source it (also export EDITOR is just a marker)

source ~/.bash_profile 

12. Start the server: 

$CATALINA_HOME/bin/startup.sh

13. Check online:

http://silo.cs.indiana.edu:60253/

(Use your own port.) 

14. Set up a page that represents you:

[mrlonis@silo conf]$ nano -w $CATALINA_HOME/webapps/ROOT/index.html
[mrlonis@silo conf]$ cat $CATALINA_HOME/webapps/ROOT/index.html
My name is Matt and I am a sinner: <p>

<img src="http://www.autumnbench.com/wp-content/uploads/2014/05/jesus-memes-autumnbench.com-2.jpg">
[mrlonis@silo conf]$

Take a moment to reflect on what you just did. 

--

Christian Kayl Levi Seth Jiebo Jerry Jared Matt Alex S Mike C
He He Arif Jiahao C Keqin Yinan (Max) Arthi Joe B Zhiwei David L
Sunghyun Alex Q Mr Hu Xing W Rerajitha Vanessa Siddartha Rajeev M
Kevin S Andrew R Andrew T Brandon P Chenrui Mr. Zhao 


http://www.breakingcatnews.com/