<?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>SlickDev &#187; server</title>
	<atom:link href="http://www.slickdev.com/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.slickdev.com</link>
	<description>Freelance Web and Software Developer</description>
	<lastBuildDate>Mon, 30 Jan 2012 14:21:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Auto Updating OpenDNS with Dynamic IP Address via Ubuntu Server</title>
		<link>http://www.slickdev.com/2010/11/05/auto-updating-opendns-with-dynamic-ip-address-via-ubuntu-server/</link>
		<comments>http://www.slickdev.com/2010/11/05/auto-updating-opendns-with-dynamic-ip-address-via-ubuntu-server/#comments</comments>
		<pubDate>Fri, 05 Nov 2010 14:58:01 +0000</pubDate>
		<dc:creator>Chaoz</dc:creator>
				<category><![CDATA[Code Library]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openDNS]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.slickdev.com/?p=136</guid>
		<description><![CDATA[I have a linux Ubuntu server and a dynamic IP for the DSL connection. The office needs web filtering and getting a static IP will just add cost to the now tight budget. Looking around there is actually a way to update OpenDNS IP address under linux. Below are what is needed to be installed [...]]]></description>
			<content:encoded><![CDATA[<p>I have a linux Ubuntu server and a dynamic IP for the DSL connection. The office needs web filtering and getting a static IP will just add cost to the now tight budget. Looking around there is actually a way to update OpenDNS IP address under linux. Below are what is needed to be installed and configured.</p>
<ul>
<li>Any latest Ubuntu server ( I&#8217;m using Ubuntu 10.10 Server )</li>
<li><strong>ddclient </strong>installed (use &#8220;aptitude install ddclient&#8221;)</li>
<li>net connection, I have set up my linux server as a firewall/gateway</li>
</ul>
<p>After installing <strong>ddclient</strong>, go to <strong>/etc</strong> and edit <strong>ddclient.conf</strong>, below is the format that I used, modify it to suite your configuration.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">ssl</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>
<span style="color: #007800;">use</span>=web, <span style="color: #007800;">web</span>=whatismyip.org
<span style="color: #007800;">server</span>=updates.opendns.com
<span style="color: #007800;">protocol</span>=dyndns2
<span style="color: #007800;">login</span>=<span style="color: #000000; font-weight: bold;">&lt;</span>openDNS_username_here<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #007800;">password</span>=<span style="color: #ff0000;">'&lt;openDNS_password_here&gt;'</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>openDNS_network_label_here<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #666666; font-style: italic;">#this can be found under settings, just the label, nothing else should be added here</span></pre></div></div>

<p>Save the new configuration file and restart the client <code> /etc/init.d/ddclient restart</code><br />
Also make sure that the network that your going to update the IP address has set its <strong>Dynamic IP Update</strong> option <strong>enabled</strong>. This can be found under the advance setting of the network.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slickdev.com/2010/11/05/auto-updating-opendns-with-dynamic-ip-address-via-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Slave Failed to Open the Relay Log</title>
		<link>http://www.slickdev.com/2008/10/20/mysql-slave-failed-to-open-the-relay-log/</link>
		<comments>http://www.slickdev.com/2008/10/20/mysql-slave-failed-to-open-the-relay-log/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 14:53:32 +0000</pubDate>
		<dc:creator>Chaoz</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.slickdev.com/?p=68</guid>
		<description><![CDATA[This problem is a little tricky, there are possible fixes that MySQL website has stated. Sad to say, the one&#8217;s I read in the forum and site didn&#8217;t fix my problem. What I encountered was that the relay-bin from my MySQL slave server has already been &#8216;rotated&#8217;, meaning deleted from the folder. This happens when [...]]]></description>
			<content:encoded><![CDATA[<p>This problem is a little tricky, there are possible fixes that MySQL website has stated. Sad to say, the one&#8217;s I read in the forum and site didn&#8217;t fix my problem. What I encountered was that the relay-bin from my MySQL  slave server has already been &#8216;rotated&#8217;, meaning <em>deleted</em> from the folder. This happens when the slave has been disconnected from the master for quite a long time already and has not replicated anything. A simple way to fix this is to flush the logs, but make sure the slave is stopped before using this command&#8230;</p>
<p><code>FLUSH LOGS;</code></p>
<p>Bring in a fresh copy of the database from the master-server and update the slave-server database. THIS IS IMPORTANT! Since if you don&#8217;t update the slave database, you will not have the data from the time you were disconnected until you reset the relay logs. So UPDATE YOUR SLAVE WITH THE LATEST DATABASE FROM THE MASTER!</p>
<p>Now when the logs are flushed,all the relay-bin logs will be deleted when the slave is started again. Usually, this fixes the problem, but when you start the slave and the failed relay log error is still there, now you have to do some more desperate measures&#8230; reset the slave. This is what I had to do to fully restore my MySQL slave server. Reseting the slaves restores all the settings to default&#8230; password, username, relay-log, port, table to replicate, etc&#8230; So better to have a copy of your settings first before actually do a slave reset. When your ready to rest the slave, do the command&#8230;</p>
<p><code>RESET SLAVE;</code></p>
<p>after which you should restore all your setting with a command something like&#8230;</p>
<p><code>CHANGE MASTER TO MASTER_HOST=.....</code></p>
<p>now start your server with&#8230;</p>
<p><code>SLAVE START;</code></p>
<p>check your slave server with&#8230;</p>
<p><code>SHOW SLAVE STATUS\G</code></p>
<p>look for &#8230;</p>
<p><code>Slave_IO_Running: Yes<br />
Slave_SQL_Running: Yes</code></p>
<p>both should be <strong>YES</strong>, if not, check your syslog if there are other errors encountered. I&#8217;ll leave this until here since this is what I encountered and I was able to fix it.</p>
<p><strong>Edit 5/14/11:</strong></p>
<p>There is a possible change that after executing the CHANGE MASTER command that you&#8217;ll receive this error below&#8230;</p>
<p><em>ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log</em></p>
<p>This can occur when the relay logs under /var/lib/mysql were not properly cleaned and are still there. The next thing is to delete them manually, log back in to mysql, refresh logs, reset slave then execute the CHANGE MASTER command again. The file to delete would be <em>relay-log.info</em> .This should work now. Sometimes I don&#8217;t know why mysql can&#8217;t reset the slave logs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slickdev.com/2008/10/20/mysql-slave-failed-to-open-the-relay-log/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Java 5 JDK and Jakarta Tomcat 5.5 in Ubuntu Server Installation</title>
		<link>http://www.slickdev.com/2008/09/13/java-5-jdk-and-jakarta-tomcat-55-in-ubuntu-server-installation/</link>
		<comments>http://www.slickdev.com/2008/09/13/java-5-jdk-and-jakarta-tomcat-55-in-ubuntu-server-installation/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 04:19:33 +0000</pubDate>
		<dc:creator>Chaoz</dc:creator>
				<category><![CDATA[Code Library]]></category>
		<category><![CDATA[Mods]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.slickdev.com/?p=23</guid>
		<description><![CDATA[These are the steps I took to install Jakarta Tomkat 5.5 in conjunction with Java 2 SDK in Ubuntu server. Login as root, you can also use &#8220;su&#8221; though I prefer to login as root. apt-get install sun-java5-jdk This will install Java 2 SDK (1.5), ubuntu will start downloading packages that are not found in [...]]]></description>
			<content:encoded><![CDATA[<p>These are the steps I took to install Jakarta Tomkat 5.5 in conjunction with Java 2 SDK in Ubuntu server.</p>
<ol>
<li>Login as root, you can also use &#8220;<strong>su</strong>&#8221; though I prefer to login as root.</li>
<li><strong>apt-get install sun-java5-jdk</strong></li>
<ul>
<li>This will install Java 2 SDK  (1.5), ubuntu will start downloading packages that are not found in your system.</li>
</ul>
<li><strong>apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps</strong></li>
<ul>
<li>Of course jakarta-tomcat 5.5, I&#8217;m using 5.5 since this supports java 1.5</li>
</ul>
<li>Now here&#8217;s the tricky part, location for Java and jakarta-tomcat</li>
<ul>
<li>Java&#8217;s location is in <strong>/usr/lib/jvm/java-1.5.0-sun</strong></li>
<li>Jakarta-Tomcat&#8217;s location is in <strong>/usr/share/tomcat5.5</strong></li>
<ul>
<li>We will need these location for the export configurations to be written in the <strong>.bashrc</strong></li>
</ul>
</ul>
<li>Now, open <strong>.bashrc</strong> in your favorite text editor, I used <strong>vim</strong></li>
<li>At the end of the file add these:<br />
<code><br />
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun<br />
export CLASSPATH="/usr/share/tomcat5.5/common/lib/jsp-api.jar;/usr/share/tomcat5.5/common/lib/servlet-api.jar"<br />
export CATALINA_HOME=/usr/share/tomcat5.5<br />
</code></li>
<li>Now save the file and exit, then log back in. This is required for the export script to be set.</li>
<li>Before starting the server, the default port the installer set is 8180 instead of the 8080 port that Tomcat uses. To change this, go to <strong>/usr/share/tomcat5.5/conf/</strong> and open the file <strong>server.xml</strong>. Locate the line:<br />
<code><br />
...Connector port="8180" maxHttpHeaderSize="8192"...<br />
</code><br />
and change <strong>8180 </strong>to<strong> 8080</strong>. Save and exit. Now your ready to test the server.</li>
<li>Now try the server if it starts, <strong>/usr/share/tomcat5.5/bin/startup.sh</strong>  You should see  something like this:<br />
<code><br />
Using CATALINA_BASE:   /usr/share/tomcat5.5<br />
Using CATALINA_HOME:   /usr/share/tomcat5.5<br />
Using CATALINA_TMPDIR: /usr/share/tomcat5.5/temp<br />
Using JRE_HOME:       /usr/lib/jvm/java-1.5.0-sun<br />
</code></li>
<li>Shutting down the server is just <strong>/usr/share/tomcat5.5/bin/</strong><strong>shutdown.sh</strong></li>
<li>Now, during installation of tomcat, Ubuntu automatically adds a startup and shutdown script for ubuntu to use as it starts up or shutsdown in <strong>/etc/init.d/</strong> folder. Filename is <strong>tomcat5.5</strong>. As the server finishes starting up, you will notice tomcat isn&#8217;t running at all. One possible problem is that the script didn&#8217;t use the correct path for the java 2 sdk.  You can check the boot log in <strong>/var/log/</strong>. Check if during boot up, tomcat5.5 encountered problems. For the problem stated above, you can fix this by going to <strong>/etc/default/</strong> and edit the <strong>tomcat5.5</strong> file. Locate the line: <strong><br />
</strong><br /><code><strong>#JAVA_HOME=/usr/lib/j2sdk1.4-sun</strong></code></p>
<p>remove the <strong>&#8216;#&#8217;</strong> and change it to&#8230;<br />
<br /><code><strong>JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun</strong></code></p>
<p>or wherever your java directory is.After that, restart the server and see if tomcat was successfully started. <strong><br />
</strong><br /><code><strong>/etc/init.d/tomcat5.5 status</strong></code></li>
</ol>
<p><strong>Edit: Problem encountered:</strong></p>
<ul>
<li><strong>Tomcat does not load in Ubuntu 8.04</strong></li>
</ul>
<ul>
	Found a little problem loading Tomcat 5.5 under Ubuntu 8.04, it either fails or white screen just appears. I don&#8217;t know what happened from 6.04 to 8.04 but once I compared the <em>init.d/tomcat5.5</em> startup script from 6.04 and 8.04, there WERE changes to the scripts. I replaced the new tomcat5.5 script in 8.04 with the old one from 6.04 and the server started properly after a server restart. I don&#8217;t know why but this may have something to do with permissions and I have yet to trace the script.</p>
</ul>
<ul>
<li><strong>java.lang.ClassNotFoundException: org.apache.jasper.tagplugins.jstl.If</strong></li>
</ul>
<ol>
<ul>
<li>The problem here is that the above name is incomplete&#8230; what it should have been is  <strong>org.apache.jasper.tagplugins.jstl.core.*</strong></li>
<li>Now, to fix the problem, locate <span style="color: #000000"><code></span><strong><span style="color: #000000">/var/lib/tomcat5.5/webapps/jsp-examples/WEB-INF/tagPlugins.xml</span></strong></code> and open it with your text editor&#8230; I used <em>vim</em>. Now edit each line of code that has  <em><strong>org.apache.jasper.tagplugins.jstl</strong></em> in it and add &#8220;<strong>.core</strong>&#8221; after <strong>jstl</strong>. What you will see after editing the code will be&#8230;</li>
<p><code></p>
<p>org.apache.taglibs.standard.tag.rt.core.IfTag</p>
<p>org.apache.jasper.tagplugins.jstl.core.If</p>
<p>org.apache.taglibs.standard.tag.common.core.ChooseTag</p>
<p>org.apache.jasper.tagplugins.jstl.core.Choose</p>
<p>org.apache.taglibs.standard.tag.rt.core.WhenTag</p>
<p>org.apache.jasper.tagplugins.jstl.core.When</p>
<p>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</p>
<p>org.apache.jasper.tagplugins.jstl.core.Otherwise</p>
<p>org.apache.taglibs.standard.tag.rt.core.ForEachTag</p>
<p>org.apache.jasper.tagplugins.jstl.core.ForEach</p>
<p></code>
</ul>
</ol>
<ul>
<li><strong>SEVERE: The scratchDir you specified: [folder_path] is unusable. </strong></li>
</ul>
<ul>
<ul>
<li>Sidenote: took me 2 days to figure out why this was happening (X_x)</li>
<li>Based from the Catalina logs, the folders under <em>webapps</em> was not accessible by tomcat5.</li>
<li>Now looking under all processes running ( ps command ), most bootup services were running under root (mysql, apache, etc ) but tomcat5 was not.</li>
<li>If I start tomcat5 when I logged into the console as root, the problem disappears. This lead me to believe this might have been the Tomcat5 user was not given the correct privileges.</li>
<li><strong>Work-around 1:</strong> Elevate Tomcat5 user to root access level.</li>
<li><strong>Work-around 2: </strong>Go to <em><strong>/etc/init.d/ </strong></em>and open <strong>Tomcat5.5</strong> under any text editor ( I used vim ). Locate the line <strong>TOMCAT5_USER=tomcat55</strong> and change it to <strong>TOMCAT5_USER=<em>root</em></strong> . Restart your server or you can also execute the restart command for <em><strong>Tomcat5.5</strong></em> in <strong><em>init.d</em></strong> folder</li>
</ul>
</ul>
<p><span style="color: #000000" />sources:</p>
<ul>
<li><a target="_blank" href="http://wiki.oss-watch.ac.uk/UbuntuDapper/Remaster">Ubuntu/Drapper Remaster</a></li>
<li><a target="_blank" href="http://www.linuxjournal.com/article/4576">linux journal</a></li>
<li><a target="_blank" href="http://doc.gwos.org/index.php/Install_tomcat_5.5">Ubuntu Install Tomcat</a></li>
<li><a target="_blank" href="http://www.netadmintools.com/art340.html">Net Admin Tools</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.slickdev.com/2008/09/13/java-5-jdk-and-jakarta-tomcat-55-in-ubuntu-server-installation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

