<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1874798069153261644</id><updated>2024-10-24T01:12:35.766-07:00</updated><category term="Apache Virtual Hosts"/><category term="DHCP Failover"/><category term="Heartbeat+Rsync"/><category term="LAMP JDK Web"/><category term="LPIC-2"/><category term="Mod_jk"/><category term="Tomcat 7.0.25"/><category term="UCARP UBUNTU 11.04"/><title type='text'>Valeriy Troshin&#39;s Blog</title><subtitle type='html'>Just some information regarding various aspects of configuring and administrating Unix/Linux</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1874798069153261644.post-3770315209807750273</id><published>2016-05-30T07:07:00.001-07:00</published><updated>2016-05-30T07:07:46.720-07:00</updated><title type='text'>Cisco UCS &quot;There are not enough resources overall server unavailable&quot; Error Message</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If you see this message after applying changes in UCS such as assigning a new VLAN to a server profile template, check if the server blade is assigned to a specific pool. In UCS Manager go to &quot;Servers&quot; tab and navigate to &quot;Pools&quot; and &quot;Root&quot;. Check if a server is there. If not, right click on &quot;Server Pools&quot; and add it to the pool.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgifmcKTlAPI_8nhCPFU-c1eQRRtei7n1IPnvuLCo0awHo5zZryP59rq5ASZ0cORV1cSEn0sbjOPCVWpNw7eK1oCuPjj6Fyx5Pb5-6r-rhHUs_C90otTOFtsZj6r05RZHxXYm4fWC7Rk30/s1600/UCS+No+Resources+Overall.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgifmcKTlAPI_8nhCPFU-c1eQRRtei7n1IPnvuLCo0awHo5zZryP59rq5ASZ0cORV1cSEn0sbjOPCVWpNw7eK1oCuPjj6Fyx5Pb5-6r-rhHUs_C90otTOFtsZj6r05RZHxXYm4fWC7Rk30/s1600/UCS+No+Resources+Overall.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/3770315209807750273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valeriytroshin.blogspot.com/2016/05/cisco-ucs-there-are-not-enough.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/3770315209807750273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/3770315209807750273'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/2016/05/cisco-ucs-there-are-not-enough.html' title='Cisco UCS &quot;There are not enough resources overall server unavailable&quot; Error Message'/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgifmcKTlAPI_8nhCPFU-c1eQRRtei7n1IPnvuLCo0awHo5zZryP59rq5ASZ0cORV1cSEn0sbjOPCVWpNw7eK1oCuPjj6Fyx5Pb5-6r-rhHUs_C90otTOFtsZj6r05RZHxXYm4fWC7Rk30/s72-c/UCS+No+Resources+Overall.JPG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1874798069153261644.post-2911364283177803515</id><published>2011-11-30T19:03:00.000-08:00</published><updated>2011-11-30T19:14:43.878-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LPIC-2"/><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I have not been posted for some time as I was busy preparing for Linux certification.&lt;br /&gt;
So, I just obtained Comptia Linux+, LPIC level 1 and 2 certificates few days ago.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/2911364283177803515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valeriytroshin.blogspot.com/2011/11/i-have-not-been-posted-for-some-time-as.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/2911364283177803515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/2911364283177803515'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/2011/11/i-have-not-been-posted-for-some-time-as.html' title=''/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1874798069153261644.post-3861810991092672813</id><published>2011-10-14T13:14:00.000-07:00</published><updated>2011-10-14T13:22:23.901-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DHCP Failover"/><title type='text'>DHCP Failover Configuration</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;1. Install DHCP server on nodes:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;&lt;b&gt;root@node1:~# apt-get install dhcp3-server
root@node2:~# apt-get install dhcp3-server&lt;/b&gt;

2. &lt;b&gt;Important.&lt;/b&gt; Synchronize time on both nodes using NTP service.

3. We need to configure a config which should be identical 
   on both machines. 
   It will describe fail-over peer and range of IP addresses, 
   as well as other information as described below.
   Create it in &lt;b&gt;/etc/dhcp/&lt;/b&gt; and name as general or common, 
   or master. Do not forget to change dhcpd.conf include accordingly
   (see below).
&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;code&quot;&gt;&lt;b&gt;&lt;b&gt;root@node1:~#&lt;/b&gt;&lt;/b&gt; &lt;b&gt;vim&lt;/b&gt; &lt;b&gt;&lt;b&gt;/etc/dhcp/&lt;/b&gt;dhcpd.general&lt;/b&gt;
&lt;b&gt;&lt;b&gt;root@node2:~#&lt;/b&gt;&lt;/b&gt; &lt;b&gt;vim&lt;/b&gt; &lt;b&gt;&lt;b&gt;/etc/dhcp/&lt;/b&gt;dhcpd.general&lt;/b&gt;

4. Paste in each of them and change according to your needs:

ddns-update-style none;&lt;/pre&gt;&lt;pre class=&quot;code&quot;&gt;log-facility local7;&lt;/pre&gt;&lt;pre class=&quot;code&quot;&gt;subnet 192.168.2.0 netmask 255.255.255.0 {
  pool {
    failover peer &quot;dhcp&quot;;
    range 192.168.1.100 192.168.1.200;
  }
  option routers 192.168.1.254;
  option subnet-mask 255.255.255.0;
# option broadcast-address 192.168.1.255;
  option domain-name &quot;your domain&quot;;
  option domain-name-servers 192.168.1.1, 192.168.1.2;
# option ntp-servers 192.168.1.1, 192.168.1.2;
# option netbios-node-type 8;

  default-lease-time 600;
  max-lease-time 7200;

5. Configure dhcpd.conf for each node:

5.1. First node: 
   
&lt;b&gt;&lt;b&gt;root@node1:~#&lt;/b&gt;&lt;/b&gt; &lt;b&gt;vim&lt;/b&gt; &lt;b&gt;&lt;b&gt;/etc/dhcp/&lt;/b&gt;dhcpd.conf&lt;/b&gt;
  failover peer &quot;dhcp&quot; {
  primary;
  address 192.168.1.1;
  port 519;
  peer address 192.168.1.2;
  peer port 520;
  max-response-delay 60;
  max-unacked-updates 10;
  mclt 600;
  split 128;
  load balance max seconds 3;
}
include &quot;/etc/dhcp/&lt;b&gt;dhcpd.general&lt;/b&gt;&quot;;

5.2. Second node: 
   
&lt;b&gt;&lt;b&gt;root@node2:~#&lt;/b&gt;&lt;/b&gt; &lt;b&gt;vim&lt;/b&gt; &lt;b&gt;&lt;b&gt;/etc/dhcp/&lt;/b&gt;dhcpd.conf&lt;/b&gt;
  failover peer &quot;dhcp&quot; {
  primary;
  address 192.168.1.2;
  port 520;
  peer address 192.168.1.1;
  peer port 519;
  max-response-delay 60;
  max-unacked-updates 10;
  mclt 600;
  split 128;
  load balance max seconds 3;
}
include &quot;/etc/dhcp/&lt;b&gt;dhcpd.general&lt;/b&gt;&quot;;

6. Testing

&lt;b&gt;root@node1:~# cat /var/lib/dhcp/dhcpd.leases&lt;/b&gt;
&lt;b&gt;root@node2:~# cat /var/lib/dhcp/dhcpd.leases&lt;/b&gt;


&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/3861810991092672813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valeriytroshin.blogspot.com/2011/10/dhcp-failover-configuration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/3861810991092672813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/3861810991092672813'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/2011/10/dhcp-failover-configuration.html' title='DHCP Failover Configuration'/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1874798069153261644.post-4052913803329864419</id><published>2011-09-21T17:15:00.000-07:00</published><updated>2011-11-11T17:00:27.680-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Heartbeat+Rsync"/><title type='text'>Implementing Failover Redundancy in Ubuntu 11.10 with Heartbeat + Rsync</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;br /&gt;
1. Install Heartbeat on both hosts: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# apt-get install heartbeat&lt;br /&gt;
[root@host2 ~]# apt-get install heartbeat&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;2. Rsync can be used to synchronize any file/directory for any service, &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; however in this example we will use Apache service:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# apt-get install rsync&lt;br /&gt;
[root@host2 ~]# apt-get install rsync&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;3. Check fully qualified domain names (fqdn) on host 1 and host2:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# uname –n&lt;br /&gt;
[root@host2 ~]# uname –n&lt;/b&gt;&lt;br /&gt;
In my case host names (fqdn): host1.corp.un&lt;br /&gt;
Second Machine name (fqdn): host2.corp.un&lt;br /&gt;
IP Address of host1: 192.168.1.130&lt;br /&gt;
IP Address of host2: 192.168.1.131&lt;br /&gt;
Default Gateway of both hosts: 192.168.1.1&lt;br /&gt;
DNS Server: 192.168.1.1&lt;br /&gt;
DNS Server: 192.168.1.2 &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;4. Make sure that you have httpd installed:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;service apache2 status&lt;br /&gt;
&lt;br /&gt;
You should see the following:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Apache2 is running (pid xxxx).&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Where xxxx is the PID number.&lt;br /&gt;
&lt;br /&gt;
5. Configure network settings for both nodes and check by pinging and resolving hostnames. &lt;br /&gt;
&lt;br /&gt;
5.1. For host1:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# cat /etc/network/interfaces &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
# The primary network interface&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; address&amp;nbsp;&amp;nbsp; 192.168.1.130&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; netmask&amp;nbsp;&amp;nbsp; 255.255.255.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; network&amp;nbsp;&amp;nbsp; 192.168.1.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; broadcast 192.168.1.255&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gateway&amp;nbsp;&amp;nbsp; 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# cat /etc/resolv.conf&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
domain corp1.un&lt;br /&gt;
nameserver 192.168.1.1&lt;br /&gt;
nameserver 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
[root@host1 ~]# cat /etc/hosts&lt;br /&gt;
&lt;br /&gt;
127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localhost&lt;br /&gt;
192.168.1.130&amp;nbsp;&amp;nbsp;&amp;nbsp; host1.corp.un host1&lt;br /&gt;
192.168.1.131&amp;nbsp;&amp;nbsp;&amp;nbsp; host2.corp.un host2&lt;br /&gt;
&lt;br /&gt;
5.2. For host2: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host2 ~]# cat /etc/network/interfaces &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
# The primary network interface&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; address&amp;nbsp;&amp;nbsp; 192.168.1.131&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; netmask&amp;nbsp;&amp;nbsp; 255.255.255.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; network&amp;nbsp;&amp;nbsp; 192.168.1.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; broadcast 192.168.1.255&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gateway&amp;nbsp;&amp;nbsp; 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host2 ~]# cat /etc/resolv.conf&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
domain corp1.un&lt;br /&gt;
nameserver 192.168.1.1&lt;br /&gt;
nameserver 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host2 ~]# cat /etc/hosts&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localhost&lt;br /&gt;
192.168.1.130&amp;nbsp;&amp;nbsp;&amp;nbsp; host1.corp.un host1&lt;br /&gt;
192.168.1.131&amp;nbsp;&amp;nbsp;&amp;nbsp; host2.corp.un host2&lt;br /&gt;
&lt;br /&gt;
6. Configuring Heartbeat on both computers&lt;br /&gt;
Heartbeat has three main configuration files:&lt;br /&gt;
&lt;br /&gt;
/etc/ha.d/authkeys&lt;br /&gt;
/etc/ha.d/ha.cf&lt;br /&gt;
/etc/ha.d/haresources &lt;br /&gt;
&lt;br /&gt;
6.1. Configuring /etc/ha.d/authkeys File&lt;br /&gt;
&lt;br /&gt;
The authkeys file must be owned by root and be chmod 600. &lt;br /&gt;
The actual format of the authkeys file is two-lines simple format. &lt;br /&gt;
There is an auth directive with an associated method ID number, &lt;br /&gt;
and there is a line that has the authentication method and &lt;br /&gt;
the key that go with the ID number of the &lt;br /&gt;
auth directive. There are three supported authentication methods: &lt;br /&gt;
&lt;br /&gt;
crc, md5 and sha1.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# vim /etc/ha.d/authkeys&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Add the following :&lt;br /&gt;
&lt;br /&gt;
auth 1&lt;br /&gt;
&lt;br /&gt;
1 sha1 ThisIsALongPasswordForSecurityReasons&lt;br /&gt;
&lt;br /&gt;
And change the permission of the authkeys file:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# chmod 600 /etc/ha.d/authkeys&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
6.2. Configuring /etc/ha.d/ha.cf File&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/ha.d/ha.cf file in your favorite text editor:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# vim /etc/ha.d/ha.cf&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Add the following lines in the ha.cf file:&lt;br /&gt;
&lt;br /&gt;
Configuration 1 (taken from Linux Journal with some changes)&lt;br /&gt;
&lt;br /&gt;
keepalive 1&lt;br /&gt;
deadtime 10&lt;br /&gt;
initdead 120&lt;br /&gt;
warntime 5&lt;br /&gt;
udpport 694&lt;br /&gt;
# host1 heartbeat ip address is 192.168.1.130&lt;br /&gt;
# host2 heartbeat ip address is 192.168.1.131&lt;br /&gt;
# For simple two-server clusters, ucast or bcast can be used&lt;br /&gt;
ucast eth0 192.168.1.130&lt;br /&gt;
# bcast eth0&lt;br /&gt;
# serial /dev/ttyS1&lt;br /&gt;
# baud 19200&lt;br /&gt;
auto_failback off&lt;br /&gt;
stonith_host host1 wti_nps ares.example.com erisIsTheKey&lt;br /&gt;
stonith_host host2 wti_nps ares.example.com erisIsTheKey&lt;br /&gt;
# The following names must match the output of uname -n&lt;br /&gt;
node host1&lt;br /&gt;
node host2&lt;br /&gt;
use_logd yes&lt;br /&gt;
# logfile /var/log/ha-log&lt;br /&gt;
# logfacility local0&lt;br /&gt;
&lt;br /&gt;
We can use, however, an example from usr/share/doc/heartbeat/ &lt;br /&gt;
and adjust it according our needs: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;zless /usr/share/doc/heartbeat/ha.cf.gz&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
6.3. Configuring /etc/ha.d/haresources File&lt;br /&gt;
&lt;br /&gt;
This file contains the information about resources which we want to make highly available.&lt;br /&gt;
All services that we want Heartbeat to manage must be removed from the system init &lt;br /&gt;
for all init levels.&lt;br /&gt;
&lt;br /&gt;
The command to accomplish this task is: &lt;br /&gt;
&lt;b&gt;[root@host1 ~]#&amp;nbsp; /usr/sbin/update-rc.d -f &amp;lt;service_name&amp;gt; remove&lt;br /&gt;
[root@host2 ~]#&amp;nbsp; /usr/sbin/update-rc.d -f &amp;lt;service_name&amp;gt; remove&lt;br /&gt;
[root@host1 ~]#&amp;nbsp; vim /etc/ha.d/haresources&lt;/b&gt;&lt;br /&gt;
For minimalistic configuration add the following lines:&lt;br /&gt;
&lt;br /&gt;
host1.corp.un IPaddr::192.168.1.132/24/eth0 apache2&lt;br /&gt;
This will assign a virtual ip address to the eth0 which can be verified by &lt;br /&gt;
ifconfig command:&lt;br /&gt;
eth0:0&amp;nbsp;&amp;nbsp;&amp;nbsp; Link encap:Ethernet&amp;nbsp; HWaddr 06:00:27:1e:07:db&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet addr:192.168.1.132&amp;nbsp; Bcast:192.168.1.255&amp;nbsp; Mask:255.255.255.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UP BROADCAST RUNNING MULTICAST&amp;nbsp; MTU:1500&amp;nbsp; Metric:1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
6.4. Copy the /etc/ha.d/ directory from host1 to host2:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~] scp -r /etc/ha.d/ root@host2:/etc/&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
7. Configuring rsycn&lt;br /&gt;
&lt;br /&gt;
For synchronization of the content we will use rsync package which by default is installed in &lt;br /&gt;
&lt;br /&gt;
/usr/bin/rsync:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~] crontab -e&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
*/1 * * * * /usr/bin/rsync -avz --perms --delete --links -e ssh /var/www/ &lt;br /&gt;
&lt;br /&gt;
host2:/var/www/&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host2 ~] crontab -e&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
*/1 * * * * /usr/bin/rsync -avz --perms --delete --links -e ssh /var/www/ &lt;br /&gt;
&lt;br /&gt;
host1:/var/www/&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
*/1 Check directories every minute and if there any changes, &lt;br /&gt;
&lt;br /&gt;
perform transfer the changed files/directories.&lt;br /&gt;
/usr/bin/rysnc start rsync&lt;br /&gt;
-a archive &lt;br /&gt;
-v verbosity&lt;br /&gt;
-z perform compression &lt;br /&gt;
--perms means retain the original permissions&lt;br /&gt;
--delete delete extra files from host2 which are not found on node1&lt;br /&gt;
--links copy the symbolic links as it is.&lt;br /&gt;
-e define rsh command, in our case it is ssh&lt;br /&gt;
&lt;br /&gt;
8. Starting Services and Testing&lt;br /&gt;
&lt;br /&gt;
8.1. Start heartbeat:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# /etc/init.d/heartbeat start&lt;br /&gt;
[root@host2 ~]# /etc/init.d/heartbeat start&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The following will be observed:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Starting High-Availability services: IPaddr[xxxx]: INFO:&amp;nbsp; Resource is stopped&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Done.&lt;br /&gt;
&lt;br /&gt;
8.2. Open an SSH terminal on each cluster member and type:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# tail -f /var/log/syslog&lt;br /&gt;
[root@host1 ~]# tail -f /var/log/ha-debug&lt;br /&gt;
[root@host1 ~]# tail -f /var/log/ha-log&lt;br /&gt;
[root@host1~]#&amp;nbsp; cl_status nodestatus host1.corp.un&lt;br /&gt;
[root@host2 ~]# tail -f /var/log/syslog&lt;br /&gt;
[root@host2 ~]# tail -f /var/log/ha-debug&lt;br /&gt;
[root@host2 ~]# tail -f /var/log/ha-log &lt;br /&gt;
[root@host2~]#&amp;nbsp; cl_status nodestatus host2.corp.un&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Observe if there are any problems.&lt;br /&gt;
&lt;br /&gt;
8.3. Configuring Apache2&lt;br /&gt;
&lt;br /&gt;
Create the file index.html on both nodes:&lt;br /&gt;
On host1:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# echo &quot;host1 apache test&quot; &amp;gt; /var/www/html/index.html&lt;/b&gt;&lt;br /&gt;
On host2:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host2 ~]# echo &quot;host1 apache test&quot; &amp;gt; /var/www/html/index.html&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Open web-browser and type in the URL: http://192.168.1.132&lt;br /&gt;
It will show host1 apache test.&lt;br /&gt;
Stop the heartbeat daemon on host1:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# service heartbeat stop&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In the browser type in the URL http://192.168.1.132 and press Enter.&lt;br /&gt;
It will show host2 apache test.&lt;br /&gt;
Bring the node back by issuing the command:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host1 ~]# service heartbeat start&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Now stop the heartbeat daemon on host2:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host2 ~]# service heartbeat stop&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In the browser type in the URL http://192.168.1.132 and press Enter.&lt;br /&gt;
It will show host1 apache test.&lt;br /&gt;
Bring the node back by issuing the command:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[root@host2 ~]# service heartbeat start&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
A virtual network interface and the associated IP address (192.168.1.132) is created by Heartbeat, &lt;br /&gt;
no manual configuration is required. &lt;br /&gt;
Also all services placed in /etc/ha.d/haresources file will start automatically.&lt;br /&gt;
Don&#39;t use the IP addresses 192.168.1.130 and 192.168.1.131 for services. &lt;br /&gt;
These addresses are used by heartbeat for communication between host1 and host2. &lt;br /&gt;
If used for virtual addressing, it will cause disturbance and heartbeat and will not work properly.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-CA&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;Useful links:&lt;br /&gt;
&lt;a href=&quot;http://www.howtoforge.com/high_availability_heartbeat_centos&quot;&gt;Configuring A High Availability Cluster (Heartbeat) On CentOS&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/4052913803329864419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valeriytroshin.blogspot.com/2011/09/implementing-failover-redundancy-in.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/4052913803329864419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/4052913803329864419'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/2011/09/implementing-failover-redundancy-in.html' title='Implementing Failover Redundancy in Ubuntu 11.10 with Heartbeat + Rsync'/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1874798069153261644.post-4328397813804866126</id><published>2011-08-27T17:02:00.000-07:00</published><updated>2011-11-03T08:32:07.658-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="UCARP UBUNTU 11.04"/><title type='text'>Failover Redundancy in Ubuntu 11.10 with CARP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;pre&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt;&quot;&gt;Failover Redundancy in Ubuntu 11.10&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;1. Install ucarp:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;root@master:~# apt-get install ucarp&lt;br /&gt;
root@slave:~#&amp;nbsp;&amp;nbsp;&amp;nbsp; apt-get install ucarp&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. For the primary (master) host change /etc/network/interfaces as follows:&lt;br /&gt;
&lt;br /&gt;
# This file describes the network interfaces available on your system&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;# and how to activate them. For more information, see interfaces(5). &lt;br /&gt;
&lt;br /&gt;
# The loopback network interface &lt;br /&gt;
&lt;br /&gt;
auto lo&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;iface lo inet loopback &lt;br /&gt;
&lt;br /&gt;
# The primary network interface &lt;br /&gt;
&lt;br /&gt;
auto eth0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;iface eth0 inet static &lt;br /&gt;
&lt;br /&gt;
address   192.168.1.130&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;netmask   255.255.255.0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;network   192.168.1.0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;broadcast 192.168.1.255&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;gateway   192.168.1.1 &lt;br /&gt;
&lt;br /&gt;
# The secondary network interface &lt;br /&gt;
&lt;br /&gt;
auto eth1&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;iface eth1 inet static&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;address   192.168.2.1&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;netmask   255.255.255.0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;network   192.168.2.0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;broadcast 192.168.2.255 &lt;br /&gt;
&lt;br /&gt;
ucarp-vid 1&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-vip 192.168.2.254&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-password secret&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-advskew 14&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-advbase 1&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-facility local1&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-master yes&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-upscript /usr/share/ucarp/vip-up&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-downscript /usr/share/ucarp/vip-down &lt;br /&gt;
&lt;br /&gt;
iface eth1:ucarp inet static&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;address 192.168.2.254&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
3.  For the secondary (slave) host change /etc/network/interfaces as follows:&lt;br /&gt;
&lt;br /&gt;
# This file describes the network interfaces available on your system&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;# and how to activate them. For more information, see interfaces(5). &lt;br /&gt;
&lt;br /&gt;
# The loopback network interface &lt;br /&gt;
&lt;br /&gt;
auto lo&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;iface lo inet loopback &lt;br /&gt;
&lt;br /&gt;
# The primary network interface &lt;br /&gt;
&lt;br /&gt;
auto eth0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;iface eth0 inet static &lt;br /&gt;
&lt;br /&gt;
address   192.168.1.130&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;netmask   255.255.255.0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;network   192.168.1.0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;broadcast 192.168.1.255&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;gateway   192.168.1.1 &lt;br /&gt;
&lt;br /&gt;
# The secondary network interface &lt;br /&gt;
&lt;br /&gt;
auto eth1&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;iface eth1 inet static &lt;br /&gt;
&lt;br /&gt;
address   192.168.2.2&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;netmask   255.255.255.0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;network   192.168.2.0&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;broadcast 192.168.2.255 &lt;br /&gt;
&lt;br /&gt;
ucarp-vid 1&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-vip 192.168.2.254&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-password secret&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-advskew 14&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-advbase 1&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-facility local1&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-master no&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-upscript /usr/share/ucarp/vip-up&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;ucarp-downscript /usr/share/ucarp/vip-down &lt;br /&gt;
&lt;br /&gt;
iface eth1:ucarp inet static &lt;br /&gt;
&lt;br /&gt;
address 192.168.2.254&amp;nbsp;&lt;/div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;netmask 255.255.255.0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt; 4. Add to the /etc/rc.local:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;b style=&quot;font-family: inherit;&quot;&gt;root@master:~# ucarp -i eth1 -s 192.168.2.1 -v 1 -p secret -a 192.168.2.254 -u /etc/vip-up.sh -d /etc/vip-down.sh -z -B&lt;br /&gt;
&lt;br /&gt;
root@slave:~# ucarp -i eth1 -s 192.168.2.2 -v 1 -p secret -a 192.168.2.254 -u /etc/vip-up.sh -d /etc/vip-down.sh -z -B&lt;/b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;5. To check if works correctly check ip addresses on the interfaces on both hosts:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: inherit;&quot;&gt;ip addr show&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The virtual ip assigned to the ucarp interface should be seen only on the master host.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Ping the virtual ip to check if it is reachable.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Shutdown the master and observe that the slave takes over and virtual ip now can be seen.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Again, ping the virtual ip.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/4328397813804866126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/carp-failover-redundancy-in-ubuntu-1104.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/4328397813804866126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/4328397813804866126'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/carp-failover-redundancy-in-ubuntu-1104.html' title='Failover Redundancy in Ubuntu 11.10 with CARP'/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1874798069153261644.post-2037361567025272343</id><published>2011-08-27T16:06:00.000-07:00</published><updated>2011-08-27T16:20:45.674-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Virtual Hosts"/><title type='text'>Installing Virtual Hosts on Apache2 Webserver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;MsoListParagraph&quot; style=&quot;line-height: normal; margin-bottom: 12.0pt; margin-left: 25.1pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt;&quot;&gt;&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt;&quot;&gt;Installing Virtual Hosts on Apache2&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;1. Create a folder for the domain: &lt;br /&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;mkdir -p /usr/share/tomcat/webapps/example&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; margin-bottom: 6pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;2. Within the &lt;i&gt;&lt;b&gt;/etc/apache2/sites-available/&lt;/b&gt;&lt;/i&gt; folder create unique files for each of domains. For example, a file called “example” in that directory: &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo nano /etc/apache2/sites-available/example&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;3. Copy content of default site to the newly created file:&lt;br /&gt;
&lt;b&gt;sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/example &lt;br /&gt;
&lt;/b&gt;(directories for Apache and Tomcat can be placed in a convenient place, however must be the same. For Tomcat server root folder for applications is &lt;b&gt;webapps&lt;/b&gt;)&lt;b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/b&gt;4. Adjust document roots as necessary and&lt;b&gt; &lt;/b&gt;append to the file the following: &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;ServerName &lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;code&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot;&gt;(name of the host)&lt;/span&gt;&lt;/i&gt;&lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;
JkMount /jsp/* worker1&lt;br /&gt;
JkMount /jsp worker1&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;b style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;#JkAutoAlias /usr/share/tomcat7/webapps/examples&lt;/span&gt;/&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;
(appends requests for resources after webapps)&lt;/span&gt;&lt;/i&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;5. Enable &lt;b&gt;mod_rewrite&lt;/b&gt; in Apache2:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot;&gt;sudo a2enmod rewrite&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;font-size: small;&quot;&gt;6. Now enable the site:&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo a2ensite example&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;font-size: small;&quot;&gt;This site is now available (as in configured) and enabled (as in listening) once the Apache service is restarted: &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;FR-CA&quot;&gt;sudo /etc/init.d/apache2 reload&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;FR-CA&quot;&gt;sudo /etc/init.d/apache2 reload&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;FR-CA&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;FR-CA&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;sudo /etc/init.d/tomcat7 restart&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;span lang=&quot;FR-CA&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt;&quot;&gt;Testing&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;font-size: small;&quot;&gt;7. To test your configuration you can, temporarily, configure the &lt;i&gt;&lt;b&gt;/etc/hosts&lt;/b&gt;&lt;/i&gt; file to point the domain to your IP address and see if your server loads up the correct site. This is only needed if the hostname or domain name does not already resolve to your IP address. Editing the &lt;i&gt;&lt;b&gt;/etc/hosts&lt;/b&gt;&lt;/i&gt; by adding the following line:&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot;&gt;ip.address domain.tld &lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;code&gt;&lt;i&gt;&lt;span lang=&quot;EN-CA&quot;&gt;(For instance 67.207.131.28 example.com)&lt;/span&gt;&lt;/i&gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;i&gt;&lt;span lang=&quot;EN-CA&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;8. Open a browser, try to access &lt;b&gt;http://example&lt;/b&gt; and see if it loads the contents from the local DocumentRoot (from the configuration above). You might want to drop a file in the DocumentRoot to verify its pulling your local content:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo mv /var/www/index.html /usr/share/tomcat/webapps/examples/&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;9. Check PHP libraries:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo cp /var/www/test.php /usr/share/tomcat/webapps/examples/ &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;or&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;
sudo nano /usr/share/tomcat/examples/test.php&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;font-size: small;&quot;&gt;Write in it the only line:&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;lt;?php phpinfo(); ?&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line874&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt;10. Point the web browser to &lt;b&gt;http://&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;example&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;/test.php&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: small;&quot;&gt; and observe server’s &lt;b&gt;phpinfo&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/2037361567025272343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/installing-virtual-hosts-on-apache2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/2037361567025272343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/2037361567025272343'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/installing-virtual-hosts-on-apache2.html' title='Installing Virtual Hosts on Apache2 Webserver'/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1874798069153261644.post-8130705837801269319</id><published>2011-08-22T18:24:00.000-07:00</published><updated>2012-02-17T19:01:04.879-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mod_jk"/><title type='text'>Connecting Tomcat 7.0.25 with Apache 2 (mod_jk)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt; line-height: 115%;&quot;&gt;Connecting Tomcat 7 with Apache2 (mod_jk) &lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1. Install Connector&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: inherit; line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo apt-get install libapache2-mod-jk&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Create a file &lt;b&gt;worker.properties&lt;/b&gt; in Tomcat directory &lt;b&gt;/ usr/share/tomcat7/conf/workers.properties &lt;/b&gt;: &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo nano &lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;/ usr/share/tomcat7/conf/workers.properties &lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;code&gt;&lt;span lang=&quot;EN-US&quot;&gt;And add the following lines:&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: none repeat scroll 0% 0% white;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;# workers.properties&lt;br /&gt;
# --------------------------------------------------------------------------&lt;br /&gt;
# File:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; workers.properties&lt;br /&gt;
#&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;# Purpose:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AJP Bridge for Apache/Tomcat&lt;br /&gt;
#&lt;br /&gt;
# Location:&amp;nbsp;&amp;nbsp;&amp;nbsp; $TOMCAT_HOME/conf&lt;br /&gt;
#&lt;br /&gt;
# Certified:&amp;nbsp;&amp;nbsp; Ubuntu 11.04 / Apache 2.2.17/ Tomcat 7.0 / JDK-1.7.0&lt;br /&gt;
#&lt;br /&gt;
# Note:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This file should be appended or included into jk.load&lt;br /&gt;
# --------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# This file provides jk derived plugins with the needed information to&lt;br /&gt;
# connect to the different tomcat workers.&amp;nbsp; Note that the distributed&lt;br /&gt;
# version of this file requires modification before it is usable by a&lt;br /&gt;
# plugin.&lt;br /&gt;
#&lt;br /&gt;
# As a general note, the characters $( and ) are used internally to define&lt;br /&gt;
# macros. Do not use them in your own configuration!!!&lt;br /&gt;
#&lt;br /&gt;
# Whenever you see a set of lines such as:&lt;br /&gt;
# x=value&lt;br /&gt;
# y=$(x)\something&lt;br /&gt;
#&lt;br /&gt;
# the final value for y will be value\something&lt;br /&gt;
#&lt;br /&gt;
# Normaly all you will need to do is un-comment and modify the first three&lt;br /&gt;
# properties, i.e. workers.tomcat_home, workers.java_home and ps.&lt;br /&gt;
# Most of the configuration is derived from these.&lt;br /&gt;
#&lt;br /&gt;
# When you are done updating workers.tomcat_home, workers.java_home and ps&lt;br /&gt;
# you should have 3 workers configured:&lt;br /&gt;
#&lt;br /&gt;
# - An ajp13 worker that connects to localhost:8009&lt;br /&gt;
# - A jni inprocess worker.&lt;br /&gt;
# - A load balancer worker&lt;br /&gt;
#&lt;br /&gt;
# However by default the plugins will only use the ajp13 worker. To have&lt;br /&gt;
# the plugins use other workers you should modify the worker.list property.&lt;br /&gt;
#&lt;br /&gt;
# OPTIONS ( very important for jni mode )&lt;br /&gt;
#&lt;br /&gt;
# workers.tomcat_home should point to the location where you&lt;br /&gt;
# installed tomcat. This is where you have your conf, webapps and lib&lt;br /&gt;
# directories.&lt;br /&gt;
#&lt;br /&gt;
workers.tomcat_home=$CATALINA_HOME&lt;br /&gt;
#&lt;br /&gt;
# workers.java_home should point to your Java installation. Normally&lt;br /&gt;
# you should have a bin and lib directories beneath it.&lt;br /&gt;
#&lt;br /&gt;
workers.java_home=$JAVA_HOME&lt;br /&gt;
#&lt;br /&gt;
# You should configure your environment slash... ps=\ on NT and / on UNIX&lt;br /&gt;
# and maybe something different elsewhere.&lt;br /&gt;
#&lt;br /&gt;
ps=/&lt;br /&gt;
#&lt;br /&gt;
#------ ADVANCED MODE ------------------------------------------------&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
#------ DEFAULT worket list ------------------------------------------&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# The workers that your plugins should create and work with&lt;br /&gt;
#&lt;br /&gt;
worker.list=worker1,worker2,worker3&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#------ DEFAULT WORKER DEFINITION ------------------------------------&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# Defining a worker named worker1 and of type ajp13&lt;br /&gt;
# Note that the name and the type do not have to match.&lt;br /&gt;
#&lt;br /&gt;
worker.worker1.port=8009&lt;br /&gt;
worker.worker1.host=localhost&lt;br /&gt;
worker.worker1.type=ajp13&lt;br /&gt;
#&lt;br /&gt;
# Specifies the load balance factor when used with&lt;br /&gt;
# a load balancing worker.&lt;br /&gt;
# Note:&lt;br /&gt;
#&amp;nbsp; ----&amp;gt; lbfactor must be &amp;gt; 0&lt;br /&gt;
#&amp;nbsp; ----&amp;gt; Low lbfactor means less work done by the worker.&lt;br /&gt;
worker.worker1.lbfactor=1&lt;br /&gt;
#&lt;br /&gt;
# Specify the size of the open connection cache.&lt;br /&gt;
#worker.worker1.cachesize&lt;br /&gt;
#&lt;br /&gt;
#------ OTHER WORKERS DEFINITION ------------------------------------&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
worker.worker2.port=8109&lt;br /&gt;
worker.worker2.host=localhost&lt;br /&gt;
worker.worker2.type=ajp13&lt;br /&gt;
#&lt;br /&gt;
# Specifies the load balance factor when used with&lt;br /&gt;
# a load balancing worker.&lt;br /&gt;
# Note:&lt;br /&gt;
#&amp;nbsp; ----&amp;gt; lbfactor must be &amp;gt; 0&lt;br /&gt;
#&amp;nbsp; ----&amp;gt; Low lbfactor means less work done by the worker.&lt;br /&gt;
worker.workerworker2.lbfactor=1&lt;br /&gt;
#&lt;br /&gt;
# Specify the size of the open connection cache.&lt;br /&gt;
#worker.workerworker2.cachesize&lt;br /&gt;
#&lt;br /&gt;
worker.worker3.port=8209&lt;br /&gt;
worker.worker3.host=localhost&lt;br /&gt;
worker.worker3.type=ajp13&lt;br /&gt;
#&lt;br /&gt;
# Specifies the load balance factor when used with&lt;br /&gt;
# a load balancing worker.&lt;br /&gt;
# Note:&lt;br /&gt;
#&amp;nbsp; ----&amp;gt; lbfactor must be &amp;gt; 0&lt;br /&gt;
#&amp;nbsp; ----&amp;gt; Low lbfactor means less work done by the worker.&lt;br /&gt;
worker.workerworker3.lbfactor=1&lt;br /&gt;
#&lt;br /&gt;
# Specify the size of the open connection cache.&lt;br /&gt;
#worker.workerworker3.cachesize&lt;br /&gt;
#&lt;br /&gt;
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# The loadbalancer (type lb) workers perform wighted round-robin&lt;br /&gt;
# load balancing with sticky sessions.&lt;br /&gt;
# Note:&lt;br /&gt;
#&amp;nbsp; ----&amp;gt; If a worker dies, the load balancer will check its state&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; once in a while. Until then all work is redirected to peer&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; workers.&lt;br /&gt;
worker.loadbalancer.type=lb&lt;br /&gt;
worker.loadbalancer.balanced_workers=worker1, worker2, worker3&lt;br /&gt;
#&lt;br /&gt;
#------ DEFAULT JNI WORKER DEFINITION---------------------------------&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# Defining a worker named inprocess and of type jni&lt;br /&gt;
# Note that the name and the type do not have to match.&lt;br /&gt;
#&lt;br /&gt;
worker.inprocess.type=jni&lt;br /&gt;
#&lt;br /&gt;
#------ CLASSPATH DEFINITION -----------------------------------------&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# Additional class path components.&lt;br /&gt;
#&lt;br /&gt;
#worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar&lt;br /&gt;
#&lt;br /&gt;
# Setting the command line for tomcat.&lt;br /&gt;
# Note: The cmd_line string may not contain spaces.&lt;br /&gt;
#&lt;br /&gt;
#worker.inprocess.cmd_line=start&lt;br /&gt;
#&lt;br /&gt;
# Not needed, but can be customized.&lt;br /&gt;
# worker.inprocess.cmd_line=-config&lt;br /&gt;
# worker.inprocess.cmd_line=$(workers.tomcat_home)$(ps)conf$(ps)server.xml&lt;br /&gt;
# worker.inprocess.cmd_line=-home&lt;br /&gt;
# worker.inprocess.cmd_line=$(workers.tomcat_home)&lt;br /&gt;
#&lt;br /&gt;
# The JVM that we are about to use&lt;br /&gt;
#&lt;br /&gt;
# This is for Java2&lt;br /&gt;
#&lt;br /&gt;
# Windows&lt;br /&gt;
# worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll&lt;br /&gt;
# IBM JDK1.3&lt;br /&gt;
# worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)libjvm.so&lt;br /&gt;
# Unix - Sun VM or blackdown&lt;br /&gt;
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so&lt;br /&gt;
#&lt;br /&gt;
# And this is for jdk1.7.X&lt;br /&gt;
#&lt;br /&gt;
# worker.inprocess.jvm_lib=$(workers.java_home)$(ps)bin$(ps)javai.dll&lt;br /&gt;
#&lt;br /&gt;
# Setting the place for the stdout and stderr of tomcat&lt;br /&gt;
#&lt;br /&gt;
#worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout&lt;br /&gt;
#worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr&lt;br /&gt;
#&lt;br /&gt;
# Setting the tomcat.home Java property&lt;br /&gt;
#&lt;br /&gt;
# worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)&lt;br /&gt;
#&lt;br /&gt;
# Java system properties&lt;br /&gt;
#&lt;br /&gt;
# worker.inprocess.sysprops=java.compiler=NONE&lt;br /&gt;
# worker.inprocess.sysprops=myprop=mypropvalue&lt;br /&gt;
#&lt;br /&gt;
# Additional path components.&lt;br /&gt;
#&lt;br /&gt;
# worker.inprocess.ld_path=d:$(ps)SQLLIB$(ps)bin &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;

&lt;/span&gt;&lt;/code&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.&lt;b&gt; &lt;/b&gt;Configuring JK to connect&lt;b&gt; jk.load&lt;/b&gt; to&lt;b&gt; workers.properties&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;

&lt;/b&gt;Open&lt;b&gt; &lt;/b&gt;&lt;b&gt;/etc/apache2/modes-available/jk.load &lt;/b&gt;and append the following: 

&lt;span style=&quot;font-size: x-small;&quot;&gt;# jk.load
# --------------------------------------------------------------------------
# File:        jk.load
#
# Purpose:     Configuration file for Apache/Tomcat
#
# Location:    /Apache2/mods-available/
#
# Certified:   Ubuntu 11.04 / Apache 2.2.17/ Tomcat 7.0 / JDK-1.7.0
#
# Note:        This file should be appended into jk.load module
# --------------------------------------------------------------------------
#
# Configure the jk module
#&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;# Update this path to match your conf directory location &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;JkWorkersFile / usr/share/tomcat7/conf/workers.properties &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;# Update this path to match your logs directory location (put mod_jk.log next to access_log)&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;JkLogFile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /var/log/apache2/mod_jk.log&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;#&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;# Update this path to match your local state directory or logs directory&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;JkShmFile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /var/log/apache2/mod_jk.shm &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;#
# Log Level: May be debug, info, error, or emerg.
# If not set, defaults to no log
#
JkLogLevel error&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;# Select the timestamp log format&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;JkLogStampFormat &quot;[%a %b %d&amp;nbsp; %H:%M:%S&amp;nbsp; %Y] &quot;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;#
# Root context mounts for Tomcat
#
#JkMount /*.jsp ajp13
#JkMount /servlet/* ajp13
#
# Examples delivered with Tomcat, mapped in server.xml
# Use this only for Development and Testing
#
# AutoAlias /examples &quot;/usr/local/tomcat/webapps/examples&quot;
# JkMount /examples/servlet/* ajp13
# JkMount /examples/*.jsp ajp13&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;/span&gt;3.&lt;b&gt; &lt;/b&gt;Disable the default configuration file for apache with:&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;sudo a2dissite default&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;&quot;&gt;4. If there is an error: &lt;i&gt;Apache2: Could not determine the server&#39;s fully qualified domain name, using 127.0.0.1 for ServerName&lt;/i&gt;&lt;i&gt; &lt;/i&gt;then:&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;b style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;echo &quot;ServerName localhost&quot; | sudo tee /etc/apache2/conf.d/fqdn&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;&quot;&gt;Useful Links:&lt;br /&gt;
&lt;a href=&quot;http://tomcat.apache.org/connectors-doc/reference/apache.html&quot;&gt;http://tomcat.apache.org/connectors-doc/reference/apache.html&lt;/a&gt;&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/8130705837801269319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/connecting-tomcat-7-with-apache2-modjk.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/8130705837801269319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/8130705837801269319'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/connecting-tomcat-7-with-apache2-modjk.html' title='Connecting Tomcat 7.0.25 with Apache 2 (mod_jk)'/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1874798069153261644.post-8819026590283462779</id><published>2011-08-22T17:10:00.000-07:00</published><updated>2012-02-17T18:59:03.376-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tomcat 7.0.25"/><title type='text'>Installing Tomcat 7.0.25 on Ubuntu 11.10</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 25.1pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt; line-height: 115%;&quot;&gt;1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt; line-height: 115%;&quot;&gt;Installing Tomcat 7.0.25&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt; &lt;br style=&quot;mso-special-character: line-break;&quot; /&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.1.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;cd ~/downloads&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.2.&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt; SOURCETOM=apache-tomcat-7.0.25.tar.gz&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.3.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;b&gt;SOURCETOMWEB=&lt;/b&gt;http://apache.mirror.nexicom.net/tomcat/tomcat-7/v7.0.25/src/apache-tomcat-7.0.25-src.tar.gz&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot;&gt;&lt;a href=&quot;http://apache.mirror.nexicom.net/tomcat/tomcat-7/v7.0.21/bin/apache-tomcat-7.0.21.tar.gz&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.4.&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo wget $SOURCETOMWEB&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.5.&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-CA&quot;&gt;sudo mkdir /usr/share/tomcat7 &lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.6.&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Unpack the source&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;br /&gt;
sudo tar zxvf $SOURCETOM&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.7.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white;&quot;&gt;ove the generated content of folder &lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;apache-tomcat-7.0.25&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt; &lt;/b&gt;&lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white;&quot;&gt;to /usr/share/tomcat7:&lt;br /&gt;
&amp;nbsp;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;sudo mkdir –p /usr/share/tomcat7&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&amp;nbsp;sudo mv apache-tomcat-7.0.25/* /usr/share/tomcat7/&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin: 0cm 0cm 0cm 46.2pt; text-indent: -17.85pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.8.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: none repeat scroll 0% 0% white;&quot;&gt; Delete apache-tomcat-7.0.25 directory:&lt;br /&gt;
&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;sudo rm –r apache-tomcat-7.0.25&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.9.&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;span class=&quot;longtext&quot;&gt;Clean up the variable (and the compressed file)&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;br /&gt;
&amp;nbsp;rm –f&amp;nbsp; $SOURCETOM &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.10.&lt;span style=&quot;-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-CA&quot;&gt;sudo nano /etc/environment&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-CA&quot;&gt;Now let&#39;s set up the directories where we have installed Java in my case this is as follows:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;JAVA_HOME=&quot;/usr/lib/jvm/&lt;/span&gt;&lt;/b&gt;&lt;code&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt; jdk1.0.7/&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&quot;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;JRE_HOME=&quot;/usr/lib/jvm /&lt;/span&gt;&lt;/b&gt;&lt;code&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt; jdk1.0.7/&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;jre/&quot; &lt;br /&gt;
PATH=”…… :$JAVA_HOME:JRE_HOME” &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; line-height: normal; margin: 0cm 0cm 0cm 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.11.&lt;span style=&quot;-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot;&gt;Configuring Tomcat users. The changes should be made in the file &quot;tomcat-users.xml&quot; directory tomcat7/conf. Command to edit the file: &lt;br /&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;sudo nano /usr/share/tomcat7/conf/tomcat-users.xml&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt; &lt;br style=&quot;mso-special-character: line-break;&quot; /&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-CA&quot;&gt;The file would be as follows (add to the end of the file):&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;lt;tomcat-users&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;lt;role rolename=&quot;manager-gui&quot;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;lt;role rolename=&quot;manager-script&quot;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;lt;role rolename=&quot;manager&quot;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;lt;role rolename=&quot;admin-gui&quot;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;lt;role rolename=&quot;admin-script&quot;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;lt;role rolename=&quot;admin&quot;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;
&lt;code&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;lt;user username=&quot;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;ubuntu&lt;/i&gt;&quot; password=&quot;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;ubuntu&lt;/i&gt;&quot; roles=&quot;manager-gui,admin-gui,manager,admin,manager-script,admin-script&quot;/&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;lt;/tomcat-users&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;code&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;line-height: 115%;&quot;&gt;1.12.&lt;span style=&quot;-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;span lang=&quot;EN-CA&quot;&gt;Now we will attempt to start Tomcat7. First the server should be brought up with the following command:&lt;code&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo /usr/share/tomcat7/bin/startup.sh&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt;The following output will be observed on console: &lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;Using CATALINA_BASE: /usr/share/tomcat7/ &lt;br /&gt;
Using CATALINA_HOME: /usr/share/tomcat7/ &lt;br /&gt;
Using Catalina TMPDIR: /usr/share/tomcat7/tmp&lt;br /&gt;
Using JRE_HOME: /usr/lib/jvm /&lt;/b&gt;&lt;/span&gt;&lt;code&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: none repeat scroll 0% 0% white; font-size: 11pt;&quot;&gt; jdk1.0.7/&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;jre&lt;br /&gt;
Using CLASSPATH: /usr/share/tomcat7/ apache-tomcat \ 7.0.25/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt;C&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;reate the tomcat user and group:&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;sudo groupadd tomcat&lt;br /&gt;
sudo useradd –g tomcat –d /usr/share/tomcat7 tomcat&lt;br /&gt;
sudo passwd tomcat&lt;br /&gt;
sudo chown –R tomcat:tomcat /usr/share/tomcat7&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.13.&lt;span style=&quot;-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Automatic starting&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;To make tomcat automatically start when we boot up the computer, we can add a script to make it auto-start and shutdown.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;FR-CA&quot;&gt;sudo touch /etc/init.d/tomcat7&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;FR-CA&quot;&gt;sudo nano /etc/init.d/tomcat7&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.14.&lt;span style=&quot;-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Now paste in the following:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;#&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;!/ bin/sh&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;# Tomcat7 Autostart Script&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;# Description: Provides Autostart Tomcat7 Servlet Engine&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;# processname: tomcat&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;# Default start: 3 5&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;# Default stop: 0 1 2 6&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;# Pidfile: /var/run/tomcat.pid&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;case $1 in&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;start)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;echo –n “Starting Tomcat7\n”&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;sh /usr/share/tomcat7&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;font-size: x-small;&quot;&gt;/&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;bin/startup.sh&lt;br /&gt;
echo –n “Starting Tomcat7… done\n”&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;stop)&lt;br /&gt;
echo –n “Stopping Tomcat7\n”&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;sh /usr/share/tomcat7&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;font-size: x-small;&quot;&gt;/&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;bin/shutdown.sh&lt;br /&gt;
echo –n “Stopping Tomcat7… done\n”&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;restart)&lt;br /&gt;
echo –n “Restarting Tomcat7\n”&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;sh /usr/share/tomcat7&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;font-size: x-small;&quot;&gt;/&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;bin/shutdown.sh&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;sh /usr/share/tomcat7/bin/startup.sh&lt;br /&gt;
echo –n “RestartingTomcat7… done\n”&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;esac&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: x-small;&quot;&gt;exit 0&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;The script should be made executable by running the &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;chmod&lt;/b&gt; command:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;FR-CA&quot;&gt;sudo chmod 755 /etc/init.d/tomcat7 or &lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;FR-CA&quot;&gt;sudo chmod +x /etc/init.d/tomcat7&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;The last step is actually linking this script to the startup folders with a symbolic link. Execute these two commands and we should be on our way.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;FR-CA&quot;&gt;sudo ln -s /etc/init.d/tomcat7 /etc/rc1.d/K99tomcat&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo ln -s /etc/init.d/tomcat7 /etc/rc2.d/S99tomcat&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 11pt; line-height: 115%;&quot;&gt;sudo /etc/init.d/tomcat7 restart&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
Tomcat should now be fully installed and operational.&lt;br /&gt;
&lt;br /&gt;
Useful Links:&lt;br /&gt;
Securing Tomcat Server &lt;/span&gt;&lt;a href=&quot;https://www.owasp.org/index.php/Category:OWASP_Project&quot; style=&quot;font-family: inherit;&quot;&gt;(OWASP Project&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;)&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt; &lt;br style=&quot;mso-special-character: line-break;&quot; /&gt; &lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/8819026590283462779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/installing-tomcat.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/8819026590283462779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/8819026590283462779'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/installing-tomcat.html' title='Installing Tomcat 7.0.25 on Ubuntu 11.10'/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1874798069153261644.post-6479373872838783044</id><published>2011-08-22T17:01:00.000-07:00</published><updated>2011-11-03T08:33:39.916-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LAMP JDK Web"/><title type='text'>Installing LAMP Server and JDK 1.0.7 on Ubuntu 11.10</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 25.1pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt; line-height: 115%;&quot;&gt;1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt; line-height: 115%;&quot;&gt;Installing LAMP&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 43.1pt; text-indent: -18pt;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.1.&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;sudo tasksel install lamp-server&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 25.1pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt; line-height: 115%;&quot;&gt;2.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #00b0f0; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 20pt; line-height: 115%;&quot;&gt;Installing Java Development Kit (JDK)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.1.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;mkdir ~/downloads&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.2.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;cd ~/downloads &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.3.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Download the source&lt;b&gt;&lt;br /&gt;
&amp;nbsp;SOURCEJ=&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;jdk-7-linux-i586.tar.gz&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 39.3pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SOURCEJAVAWEB=&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot;&gt;&lt;a href=&quot;http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz&lt;/span&gt;&lt;/a&gt;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 39.3pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot;&gt;(for x86)&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 39.3pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span lang=&quot;EN-CA&quot;&gt;or&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;SOURCEJWEB=&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot;&gt;&lt;a href=&quot;http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 39.3pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot;&gt;(for x64) &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.4.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt; sudo wget $SOURCEJWEB&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.5.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Unpack the source&lt;br /&gt;
&amp;nbsp;&lt;b&gt;sudo&lt;/b&gt; &lt;b&gt;tar zxfv $SOURCEJ&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.6.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt; Clean up the variable (and the compressed file)&lt;br /&gt;
&amp;nbsp;&lt;b&gt;rm –f &amp;nbsp;$SOURCEJ&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.7.&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: none repeat scroll 0% 0% white;&quot;&gt;&amp;nbsp; M&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white;&quot;&gt;ove the generated content of folder &lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;jdk1.0.7&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white;&quot;&gt;to a more appropriate directory:&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;sudo mkdir –p /usr/lib/jvm/ &lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo mv jdk1.0.7 /usr/lib&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;/jvm/ &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.8.&lt;/span&gt;&lt;span lang=&quot;EN-CA&quot;&gt;Check how many alternatives you have:&lt;br /&gt;
&amp;nbsp; &lt;/span&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;sudo update-alternatives --config &lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;java &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 46.35pt; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 115%;&quot;&gt;2.9.&lt;span style=&quot;-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;span lang=&quot;EN-CA&quot;&gt;To add your new JDK 7 installation into alternatives list:&lt;br /&gt;
&lt;/span&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;sudo update-alternatives --install /usr/bin/java java /usr/lib&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;/jvm &lt;/span&gt;&lt;/b&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;/ jdk1.0.7/jre/bin/java 1&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;font-family: inherit; margin-left: 28.4pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;sudo update-alternatives --config &lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;java &lt;/span&gt;&lt;/b&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;font-family: inherit; margin-left: 28.4pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span lang=&quot;EN-CA&quot; style=&quot;background: none repeat scroll 0% 0% white; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;java –version&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span class=&quot;longtext&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;* sudo apt-get python-software-properties&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://valeriytroshin.blogspot.com/feeds/6479373872838783044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/installing-lamp-server-and-jdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/6479373872838783044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1874798069153261644/posts/default/6479373872838783044'/><link rel='alternate' type='text/html' href='http://valeriytroshin.blogspot.com/2011/08/installing-lamp-server-and-jdk.html' title='Installing LAMP Server and JDK 1.0.7 on Ubuntu 11.10'/><author><name>Valeriy Troshin</name><uri>http://www.blogger.com/profile/11511042275588469502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>