JSPWIKI VM #

Intro#

Description of the setup of the Ubuntu VM we have to run http://jspwiki.apache.org/wiki and http://jspwiki.apache.org/doc.
See INFRA-5588 for more background.

Findings#

  • no lvm installed, so just one fs, simple and easy:
root@jspwiki-vm:~# mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
.....snip.....
/dev/sda6 on /tmp type ext4 (rw)
root@jspwiki-vm:~# df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        28G  1.9G   25G   8% /
  • network:
metskem@jspwiki-vm:~$ ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:50:56:9d:00:19  
          inet addr:140.211.11.82  Bcast:140.211.11.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe9d:19/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:69671783 errors:0 dropped:9171 overruns:0 frame:0
          TX packets:23419837 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:16814561371 (16.8 GB)  TX bytes:1662666969 (1.6 GB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
root@jspwiki-vm:/opt# iptables -vnL
Chain INPUT (policy DROP 3697 packets, 301K bytes)
 pkts bytes target     prot opt in     out     source               destination         
  67M   16G fail2ban-ssh  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           
15701 1494K fail2ban-ssh  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22
  68M   16G ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED /* ASF IP tables enabled */
    0     0 ACCEPT     all  --  lo     *       127.0.0.1            0.0.0.0/0            /* Allow all loopback traffic */
   55  1804 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 8 state NEW,RELATED,ESTABLISHED /* Allow ICMP */
  801 47592 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 3442K packets, 196M bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain fail2ban-ssh (2 references)
 pkts bytes target     prot opt in     out     source               destination         
   18  1488 DROP       all  --  *      *       61.153.110.253       0.0.0.0/0           
   20  1564 DROP       all  --  *      *       123.30.143.150       0.0.0.0/0           
   21  3288 DROP       all  --  *      *       112.216.76.110       0.0.0.0/0           
   14   704 DROP       all  --  *      *       117.135.139.142      0.0.0.0/0           
   17  1640 DROP       all  --  *      *       58.59.176.61         0.0.0.0/0           
   23  2228 DROP       all  --  *      *       196.22.220.8         0.0.0.0/0           
   23  2228 DROP       all  --  *      *       200.146.120.122      0.0.0.0/0           
   28  1820 DROP       all  --  *      *       122.147.2.254        0.0.0.0/0           
  67M   16G RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain test (0 references)
 pkts bytes target     prot opt in     out     source               destination        
 

Important directories and files#

name purpose
/etc/init.d/tomcat1bootstrap script
/etc/init.d/tomcat2bootstrap script
/usr/local/tomcat1 tomcat home dir (symlink to ./apache-tomcat1-x.y.z)
/usr/local/tomcat2 tomcat home dir (symlink to ./apache-tomcat2-x.y.z)
/usr/local/tomcat1/logslog files tomcat1
/usr/local/tomcat2/logslog files tomcat2
/var/japwiki/wiki/pageswiki pages and attachments of wiki
/var/jspwiki/doc/pageswiki pages and attachments of doc

Extra installed packages#

  • openjdk-6-jre-headless (apt)
  • tomcat 7 or 8 ?

Todo#

  • install apache2 with mod_ajp
  • create user/group to run tomcats
  • install tomcat latest release, 2 instances
  • bootstrap scripts for tomcats
  • housekeeping (log cleaning) cron jobs
  • get the proper userdatabase.xml (start with empty one)
  • create the amdin group and put your self in