<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ASP.NET MSSQL Webhosting Blog &#187; Linux Server Hosting</title>
	<atom:link href="http://www.mywebhostingblog.net/tag/hosting-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mywebhostingblog.net</link>
	<description>ASP.NET, MSSQL and Windows dedicated server articles</description>
	<lastBuildDate>Thu, 16 Sep 2010 19:53:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Monitoring Bandwidth usage with SNMP and RRDtool for Linux</title>
		<link>http://www.mywebhostingblog.net/hosting-linux/monitoring-bandwidth-usage-with-snmp-and-rrdtool-for-linux/</link>
		<comments>http://www.mywebhostingblog.net/hosting-linux/monitoring-bandwidth-usage-with-snmp-and-rrdtool-for-linux/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 20:52:43 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Linux Server Hosting]]></category>
		<category><![CDATA[Bandwidth]]></category>
		<category><![CDATA[Monitor]]></category>
		<category><![CDATA[net-snmp]]></category>
		<category><![CDATA[RRDTool]]></category>
		<category><![CDATA[SNMP]]></category>

		<guid isPermaLink="false">http://www.mywebhostingblog.net/?p=27</guid>
		<description><![CDATA[Before monitor any server you need to install SNMP and RRDTool packages on monitor server and net-snmp package on server which you want to monitor. lets assume server which has SNMP and RRDTool means monitor server has ip address 10.10.10.1 and server which you want to monitor has IP address 99.99.99.99 SNMP Installation SNMP packages [...]]]></description>
			<content:encoded><![CDATA[<p>Before monitor any server you need to install SNMP and RRDTool packages on monitor server and net-snmp package on server which you want to monitor.</p>
<p>lets assume server which has SNMP and RRDTool means monitor server has ip address 10.10.10.1<br />
and server which you want to monitor has IP address 99.99.99.99</p>
<p><strong>SNMP Installation</strong><br />
SNMP packages require for querring .</p>
<p>- type command at the prompt<br />
#yum search snmp<br />
It will show you different snmp packages.<br />
You neet to install 2 packages<br />
net-snmp<br />
net-snmp-devel<br />
type command<br />
#yum install net-snmp<br />
#yum install net-snmp-devel</p>
<p><strong>RRDTool Installation</strong></p>
<p>RRD store and display time-series data (i.e. network bandwidth, server load average). It stores the data in a very compact way that will not expand over time, and it presents useful graphs by processing the data to enforce a certain data density.</p>
<p>RRDTool 1.2.x has dependancies ,hence you need to install following packages.</p>
<p>* libart_lgpl-2.3.11-2.i386.rpm<br />
* <a title="Download RPM" href="ftp://rpmfind.net/linux/ASPLinux/i386/RPMS.9/libart_lgpl-devel-2.3.11-2.i386.rpm" target="_blank">libart_lgpl-devel-2.3.11-2.i386.rpm</a></p>
<p><span id="more-27"></span><br />
* freetype-2.1.3-6.i386.rpm<br />
* freetype-devel-2.1.3-6.i386.rpm<br />
* zlib-1.1.4-8.i386.rpm<br />
* zlib-devel-1.1.4-8.i386.rpm<br />
* libpng-1.2.2-16.i386.rpm<br />
* libpng-devel-1.2.2-16.i386.rpm</p>
<p>Download RRDTool from <a href="http://ftp.idilis.ro/mirrors/rrdtool/">http://ftp.idilis.ro/mirrors/rrdtool/</a></p>
<p>lets assume you have rrdtool-1.2.12.tar.gz</p>
<p>To extract RRDTool run this command:</p>
<p>#tar -xzvf rrdtool-1.2.12.tar.gz</p>
<p>then change directory:<br />
#cd rrdtool-1.2.12</p>
<p>to compile ans install RRDTool type:<br />
#./configure &#8211;disable-tcl<br />
#make<br />
#make install</p>
<p><strong>Apply following step on server which you want to monitor means 99.99.99.99</strong><br />
Install net-snmp<br />
Type following commands<br />
#yum search snmp<br />
#yum install net-snmp</p>
<p>then edit snmpd.conf file and create readonly community<br />
#vi /etc/snmp/snmpd.conf</p>
<p>add following line in snmpd.conf file<br />
rocommunity  community_name ip_address_of_monitor_server</p>
<p>start snmpd service<br />
/etc/init.d/snmpd start</p>
<p><strong>Apply following step on monitor server means 10.10.10.1</strong><br />
To monitor bandwidth you need to create RRD file,which will store bandwidth data.</p>
<p><strong>step 1</strong><br />
Create RRD file.<br />
rrdtool create bandwidth.rrd -s 60 \<br />
DS:in:COUNTER:300:U:U \<br />
DS:out:COUNTER:300:U:U \<br />
RRA:AVERAGE:0.5:1:10080</p>
<p><strong>step 2</strong><br />
Update RRD file.</p>
<p>/usr/bin/rrdupdate bandwidth.rrd \<br />
N:`/usr/bin/snmpget -v 1 -c community_name -Oqv 9.99.99.99 IF-MIB::ifInOctets.2`: \<br />
`/usr/bin/snmpget -v 1 -c community_name -Oqv 99.99.99.99 IF-MIB::ifOutOctets.2`</p>
<p>Above command should be run with 1 or 5 minute interval as per your need,hence add above command in cronjob.</p>
<p><strong>step 3</strong><br />
Generate graph from bandwidth.rrd file</p>
<p>rrdtool graph bandwidth.png \<br />
&#8211;end now &#8211;start end-30h &#8211;width 400 \<br />
&#8211;x-grid HOUR:1:HOUR:6:HOUR:2:0:%H \<br />
&#8211;imgformat=PNG \<br />
&#8211;title=&#8221;your title&#8221; \<br />
&#8211;rigid \<br />
&#8211;base=1000 \<br />
&#8211;height=120 \<br />
&#8211;width=500 \<br />
&#8211;alt-autoscale-max \<br />
&#8211;lower-limit=0 \<br />
&#8211;vertical-label=&#8221;bits per second&#8221; \<br />
DEF:a=bandwidth.rrd:in:AVERAGE \<br />
DEF:b=bandwidth.rrd:out:AVERAGE \<br />
VDEF:totin=a,TOTAL \<br />
VDEF:totout=b,TOTAL \<br />
CDEF:cdefa=a,8,* \<br />
CDEF:cdeff=b,8,* \<br />
AREA:cdefa#00CF00:&#8221;Incoming&#8221;  \<br />
GPRINT:cdefa:LAST:&#8221;Cur\:%6.2lf %sb/s&#8221;  \<br />
GPRINT:cdefa:AVERAGE:&#8221;Avg\:%6.2lf %sb/s&#8221;  \<br />
GPRINT:cdefa:MAX:&#8221;Max\:%6.2lf %sb/s&#8221;  \<br />
GPRINT:cdefa:MIN:&#8221;MIN\:%6.2lf %sb/s\l&#8221;  \<br />
LINE1.3:cdeff#0000FF:&#8221;Outgoing&#8221;  \<br />
GPRINT:cdeff:LAST:&#8221;Cur\:%6.2lf %sb/s&#8221;  \<br />
GPRINT:cdeff:AVERAGE:&#8221;Avg\:%6.2lf %sb/s&#8221;  \<br />
GPRINT:cdeff:MAX:&#8221;Max\:%6.2lf %sb/s&#8221;  \<br />
GPRINT:cdeff:MIN:&#8221;MIN\:%6.2lf %sb/s\l&#8221;  \<br />
GPRINT:totin:&#8221;Total IN\:%6.2lf %sb/s&#8221;  \<br />
GPRINT:totout:&#8221;Total OUT\:%6.2lf %sb/s&#8221;  \<br />
VRULE:1084777200#FF0000:&#8221;"</p>
<p>After firing  above command, a file bandwidth.png will be in current direcoty which is bandwidth graph for server 99.99.99.99</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mywebhostingblog.net/hosting-linux/monitoring-bandwidth-usage-with-snmp-and-rrdtool-for-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Java on Linux Platform</title>
		<link>http://www.mywebhostingblog.net/hosting-linux/install-java-on-linux-platform/</link>
		<comments>http://www.mywebhostingblog.net/hosting-linux/install-java-on-linux-platform/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 20:50:18 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux Server Hosting]]></category>
		<category><![CDATA[JDK]]></category>

		<guid isPermaLink="false">http://www.mywebhostingblog.net/?p=25</guid>
		<description><![CDATA[Download the JDK from http://java.sun.com/j2se/1.5.0/download.jsp (A)  install jdk by running the RPM or bin file. Installation Instructions Install formats &#8211; JDK 5.0 is available in two installation formats. Self-extracting Binary File &#8211; This file can be used to install the JDK in a location chosen by the user. This one can be installed by anyone [...]]]></description>
			<content:encoded><![CDATA[<p>Download the JDK from  <a href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</a><br />
(A)  install jdk by running the RPM or bin file.</p>
<p>Installation Instructions</p>
<p>Install formats &#8211; JDK 5.0 is available in two installation formats.</p>
<ul>
<li> <strong>Self-extracting Binary File</strong> &#8211; This file can be used to install the JDK in a location chosen by the user. This one can be installed by anyone (not only root users), and it can easily be installed in any location. As long as you are not root user, it cannot displace the system version of the Java platform suppled by Linux. To use this file, see Installation of Self-Extracting Binary below.</li>
</ul>
<ul>
<li><strong> RPM Packages</strong> &#8211; A rpm.bin file containing RPM packages, installed with the rpm utility. Requires root access to install, and installs by default in a location that replaces the system version of the Java platform supplied by Linux. To use this bundle, see Installation of RPM File below.</li>
</ul>
<p>Choose the install format that is most suitable to your needs.</p>
<p><span id="more-25"></span></p>
<p>Note: For any text on this page containing the following notation, you must substitute the appropriate JDK update version number for the notation.</p>
<p>&lt;version&gt;</p>
<p>For example, if you are downloading update 1.5.0_01, the following command:</p>
<p>]# ./jdk-1_5_0_&lt;version&gt;-linux-i586.bin</p>
<p>would become:</p>
<p>]# ./jdk-1_5_0_01-linux-i586.bin</p>
<p><strong>Installation of Self-Extracting Binary</strong><br />
Use these instructions if you want to use the self-extracting binary file to install the JDK.</p>
<p>1. Download and check the download file size to ensure that you have downloaded the full, uncorrupted software bundle.You can download to any directory you choose; it does not have to be the directory where you want to install the JDK.</p>
<p>Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.</p>
<p>2. Make sure that execute permissions are set on the self-extracting binary.</p>
<p>Run this command:<br />
chmod +x jdk-1_5_0_&lt;version&gt;-linux-i586.bin</p>
<p>3. Change directory to the location where you would like the files to be installed.</p>
<p>The next step installs the JDK into the current directory.</p>
<p>4. Run the self-extracting binary.</p>
<p>Execute the downloaded file, prepended by the path to it. For example, if the file is in the current directory, prepend it with &#8220;./&#8221; (necessary if &#8220;.&#8221; is not in the PATH environment variable):</p>
<p>]# ./jdk-1_5_0_&lt;version&gt;-linux-i586.bin</p>
<p>The binary code license is displayed, and you are prompted to agree to its terms.</p>
<p>The JDK files are installed in a directory called jdk1.5.0_&lt;version&gt; in the current directory. The JDK documentation is a separate download.</p>
<p><strong>Installation of RPM Packages</strong><br />
Use these instructions, If you want to install RPM packages.</p>
<p>1. Download and check the download file size to ensure that you have downloaded the full, uncorrupted software bundle.</p>
<p>Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.</p>
<p>2. Make sure that execute permissions are set on the RPM Packages.</p>
<p>Run this command:<br />
chmod +x jdk-1_5_0_&lt;version&gt;-linux-i586-rpm.bin<br />
3. Start the installation process. Type:<br />
]# ./jdk-1_5_0_&lt;version&gt;-linux-i586-rpm.bin</p>
<p>The binary code license is displayed, and you are prompted to agree to its terms.</p>
<p>4. The installation file creates jdk-1_5_0_&lt;version&gt;-linux-i586.rpm file in the current directory.</p>
<p>5. Run the RPM command at the terminal to install the packages. Type:<br />
rpm -iv jdk-1_5_0_&lt;version&gt;-linux-i586.rpm</p>
<p>6. The JDK is installed in jdk-1_5_0_&lt;version&gt; sub-directory under the current directory.</p>
<p><strong>Note about Root Access:</strong> Unbundling the software automatically creates a directory called jdk1.5.0_&lt;version&gt;. Note that if you choose to install the JDK into system-wide location such as /usr/local, you must first become root to gain the necessary permissions. If you do not have root access, simply install the JDK into your home directory, or a sub directory that you have permission to write to.</p>
<p><strong>Note about Overwriting Files:</strong> If you unpack the software in a directory that contains a subdirectory named jdk1.5.0_&lt;version&gt;, the new software overwrites files of the same name in that jdk1.5.0_&lt;version&gt; directory. Please be careful to rename the old directory if it contains files you would like to keep.</p>
<p>(B)  Create links for the JDK by entering the following commands:<br />
]# ln -s /usr/java/jdk1.5.0_06 /usr/local/jdk1.5.0_06<br />
]# ln -s /usr/local/jdk1.5.0_06 /usr/local/jdk</p>
<p>(C)  Stack components like JBoss and Tomcat need JAVA_HOME set properly before prior to operation. Create the system files: /etc/profile.d/java.sh and java.csh to export the following environment variables:<br />
JAVA_HOME=/usr/local/jdk<br />
PATH=$JAVA_HOME/bin:$PATH</p>
<p>NOTE:<br />
The shells bash and cshell use a different syntax for setting environment variables.</p>
<p>- For java.sh include the lines:<br />
export JAVA_HOME=/usr/local/jdk<br />
export PATH=$JAVA_HOME/bin:$PATH</p>
<p>- For java.csh include the lines:<br />
setenv JAVA_HOME /usr/local/jdk<br />
setenv PATH $JAVA_HOME/bin:$PATH</p>
<p>You can either use setenv or declare -x to declare the path in .csh file.<br />
If you get any error like bad discriptor after running that .csh file, you can directly declare the path using following command.<br />
]# export PATH=&#8221;$PATH:/usr/local/jdk-version&#8221;</p>
<p>(D) To verify that the installation was successful, at the prompt enter:<br />
]# java –version</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mywebhostingblog.net/hosting-linux/install-java-on-linux-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Tomcat on Linux</title>
		<link>http://www.mywebhostingblog.net/hosting-linux/installing-tomcat-on-linux/</link>
		<comments>http://www.mywebhostingblog.net/hosting-linux/installing-tomcat-on-linux/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 20:46:25 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux Server Hosting]]></category>
		<category><![CDATA[Jakarta]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://www.mywebhostingblog.net/?p=23</guid>
		<description><![CDATA[Steps on how to install Tomcat on a Linus server.]]></description>
			<content:encoded><![CDATA[<p>To install apache tomcat , you need to install jdk (Java Development kit).<br />
Tomcat need JAVA_HOME set properly before prior to operation or installation.<br />
e.g.<br />
JAVA_HOME=/usr/local/jdk<br />
PATH=$JAVA_HOME/bin:$PATH</p>
<p>You can download the installer from<br />
<a href="http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.28/bin/jakarta-tomcat-5.0.28.tar.gz">http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.28/bin/jakarta-tomcat-5.0.28.tar.gz</a></p>
<p>Download version 5.0.28 to be compatible with JDK 1.4.2 because the latest versions of tomcat require JDK5</p>
<p><strong>To extract and install Tomcat run this command:</strong></p>
<p>]# tar xvfz jakarta-tomcat-5.0.28.tar.gz</p>
<p>The Tomcat files are installed in a directory called jakarta-tomcat-5.0.28 in the current directory.</p>
<p>Then you need to set CATALINA_HOME properly prior to start tomcat.</p>
<p>Use following command to set CATALINA_HOME and provide full path of tomcat directory (from toot).</p>
<p>export CATALINA_HOME=/user/local/jakarta/jakarta-tomcat-5.0.28</p>
<p><strong>Run Tomcat</strong></p>
<p>goto bin directory of tomcat<br />
cd /user/local/jakarta/jakarta-tomcat-5.0.28/bin<br />
]# ./startup.sh</p>
<p>Open web browser and type http://your_domain:8080/ you should see the Tomcat Administration page</p>
<p><strong>Test Tomcat</strong></p>
<p>go to webapps/ROOT in the tomcat directory and create page hello_world.html and write in it</p>
<p>Hello World</p>
<p>open the URL http://your_domain:8080/hello_world.html you should see your page.</p>
<p><strong>Test JSP page</strong></p>
<p>go to webapps/ROOT in the tomcat directory and create page test.jsp and write in it the following lines<br />
&lt;html&gt;<br />
&lt;%=new String(&#8220;Hello World&#8230;&#8221;)%&gt;<br />
&lt;br&gt;<br />
&lt;%=new java.util.Date()%&gt;<br />
&lt;br&gt;<br />
&lt;/html&gt;</p>
<p>save and run the following URL http://your_domain:8080/test.jsp you should see Hello World.. followed by current date.</p>
<p><strong>Monitor Tomcat</strong></p>
<p>You can see the log file in the logs directory  /user/local/jakarta/jakarta-tomcat-5.0.28/log/</p>
<p><strong>Stop Tomcat</strong></p>
<p>Go to the tomcat bin directory and run command.</p>
<p>]# ./shutdown.sh</p>
<p>Note:- Apache Tomcat on Linux faster that tomcat in Windows at least 2 times in both startup, shutdown and in compiling jsp files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mywebhostingblog.net/hosting-linux/installing-tomcat-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

