<?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>lejnieks &#187; Server</title>
	<atom:link href="http://www.lejnieks.com/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lejnieks.com</link>
	<description></description>
	<lastBuildDate>Fri, 29 Jan 2010 19:22:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Shell Bash History</title>
		<link>http://www.lejnieks.com/2009/02/27/shell-bash-history/</link>
		<comments>http://www.lejnieks.com/2009/02/27/shell-bash-history/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 20:53:17 +0000</pubDate>
		<dc:creator>klejnieks</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://lejnieks.com/?p=57</guid>
		<description><![CDATA[Every want to recall something you did / wrote in your terminal months ago. I have configured a few servers in my day and through the that time I try to be good and document my steps but every now and again I go off on a testing spree and try a few things, get [...]]]></description>
			<content:encoded><![CDATA[<p>Every want to recall something you did / wrote in your terminal months ago. I have configured a few servers in my day and through the that time I try to be good and document my steps but every now and again I go off on a testing spree and try a few things, get something working and shift focus and forget about documenting what made it work.</p>
<p>I didnt realize until only recently that everything you type into you terminal window gets logged. So if you ever want to recall your previous bash scripts open your terminal and simply type</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">history</span></pre></div></div>

<p>Which will return the log dump of your bash history, every command you have ever typed. Great if you cant remember exactly which vnc server you installed last year to get a headless server running flex unit or whatever may have slipped your mind. Test</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejnieks.com/2009/02/27/shell-bash-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing LAMP on a clean Ubuntu server</title>
		<link>http://www.lejnieks.com/2009/02/17/installing-lamp-on-a-clean-ubuntu-server/</link>
		<comments>http://www.lejnieks.com/2009/02/17/installing-lamp-on-a-clean-ubuntu-server/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 04:53:45 +0000</pubDate>
		<dc:creator>klejnieks</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://lejnieks.com/?p=55</guid>
		<description><![CDATA[I recently just setup a clean Ubuntu server, I&#8217;m going to use this box for my dedicated CI machine and repository. To prepare this box for being a Continuous Integration machine I need to do a few things first including getting it to be accessible to the web. This post walks through getting a clean [...]]]></description>
			<content:encoded><![CDATA[<p>I recently just setup a clean <a title="Ubuntu" href="http://ubuntu.com" target="_blank">Ubuntu</a> server, I&#8217;m going to use this box for my dedicated CI machine and repository. To prepare this box for being a Continuous Integration machine I need to do a few things first including getting it to be accessible to the web. This post walks through getting a clean Ubuntu server setup with LAMP.</p>
<p><span id="more-55"></span>First thing your going to want to do on a fresh install is update your repository sources list otherwise your box is pretty much useless.</p>
<p><strong>Update Sources List</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update</pre></div></div>

<p>Now your repository is updated and ready for installs</p>
<p><strong>Install LAMP</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libapache2-mod-php5
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-server</pre></div></div>

<p>If / when prompted set your mysql root password. Next edit bind-address in /etc/mysql/my.cnf and replacing its value (127.0.0.1) by your IP address</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>my.cnf</pre></div></div>

<p><strong>Install phpMyAdmin</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libapache2-mod-auth-mysql php5-mysql phpmyadmin</pre></div></div>

<p>Now edit the apache2 configuration file to include phpMyAdmin</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>apache2.conf</pre></div></div>

<p>At the end of the file add the following two lines</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Include phpmyadmin configuration</span>
Include <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>phpmyadmin<span style="color: #000000; font-weight: bold;">/</span>apache.conf</pre></div></div>

<p>For good measure restart apache</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>Now lets get phpMyAdmin to work with php5</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-mysql mysql-client</pre></div></div>

<p>You&#8217;r going to need to add the following line to the php.ini file &#8220;extensions=mysql.so&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>php.ini
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>Now that your done, make sure you chmod your web directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> 0777 <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www <span style="color: #660033;">-R</span></pre></div></div>

<p><strong>original sources</strong><br />
<a href="http://www.howtogeek.com/howto/ubuntu/installing-php5-and-apache-on-ubuntu/">http://www.howtogeek.com/howto/ubuntu/installing-php5-and-apache-on-ubuntu/</a><br />
<a href="http://joeabiraad.com/linuxunix/installing-lamp-on-ubuntu-710-linuxapachemysqlphp/100">http://joeabiraad.com/linuxunix/installing-lamp-on-ubuntu-710-linuxapachemysqlphp/100</a><br />
<a href="https://help.ubuntu.com/community/ApacheMySQLPHP">https://help.ubuntu.com/community/ApacheMySQLPHP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejnieks.com/2009/02/17/installing-lamp-on-a-clean-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Tomcat on CentOS</title>
		<link>http://www.lejnieks.com/2008/11/17/installing-tomcat-on-centos/</link>
		<comments>http://www.lejnieks.com/2008/11/17/installing-tomcat-on-centos/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 05:27:26 +0000</pubDate>
		<dc:creator>klejnieks</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Yum]]></category>

		<guid isPermaLink="false">http://lejnieks.com/?p=52</guid>
		<description><![CDATA[Continuing in setting up my CentOS server, the next thing I need is to get Hudson setup. Before I can get Hudson up and running I&#8217;ll need to get Tomcat installed. I could of course use Winstone which will get me up and running, but I know I will need Tomcat soon for some other [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing in setting up my CentOS server, the next thing I need is to get Hudson setup. Before I can get Hudson up and running I&#8217;ll need to get Tomcat installed. I could of course use <a href="http://winstone.sourceforge.net/">Winstone</a> which will get me up and running, but I know I will need Tomcat soon for some other things as well so might as well get it setup now.</p>
<p><span id="more-52"></span></p>
<p><strong>The Setup</strong></p>
<p>Install some base packages</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># yum install rpm-build gcc-java</span></pre></div></div>

<p>Add jpackage repository to your yum repos</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd /etc/yum.repos.d/</span>
<span style="color: #666666; font-style: italic;"># wget https://jpackage.org/jpackage.repo</span>
<span style="color: #666666; font-style: italic;"># vi /etc/yum.repos.d/jpackage.repo</span></pre></div></div>

<p>set enabled = 1 on all repo files and save the .repo file. Next update yum.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># yum update</span></pre></div></div>

<p>Download and install some SRPMs.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd /usr/local/src</span>
<span style="color: #666666; font-style: italic;"># wget ftp://jpackage.hmdc.harvard.edu/mirrors/JPackage/1.7/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.11-1jpp.nosrc.rpm</span>
<span style="color: #666666; font-style: italic;"># wget ftp://jpackage.hmdc.harvard.edu/mirrors/JPackage/1.6/generic/non-free/SRPMS/jta-1.0.1-0.b.4jpp.nosrc.rpm</span></pre></div></div>

<p>Download some required files to /usr/src/redhat/SOURCES:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd /usr/src/redhat/SOURCES</span></pre></div></div>

<p>Download jta-1_0_1B-classes.zip here after agreeing to the license.<br />
Download jdk-1_5_0_11-linux-i586.bin, again after agreeing to a license.<br />
Build and install the rpms.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># rpmbuild --rebuild /usr/local/src/java-1.5.0-sun-1.5.0.11-1jpp.nosrc.rpm</span>
<span style="color: #666666; font-style: italic;"># rpm -ivh /usr/src/redhat/RPMS/i586/java-1.5.0-sun-1.5.0-11-1jpp.i586.rpm</span>
<span style="color: #666666; font-style: italic;"># rpm -ivh /usr/src/redhat/RPMS/i586/java-1.5.0-sun-devel-1.5.0.11-1jpp.i586.rpm</span>
<span style="color: #666666; font-style: italic;"># rpmbuild --rebuild --without javadoc /usr/local/src/jta-1.0.1-0.b.4jpp.nosrc.rpm</span>
<span style="color: #666666; font-style: italic;"># rpm -ivh /usr/src/redhat/RPMS/noarch/jta-1.0.1-0.b.4jpp.noarch.rpm</span></pre></div></div>

<p>Now install tomcat</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># yum install tomcat5 tomcat5-webapps tomcat5-admin-webapps</span></pre></div></div>

<p>note: if you get a dependency error at this point, like I did at first, try this solution for updating your jpackage-utils <a href="http://blog.sixsigns.com/2008/07/11/java-142-gcj-compati386-update-problem-on-centos/">http://blog.sixsigns.com/2008/07/11/java-142-gcj-compati386-update-problem-on-centos/</a> which basically is to install the <a href="http://dev.centos.org/centos/5/testing/i386/RPMS/jpackage-utils-1.7.5-1jpp.1.el5.centos.noarch.rpm">http://dev.centos.org/centos/5/testing/i386/RPMS/jpackage-utils-1.7.5-1jpp.1.el5.centos.noarch.rpm</a> package and update yum</p>
<p>At this point you should be able to navigate to your ip on port 8080 and see the default tomcat page</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejnieks.com/2008/11/17/installing-tomcat-on-centos/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting up a CentOS server</title>
		<link>http://www.lejnieks.com/2008/11/17/setting-up-a-centos-server/</link>
		<comments>http://www.lejnieks.com/2008/11/17/setting-up-a-centos-server/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 05:14:49 +0000</pubDate>
		<dc:creator>klejnieks</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Webmin]]></category>

		<guid isPermaLink="false">http://lejnieks.com/?p=51</guid>
		<description><![CDATA[More recently I have been having some issues with Plesk, I&#8217;ve felt like I&#8217;ve been fighting with Plesk&#8217;s default generic templates and cookie cutter processes. What should be simple such as adding custom wars to Tomcat end up proving more times then not to be a royal pain. This passed month I ended up playing [...]]]></description>
			<content:encoded><![CDATA[<p>More recently I have been having some issues with Plesk, I&#8217;ve felt like I&#8217;ve been fighting with Plesk&#8217;s default generic templates and cookie cutter processes. What should be simple such as adding custom wars to Tomcat end up proving more times then not to be a royal pain. This passed month I ended up playing around with <a href="https://hudson.dev.java.net/">Hudson</a>, a Continous Integration server, and I found myself struggling through what should have been a seamless installation. Basically it took me 10 minutes to setup, install, and configure my first build in Hudson on my Mac but to be honest I ended up giving up after 3 days of struggling to get Hudson installed on my dedicated CentOS server that ran Plesk. Dont get me wrong, there are plenty of other things that bug me about Plesk but this latest thing was what ended up pushing me to get a basic server setup from scratch and configured exactly as I wanted it.</p>
<p><span id="more-51"></span></p>
<p>With that said, I would be remiss if I didn&#8217;t also mention that fact that, while I have some issue with plesk and its somewhat cookie cutter approach to web administration, it still is a great web administration tool for the most part.</p>
<p>My goal is basically to get a bare server up and running and administer-able without using Plesk or CPanel. The more I play around with this setup the more I will update the server section of this site with new configurations and additions as I learn them.</p>
<p><strong>Setting up a fresh CentOS server</strong></p>
<ol>
<li>Get a dedicated server from someone, I used <a href="http://aplus.net">aplus.net</a></li>
<li>Choose a basic installation, this means no plesk, cpanel etc&#8230; (keep in mind, eventually we will setup Webmin)</li>
<li>Start setting up your new box</li>
</ol>
<p><strong>The setup</strong><br />
shell into you server</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ssh root@111.111.11.111</span></pre></div></div>

<p>Install LAMP (Linux Apache MySQL PHP) installed.<br />
You will do this using <a href="http://en.wikipedia.org/wiki/Yellow_dog_Updater,_Modified">yum</a>. Yum is an rpm wrapper that will allow you to install various services and applications with a lot more ease.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># yum -y install httpd</span>
<span style="color: #666666; font-style: italic;"># yum -y install php</span>
<span style="color: #666666; font-style: italic;"># yum -y install mysql</span>
<span style="color: #666666; font-style: italic;"># yum -y install mysql-server</span>
<span style="color: #666666; font-style: italic;"># yum -y install php-mysql</span></pre></div></div>

<p><em>note: the -y switch forces &#8220;yes&#8221; when prompted, so you don&#8217;t have to</em></p>
<p>Next configure the services you just installed to start automatically when the server restarts</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /sbin/chkconfig httpd on</span>
<span style="color: #666666; font-style: italic;"># /sbin/chkconfig --add mysqld</span>
<span style="color: #666666; font-style: italic;"># /sbin/chkconfig mysqld on</span>
<span style="color: #666666; font-style: italic;"># /sbin/service httpd start</span>
<span style="color: #666666; font-style: italic;"># /sbin/service mysqld start</span></pre></div></div>

<p>At this point, you now have mysql installed, but you will want to set up the mysql database root password. Without a password, any user on the box can login to mysql as database root. The mysql root account is a separate password from the machine root account.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mysqladmin -u root password 'new-password'</span></pre></div></div>

<p>At this point, some of you may be able to navigate to your public ip address and see the default CentOS page, I was not able to see this. Basically at this point, what I had was LAMP installed on my shiny new server but no one would ever know because port 80 was blocked.</p>
<p><strong>Enter iptables.</strong>..<br />
Iptables is your firewall, its baked into CentOS, and its extremely powerful. I don&#8217;t know the complete depth of iptables but for this tutorial you&#8217;ll need to just get a few ports opened up and that&#8217;s it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># iptables -F</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -p udp -m udp --dport domain -j ACCEPT</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -p tcp --dport 22 -j ACCEPT</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -p tcp --dport 10000 -j ACCEPT</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -p tcp --dport 25 -j ACCEPT</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -p tcp --dport 8080 -j ACCEPT</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -p tcp --dport 80 -j ACCEPT</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -p tcp -m tcp --dport domain -j ACCEPT</span>
<span style="color: #666666; font-style: italic;"># iptables -A FORWARD -o eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_OUT:</span>
<span style="color: #666666; font-style: italic;"># iptables -A FORWARD -i eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_IN:</span>
<span style="color: #666666; font-style: italic;"># iptables -A OUTPUT -o eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_OUT:</span>
<span style="color: #666666; font-style: italic;"># iptables -A INPUT -i eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_IN:</span></pre></div></div>

<p>make sure you save your iptables configuration so you don&#8217;t have to re-edit it when you reboot your server</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /sbin/service iptables save</span></pre></div></div>

<p>now just restart your firewall</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/init.d/iptables restart</span></pre></div></div>

<p>now you can check your configuration</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># iptables -L -v</span></pre></div></div>

<p>at this point, for good measure you might want to reboot your server</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># reboot</span></pre></div></div>

<p>once your server reboots you should now be able to browse to your public IP address and get the default CentOS page.</p>
<p>you can learn more about iptables here: <a href="http://wiki.centos.org/HowTos/Network/IPTables">http://wiki.centos.org/HowTos/Network/IPTables</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejnieks.com/2008/11/17/setting-up-a-centos-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Subversion on CentOS with Plesk</title>
		<link>http://www.lejnieks.com/2008/07/05/installing-subversion-on-centos-with-plesk/</link>
		<comments>http://www.lejnieks.com/2008/07/05/installing-subversion-on-centos-with-plesk/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 20:28:25 +0000</pubDate>
		<dc:creator>klejnieks</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[CruiseControl]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://lejnieks.com/?p=18</guid>
		<description><![CDATA[Just a quick walk through on installing subversion on a CentOS server running Plesk. What your going to want to grab is a fresh copy of YUM to handle the installation of subversion. YUM ( Yellow dog Updater, Modified) is &#8220;&#8230; an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick walk through on installing <a href="http://subversion.tigris.org/">subversion</a> on a CentOS server running Plesk. What your going to want to grab is a fresh copy of YUM to handle the installation of subversion. <a href="http://linux.duke.edu/projects/yum/">YUM</a> ( Yellow dog Updater, Modified) is &#8220;&#8230; an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm&#8230;&#8221;</p>
<p><span id="more-18"></span></p>
<p>First thing your going to want to do is grab a copy of YUM if you don&#8217;t already had it installed, you can check to see if you have YUM installed by typing #yum in your terminal, if you see something like <em>&#8220;Loading &#8220;installonlyn&#8221; plugin&#8221;</em> then you have yum installed and then just skip this step, if you see something like <em>&#8220;-bash: yum: command not found&#8221;</em> then your going to need to install yum. Start by creating an install directory</p>
<p><strong>Step 1. </strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#mkdir /usr/local/src/yum</span>
<span style="color: #666666; font-style: italic;">#cd /usr/local/src/yum</span></pre></div></div>

<p>next download the yum rpm</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#wget http://mirror.centos.org/centos/4/apt/i386/RPMS.os/yum-2.4.3-3.el4.centos.noarch.rpm</span></pre></div></div>

<p>now install yum</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#rpm -Uvh *rpm</span></pre></div></div>

<p>finally update your yum</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#yum -y update</span></pre></div></div>

<p>If you want to clean up after yourself, you can delete the install directory you created at the begining of this step by</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#rm -rf /usr/local/src/yum</span></pre></div></div>

<p>now your ready to install Subversion</p>
<p><strong>Step 2. </strong></p>
<p>Install Subversion</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#yum -y install subversion</span></pre></div></div>

<p>Done! you can test subversion is successfully installed by typing #svnadmin in your console, you should see something like <em>&#8220;Type &#8216;svnadmin help&#8217; for usage.&#8221;</em></p>
<p><strong>Step 3. </strong>Now your going to want to configure subversion to work with plesk. I like to keep things separate, so I run my subversion server through a subdomain http://svn.domain.com so this part will walk you through configuring subversion in a subdomain.</p>
<p>Your going to want to make sure thatmod_dav_svn.so is being loaded into your http.conf, to do this type</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#vi /etc/httpd/conf/httpd.conf</span></pre></div></div>

<p>search for &#8220;mod_dav_svn.so&#8221; in your LoadModules section</p>
<p>my httpd.conf file has the following lines which you can copy and paste into yours</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LoadModule dav_module modules<span style="color: #000000; font-weight: bold;">/</span>mod_dav.so
&nbsp;
LoadModule dav_svn_module modules<span style="color: #000000; font-weight: bold;">/</span>mod_dav_svn.so
&nbsp;
LoadModule authz_svn_module modules<span style="color: #000000; font-weight: bold;">/</span>mod_authz_svn.so</pre></div></div>

<p>once you have done this, save the httpd.conf file [esc + w + q (escape, write, quit)]</p>
<p><strong>Step 4</strong><br />
Next your going to want to create your central repository, lets put it in the /var/www directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>repository</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svnadmin</span> create <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>repository</pre></div></div>

<p>note, if you choose not to place your repository in this directory, you may run into an issue I came across where my repositories were not configured for the web, and although the authentication windows would display and svn was running correctly, the web browser wouldn&#8217;t show the repos correctly.</p>
<p>After a lot of testing and not getting it to work i read this post: <a href="http://www.svnforum.org/2017/viewtopic.php?t=372&amp;postdays=0&amp;postorder=asc&amp;start=15">http://www.svnforum.org/2017/viewtopic.php?t=372&amp;postdays=0&amp;postorder=asc&amp;start=15</a> and it basically said that if your running centos or rehl then there is a known issue on some configurations that causes svn over http not to work due to permissions. this is fixed by putting your repository in the /var/www directory. so my repo is now in /var/www/repository and that worked, this is why I suggested putting the repository in this directory&#8217;</p>
<p>now you have a working subversion repository you can start using, but it isn&#8217;t accessible to web users yet.</p>
<p><strong>Step 5</strong><br />
Now since plesk will rewrite the main site configuration files every time you use plesk your going to want to write a configuration file in your vhost conf folder</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#vi /var/www/vhosts/[you_domain_name]/subdomains/[you_subdomain_name]/conf/vhost.conf</span></pre></div></div>

<p>This vhost file will automatically be included in apache&#8217;s httpd.conf file. The vhost.conf file will contain the instructions for you subdomain to map to your svn repository.</p>
<p>Edit your vhost.conf file to contain the location of your svn files as shown below</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #666666; font-style: italic;">#svn.yourdomain.com -- vhost.conf file</span>
Location <span style="color: #000000; font-weight: bold;">/</span>
DAV <span style="color: #c20cb9; font-weight: bold;">svn</span>
&nbsp;
SVNPath <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>repository
AuthType Basic
&nbsp;
AuthName <span style="color: #ff0000;">&quot;Subversion Repository&quot;</span>
&nbsp;
AuthUserFile <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>svn-auth-file
Require valid-user
<span style="color: #000000; font-weight: bold;">/</span>Location</pre></div></div>

<p>Save your changes. Now you&#8217;ll want to add a valid user to this repository by typing</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#htpasswd -c /etc/svn-auth-file my_user_name</span></pre></div></div>

<p>whenever you make a change to your vhost files your going to want to restart apache using</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>httpd restart</pre></div></div>

<p>and there you go&#8230; now you should be able to browse to your subdomain and use your repository on your CentOS box running Plesk.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejnieks.com/2008/07/05/installing-subversion-on-centos-with-plesk/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Dreamhost 4 days down and running&#8230;</title>
		<link>http://www.lejnieks.com/2008/03/27/dreamhost-server-down/</link>
		<comments>http://www.lejnieks.com/2008/03/27/dreamhost-server-down/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 02:11:50 +0000</pubDate>
		<dc:creator>klejnieks</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://lejnieks.com/?p=7</guid>
		<description><![CDATA[The short of of the long is this, I switched my server last week to dreamhost after hearing so many good things about their services. I have a few colleagues who are on their systems who raved about them, and well, i was drawn into it. So&#8230; made my payment, switched my dns, let it [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-8" href="http://lejnieks.com/2008/03/dreamhost-server-down/picture-15/"><img class="alignleft size-thumbnail wp-image-8" title="Dreamhost Server Down" src="http://lejnieks.com/wp-content/picture-15-150x150.png" alt="" width="150" height="150" /></a>The short of of the long is this, I switched my server last week to <a href="http://dreamhost.com" target="_blank">dreamhost</a> after hearing so many good things about their services. I have a few colleagues who are on their systems who raved about them, and well, i was drawn into it. So&#8230; made my payment, switched my dns, let it all propagate through, woke up next morning to find out that dreamhosts main file server has been down for over 1 week and because of this my website, email, and ftp were now all down too.</p>
<p><span id="more-7"></span></p>
<p>I understand downed systems are somewhat common place in this industry and inevitable, and I have been down this path many of times before. What surprises me, though, is that I ended up getting sold a service which was already down&#8230; They sold me a server that was crashed, down, broken, ruined. Ok, well again these things happen&#8230; so fix it, right?</p>
<p>Well thats where this all becomes a much more infuriating issue. It has been 1 week, the service is still down, and i have not heard back from anyone at Google nor <a href="http://dreamhost.com">Dreamhost</a>, no refund, no support, no response, no service.</p>
<p>you can watch the events unfold <a href="http://www.dreamhoststatus.com/2008/03/25/problem-with-central-services-panelwebmail-etc/" target="_blank">here</a></p>
<p><a rel="attachment wp-att-8" href="http://lejnieks.com/2008/03/dreamhost-server-down/picture-15/"><br />
</a></p>
<p>For those of you looking to move to dreamhost I strongly suggest against it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejnieks.com/2008/03/27/dreamhost-server-down/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
