<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Webbynode Howtos: Recent Posts</title>
<link>http://howto.webbynode.com/</link>
<description>Articles to Manage your Webby</description>
<language>en</language>
<pubDate>Thu, 29 Jul 2010 21:21:16 +0000</pubDate>

<item>
<title><a target='_blank' rel='nofollow' href='http://ddlwarez.info/'>haseeb</a> on "CentOS 5 - Remote Desktop"</title>
<link>http://howto.webbynode.com/topic.php?id=18#post-614</link>
<pubDate>Thu, 29 Jul 2010 05:22:36 +0000</pubDate>
<dc:creator><a target='_blank' rel='nofollow' href='http://ddlwarez.info/'>haseeb</a></dc:creator>
<guid isPermaLink="false">614@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;awesome guide ....everything was installed....thank you very much...
&#60;/p&#62;</description>
</item>
<item>
<title>J on "Ubuntu Hardy - Multiple Rails Apps with Passenger"</title>
<link>http://howto.webbynode.com/topic.php?id=5#post-613</link>
<pubDate>Tue, 01 Jun 2010 20:23:03 +0000</pubDate>
<dc:creator>J</dc:creator>
<guid isPermaLink="false">613@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Very helpful article! Managed to get Ruby and RoR up and running in an evening. Thank you!
&#60;/p&#62;</description>
</item>
<item>
<title><a target='_blank' rel='nofollow' href='http://www.ar-sa.net/'>د.عبدالمجيد الحجي</a> on "CentOS 5 - Remote Desktop"</title>
<link>http://howto.webbynode.com/topic.php?id=18#post-612</link>
<pubDate>Sat, 15 May 2010 00:21:24 +0000</pubDate>
<dc:creator><a target='_blank' rel='nofollow' href='http://www.ar-sa.net/'>د.عبدالمجيد الحجي</a></dc:creator>
<guid isPermaLink="false">612@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;The trial was successful and the program being developed for the better ...&#60;/p&#62;
&#60;p&#62;Best greeting me to you&#60;/p&#62;
&#60;p&#62;dr.Abdo AL-Mjed AL-Hejje&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;mailto:admin@ar-sa.net&#34;&#62;admin@ar-sa.net&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title><a target='_blank' rel='nofollow' href='http://google.com'>G</a> on "CentOS 5 - Remote Desktop"</title>
<link>http://howto.webbynode.com/topic.php?id=18#post-611</link>
<pubDate>Sun, 28 Feb 2010 07:55:53 +0000</pubDate>
<dc:creator><a target='_blank' rel='nofollow' href='http://google.com'>G</a></dc:creator>
<guid isPermaLink="false">611@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;&#60;a href=&#34;http://i50.tinypic.com/91b5ti.png&#34; rel=&#34;nofollow&#34;&#62;http://i50.tinypic.com/91b5ti.png&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Getting this error while installing GNOME :/&#60;/p&#62;
&#60;p&#62;I tried installing KDE, everything went fine. But when i connect using TightVNC it doesnt shows any desktop. I used kde-session &#38;amp; for KDE.&#60;/p&#62;
&#60;p&#62;?
&#60;/p&#62;</description>
</item>
<item>
<title>Nevo on "CentOS 5 - Remote Desktop"</title>
<link>http://howto.webbynode.com/topic.php?id=18#post-610</link>
<pubDate>Thu, 18 Feb 2010 12:48:38 +0000</pubDate>
<dc:creator>Nevo</dc:creator>
<guid isPermaLink="false">610@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Thanks for writing this Article. It guided me in the right direction. Everything works super and i was able to connect to my CentOs without any problems! :D
&#60;/p&#62;</description>
</item>
<item>
<title><a target='_blank' rel='nofollow' href='http://potpolitics.com'>John Sullivan</a> on "Ruby on Rails - Ubuntu Hardy"</title>
<link>http://howto.webbynode.com/topic.php?id=6#post-609</link>
<pubDate>Sat, 06 Feb 2010 10:01:51 +0000</pubDate>
<dc:creator><a target='_blank' rel='nofollow' href='http://potpolitics.com'>John Sullivan</a></dc:creator>
<guid isPermaLink="false">609@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Excellent :) I'm just a regular Goof blogger bored so I wanted to take a more serious look at learning Rails so I will tease my friends and say&#60;br /&#62;
Oh Hey you wanted to set up Rails ? There you go :)&#60;br /&#62;
Now let me re read this about 5 times Thanks
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "CentOS 5 - Remote Desktop"</title>
<link>http://howto.webbynode.com/topic.php?id=18#post-608</link>
<pubDate>Sat, 28 Nov 2009 02:26:52 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">608@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Thanks dude&#60;/p&#62;
&#60;p&#62;This looks sweet&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://i46.tinypic.com/35ji39f.jpg&#34; rel=&#34;nofollow&#34;&#62;http://i46.tinypic.com/35ji39f.jpg&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title><a target='_blank' rel='nofollow' href='http://www.seatacsupport.com'>James Hambleton</a> on "CentOS 5 - Remote Desktop"</title>
<link>http://howto.webbynode.com/topic.php?id=18#post-607</link>
<pubDate>Mon, 23 Nov 2009 05:31:44 +0000</pubDate>
<dc:creator><a target='_blank' rel='nofollow' href='http://www.seatacsupport.com'>James Hambleton</a></dc:creator>
<guid isPermaLink="false">607@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Everything worked like a charm except I can not click in to or key into the VNC session open desktop. I can see the desktop, but I can not do anything with it ? I have the firewall turn off on my Windows workstation (source) as well as my CentOS 5.4 server (destination)&#60;/p&#62;
&#60;p&#62;Any idea's  ?&#60;/p&#62;
&#60;p&#62;Thanks inadvance
&#60;/p&#62;</description>
</item>
<item>
<title><a target='_blank' rel='nofollow' href='http://www.baccaratgirls.com'>London escorts</a> on "Debian Etch - LAMP Server"</title>
<link>http://howto.webbynode.com/topic.php?id=12#post-606</link>
<pubDate>Sat, 21 Nov 2009 14:23:43 +0000</pubDate>
<dc:creator><a target='_blank' rel='nofollow' href='http://www.baccaratgirls.com'>London escorts</a></dc:creator>
<guid isPermaLink="false">606@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Where can I get the info concerning php scripts? In the Internet such docs are VERY large, I need something smaller. Is there any book you can recommend me to read?
&#60;/p&#62;</description>
</item>
<item>
<title>Luca on "CentOS 5 - Remote Desktop"</title>
<link>http://howto.webbynode.com/topic.php?id=18#post-605</link>
<pubDate>Wed, 18 Nov 2009 22:44:34 +0000</pubDate>
<dc:creator>Luca</dc:creator>
<guid isPermaLink="false">605@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Interesting
&#60;/p&#62;</description>
</item>
<item>
<title>astocks on "ReadyStack Deployment with GitHub Integration"</title>
<link>http://howto.webbynode.com/topic.php?id=38#post-61</link>
<pubDate>Tue, 28 Jul 2009 02:47:18 +0000</pubDate>
<dc:creator>astocks</dc:creator>
<guid isPermaLink="false">61@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;So you'd like to be up and running FAST?  Choose a ReadyStack Deployment for quick installation of your base Linux OS, webserver, appserver, Ruby, Rails, and your very own app via GitHub.&#60;/p&#62;
&#60;p&#62;First, let's login to your Webbynode account.  Once logged in you should see the below Webby page that displays your Webbies.  Click on the &#60;strong&#62;Dashboard&#60;/strong&#62; link to get started.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=36'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=36&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Once in the Dashboard view you should see the &#60;strong&#62;Redeploy&#60;/strong&#62; link on the left side.  Keep in mind that you may not see all of the info that you see in the below screenshot if your Webby isn't up and running with an OS.  Click the &#60;strong&#62;Redeploy&#60;/strong&#62; link.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=37'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=37&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Click the ReadyStack image as shown below.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=38'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=38&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Here you can select the type of ReadyStack deployment you'd like to install.  We're going to use the Rails ReadyStack for this tutorial.  Select the Rails radio button and click &#60;strong&#62;Install&#60;/strong&#62;.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=39'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=39&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Next we'll select what type of apps we want to install.  I've selected Passenger w/ Nginx, MySQL, PHPMyAdmin, My GitHub Repo, and New Relic.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=40'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=40&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Now we'll specifiy what application we want to deploy from GitHub.  I've selected Redmine which is a nice Project Management webapp.  I've forked the Redmine project on GitHub to my GitHub repo and added a webby_config.sh script file.  The webby_config.sh file tells ReadyStack how to provision your application.  You can see the one I've used at &#60;a href=&#34;http://bit.ly/PoTpk&#34;&#62;webby_config example&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;I've chosen to go with the default path for the app deployment to /var/rails.  Next we can modify our webserver Document Root and Port if needed.  Choose a password for the root MySQL account.  Remember this password as you'll need it for MySQL administration in the future.  I've selected Ruby 1.8.6 Enterprise Edition and Rails 2.2.2 based on the requirements for Redmine.  I've also chosen to not install RI and RDoc to save space in the install.  &#60;/p&#62;
&#60;p&#62;If you've already set up the New Relic integration from the Dashboard page your API key will be automatically populated.  If you haven't done this and want to use New Relic to monitor your Rails app you can set up New Relic integration and get your own account/API key by using the link &#60;strong&#62;New Relic RPM&#60;/strong&#62; from the Dashboard page where we selected &#60;strong&#62;Redeploy&#60;/strong&#62;.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=41'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=41&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Now that we have our options and configuration submitted you'll see the Redeploy Summary as shown below.  This lists all of your selections for your review.  If everything is correct go ahead and click &#60;strong&#62;Deploy&#60;/strong&#62;.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=42'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=42&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;This screen is &#60;u&#62;YOUR LAST CHANCE TO CHANGE YOUR MIND&#60;/u&#62;.  If you're happy and ready to deploy go ahead and click &#60;strong&#62;OK&#60;/strong&#62;.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=43'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=43&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Your ReadyStack Deployment will begin, and you'll be able to watch the progress of the installation as seen below.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=44'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=44&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Once the installation is complete you'll see the below pop-up.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=45'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=61&amp;bbat=45&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Next you'll see a summary screen outlining the actions performed in your ReadyStack Deployment.  You'll also see links to the URL of your webapp you deployed from GitHub.  If you've included a complete webby_config.sh script file in your GitHub repo then you can now open up a browser and navigate to your Webby.  You should be greeted with your fully operational web application.&#60;/p&#62;
&#60;p&#62;ReadyStacks are a fast and efficient way to get your Rails apps deployed to your Webby.  Less manual installation, and more FUN!&#60;/p&#62;
&#60;p&#62;Check out the &#60;a href=&#34;http://webbynode.com/railsgithubrpm&#34;&#62;ReadyStack Screencast with Rails and GitHub Integration&#60;/a&#62; for a great video on this same topic.
&#60;/p&#62;</description>
</item>
<item>
<title>ATS on "Getting Started With Your New Webby"</title>
<link>http://howto.webbynode.com/topic.php?id=37#post-60</link>
<pubDate>Wed, 22 Jul 2009 02:44:23 +0000</pubDate>
<dc:creator>ATS</dc:creator>
<guid isPermaLink="false">60@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;So you've just received your email with your login information for your brand new Webby!  Below are some things you should do after your first login.&#60;/p&#62;
&#60;p&#62;You'll find the login button at the top right of the Webbynode homepage.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=29'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=29&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=30'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=30&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;After you're logged in you'll see your Webby displayed in the Webby Manager as shown below.  Click on the &#60;u&#62;Dashboard&#60;/u&#62; link shown with the red circle.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=31'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=31&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Now you are looking at the Dashboard for your Webby.  Here you will see lots of critical information including the IP address of your Webby.  On the left side find the link called &#60;u&#62;Root Password&#60;/u&#62;.  This link allows you to reset the root password for your Webby.  The root account is &#60;strong&#62;THE&#60;/strong&#62; superuser account so you'll want to choose a complex password.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=32'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=32&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=33'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=33&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Now that you're changed your root password it's time to SSH into your new Webby and add a username for yourself.  We strongly discourage the use of the root account for everyday use for security reasons.  To SSH into your Webby just open up your favorite terminal.  If you're using a Mac you'd open up Terminal and type:&#60;br /&#62;
&#60;pre&#62;ssh &#60;a href=&#34;mailto:root@xxx.xxx.xxx.xxx&#34;&#62;root@xxx.xxx.xxx.xxx&#60;/a&#62;&#60;/pre&#62;&#60;/p&#62;
&#60;p&#62;...where xxx.xxx.xxx.xxx is the IP address of your Webby.&#60;/p&#62;
&#60;p&#62;This will open an SSH session to your Webby and you'll be prompted for the password for the root account that you just set above.&#60;/p&#62;
&#60;p&#62;Now it's time to add your user.  In the terminal type the below replacing 'webbyuser' with the username you want to add:&#60;/p&#62;
&#60;p&#62;&#60;pre&#62;adduser webbyuser&#60;/pre&#62;&#60;/p&#62;
&#60;p&#62;...you should see something similar to the below.  It may vary a little depending on which OS you've deployed, but they'll all be similar.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=34'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=34&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;Now you have a new user that you can use for your everyday activities on your Webby.  Of course many things will require you to have root privileges so let's get your new user added to the sudoers file.  This will let you use the sudo command to temporarily run commands as root under your normal username.  We're going to edit the sudoers file by typing:&#60;/p&#62;
&#60;p&#62;&#60;pre&#62;nano /etc/sudoers&#60;/pre&#62;&#60;/p&#62;
&#60;p&#62;...you're going to want to add your new username to the end of the file as in the picture below.&#60;/p&#62;
&#60;p&#62; &lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=35'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=60&amp;bbat=35&amp;inline' /&gt;&lt;/a&gt;&#60;/p&#62;
&#60;p&#62;...now just save and exit nano.  You're all set to start using your new Webby!  If you'd like to take security a step further please see the Howto docs on Security and Hardening posted by cartab.
&#60;/p&#62;</description>
</item>
<item>
<title>almonteb on "Webby DNS Manager"</title>
<link>http://howto.webbynode.com/topic.php?id=30#post-53</link>
<pubDate>Mon, 20 Jul 2009 23:58:59 +0000</pubDate>
<dc:creator>almonteb</dc:creator>
<guid isPermaLink="false">53@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;&#60;strong&#62;WebbyDNS Manager&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;This guide will walk you through setting up your DNS records and reverse DNS via the Webby Manager.&#60;/p&#62;
&#60;p&#62;To begin, select the DNS tab after logging into &#60;a href=&#34;https://manager.webbynode.com/&#34;&#62;https://manager.webbynode.com/&#60;/a&#62;&#60;br /&#62;
&lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=8'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=8&amp;inline' /&gt;&lt;/a&gt;&#60;br /&#62;
From here, you can add domains, records and reverse dns information. &#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Adding a domain&#60;/strong&#62;&#60;br /&#62;
To add a domain, select New zone from the main DNS page in your account. Enter your domain name, in this tutorial, we’ll use &#60;em&#62;example.com&#60;/em&#62;.&#60;br /&#62;
&lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=9'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=9&amp;inline' /&gt;&lt;/a&gt;&#60;br /&#62;
When completed, select &#60;em&#62;Save zone&#60;/em&#62; and your domain will be added to the Webbynode name servers. You will then be taken back to the main dns management page.&#60;br /&#62;
&lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=10'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=10&amp;inline' /&gt;&lt;/a&gt;&#60;br /&#62;
&#60;strong&#62;NOTE&#60;/strong&#62;: In order for you to use our DNS management interface, you &#60;strong&#62;must&#60;/strong&#62; add our name servers to your domain via your registrar. (&#60;em&#62;ns1.dnswebby.com&#60;/em&#62; / &#60;em&#62;ns2.dnswebby.com&#60;/em&#62;)&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Adding records&#60;/strong&#62;&#60;br /&#62;
Select your domain from the DNS manager by choosing records. If you just added your domain, you will have no records currently setup.&#60;br /&#62;
&lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=11'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=11&amp;inline' /&gt;&lt;/a&gt;&#60;br /&#62;
If you’re using Google Apps Mail feature, you can simply click &#60;em&#62;Add Gmail records&#60;/em&#62; and your dns will automatically be configured for you.&#60;br /&#62;
&lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=12'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=12&amp;inline' /&gt;&lt;/a&gt;&#60;br /&#62;
To add other records simply choose &#60;em&#62;New record&#60;/em&#62;. From there, you may add the following types of records:&#60;br /&#62;
•	&#60;strong&#62;A&#60;/strong&#62; – Address&#60;br /&#62;
•	&#60;strong&#62;AAAA&#60;/strong&#62; – IPV6 Address&#60;br /&#62;
•	&#60;strong&#62;CNAME&#60;/strong&#62; – Canonical name record (alias)&#60;br /&#62;
•	&#60;strong&#62;HINFO&#60;/strong&#62; – System information&#60;br /&#62;
•	&#60;strong&#62;MX&#60;/strong&#62; – Mail exchange&#60;br /&#62;
•	&#60;strong&#62;NS&#60;/strong&#62; – Name server&#60;br /&#62;
•	&#60;strong&#62;PTR&#60;/strong&#62; - Pointer&#60;br /&#62;
•	&#60;strong&#62;RP&#60;/strong&#62; – Responsible person&#60;br /&#62;
•	&#60;strong&#62;SRV&#60;/strong&#62; – Service locator&#60;br /&#62;
•	&#60;strong&#62;TXT&#60;/strong&#62; - Text&#60;br /&#62;
Here is an example of an Address record for the root of your domain.&#60;br /&#62;
&lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=13'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=13&amp;inline' /&gt;&lt;/a&gt;&#60;br /&#62;
You may add as many DNS records as you like to each domain.&#60;/p&#62;
&#60;p&#62;NOTE: When adding an MX record, the &#60;em&#62;auxiliary data&#60;/em&#62; field is the &#60;em&#62;MX priority&#60;/em&#62;.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Reverse DNS&#60;/strong&#62;&#60;br /&#62;
Select the &#60;em&#62;Reverse DNS&#60;/em&#62; option from the Webby DNS manager. Each of your public IPs will be able to have a record. Just put the name you would like under &#60;em&#62;RDNS Entry&#60;/em&#62;. &#60;/p&#62;
&#60;p&#62;&lt;a class='bb_attachments_link' href='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=14'&gt;&lt;img  src='http://howto.webbynode.com/?bb_attachments=53&amp;bbat=14&amp;inline' /&gt;&lt;/a&gt;&#60;br /&#62;
NOTE: Each &#60;em&#62;RDNS Entry&#60;/em&#62; must have a corresponding “A” (Address) record set on the domain pointing to the IP address it links to.
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "New Relic RPM - Manual Installation"</title>
<link>http://howto.webbynode.com/topic.php?id=29#post-52</link>
<pubDate>Sat, 04 Jul 2009 08:45:29 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">52@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;In order to manually install the New Relic RPM plugin, follow these instructions.&#60;/p&#62;
&#60;p&#62;Typing the following command from your Rails application's home directory:&#60;br /&#62;
&#60;pre&#62;script/plugin install &#60;a href=&#34;http://svn.newrelic.com/rpm/agent/newrelic_rpm&#34; rel=&#34;nofollow&#34;&#62;http://svn.newrelic.com/rpm/agent/newrelic_rpm&#60;/a&#62;&#60;/pre&#62;&#60;/p&#62;
&#60;p&#62;The newrelic agent plugin creates a default copy of &#60;strong&#62;newrelic.yml&#60;/strong&#62; in your config directory, you &#60;u&#62;&#60;strong&#62;MUST&#60;/strong&#62;&#60;/u&#62; edit this file and add your actual RPM account's activation key code.&#60;/p&#62;
&#60;p&#62;Restart your Rails application.&#60;/p&#62;
&#60;p&#62;Visit your Webby's RPM section to see your app's performance data. Your data should be visible in 2 minutes.
&#60;/p&#62;</description>
</item>
<item>
<title>fcoury on "Webbynode API Guide (PDF)"</title>
<link>http://howto.webbynode.com/topic.php?id=25#post-31</link>
<pubDate>Thu, 18 Jun 2009 17:14:04 +0000</pubDate>
<dc:creator>fcoury</dc:creator>
<guid isPermaLink="false">31@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Webbynode API Guide&#60;/p&#62;
&#60;p&#62;This guide is based on the Release Candidate 2 version of our API. During this guide we will discuss three different areas that this version provides:&#60;/p&#62;
&#60;p&#62;    * Basic Client information access;&#60;br /&#62;
    * My Webbies list [new];&#60;br /&#62;
    * Webby actions and status;&#60;br /&#62;
    * DNS Zones and Records maintenance.&#60;/p&#62;
&#60;p&#62;Please download the attached PDF.
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Pimping out your command prompt"</title>
<link>http://howto.webbynode.com/topic.php?id=22#post-25</link>
<pubDate>Mon, 15 Jun 2009 04:34:26 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">25@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;If you’ve worked with the Linux shell, you are no doubt familiar with the command prompt. By default, most Linux distros display a bland and boring command prompt with hostname and current directory, such as&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;root: ~ #&#60;/blockquote&#62;&#60;br /&#62;
Customizing the command prompt is easier than most people think. You can change the output to display time, shell version, and even color. In this article we’ll be covering how to make your prompt pimped out and different, as well as useful for day-to-day tasks.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Understanding Prompt&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;The command prompt is set using special variables in the shell. The shell may have up to four different set variables, but the default one for the prompt is usually PS1. To display the default value of PS1, enter:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;echo $PS1&#60;/blockquote&#62;&#60;br /&#62;
The output may look something like:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;\u@\h:\w\$&#60;/blockquote&#62;&#60;br /&#62;
These special characters can be roughly translated as &#60;a href=&#34;mailto:user@hostname:workingdir.&#34;&#62;user@hostname:workingdir.&#60;/a&#62; Modifying the prompt is an easy task of assigning a new value to the PS1 variable.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;PS1=”changeme:#”&#60;/blockquote&#62;&#60;br /&#62;
Now your command prompt should change to reflect the value you gave to the PS1 variable. Let’s set a value that make more sense and serves a bit more purpose. For example, this will display today’s date and hostname:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;PS1=&#34;\d \h: #&#34;&#60;/blockquote&#62;&#60;br /&#62;
Or another common prompt, displays time in 24-hr format, user, hostname, and working folder:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;PS1=&#34;[\t \u@\h \W]$ &#34;&#60;/blockquote&#62;&#60;br /&#62;
You might notice that if you log out of your webby you lose the prompted you assigned to the PS1 variable. To make the changes permanent, you will need to add some code to the end of your shell startup file. In Debian this file is either .bashrc or .bash_profile in the home folder. I have seen it work for both.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano ~/.bash_profile&#60;/blockquote&#62;&#60;br /&#62;
Add the following code to the end of the file:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;export PS1='[\t \u@\h \W]\$ '&#60;/blockquote&#62;&#60;br /&#62;
The new command prompt will now be retained after a logoff or reboot. The following is a list of characters that can be used to make your own shell prompt.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;\a : an ASCII bell character (07)&#60;br /&#62;
\d : the date in &#34;Weekday Month Date&#34; format (e.g., &#34;Tue May 26&#34;)&#60;br /&#62;
\D{format} : the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required&#60;br /&#62;
\e : an ASCII escape character (033)&#60;br /&#62;
\h : the hostname up to the first '.'&#60;br /&#62;
\H : the hostname&#60;br /&#62;
\j : the number of jobs currently managed by the shell&#60;br /&#62;
\l : the basename of the shell’s terminal device name&#60;br /&#62;
\n : newline&#60;br /&#62;
\r : carriage return&#60;br /&#62;
\s : the name of the shell, the basename of $0 (the portion following the final slash)&#60;br /&#62;
\t : the current time in 24-hour HH:MM:SS format&#60;br /&#62;
\T : the current time in 12-hour HH:MM:SS format&#60;br /&#62;
\@ : the current time in 12-hour am/pm format&#60;br /&#62;
\A : the current time in 24-hour HH:MM format&#60;br /&#62;
\u : the username of the current user&#60;br /&#62;
\v : the version of bash (e.g., 2.00)&#60;br /&#62;
\V : the release of bash, version + patch level (e.g., 2.00.0)&#60;br /&#62;
\w : the current working directory, with $HOME abbreviated with a tilde&#60;br /&#62;
\W : the basename of the current working directory, with $HOME abbreviated with a tilde&#60;br /&#62;
\! : the history number of this command&#60;br /&#62;
\# : the command number of this command&#60;br /&#62;
\$ : if the effective UID is 0, a #, otherwise a $&#60;br /&#62;
\nnn : the character corresponding to the octal number nnn&#60;br /&#62;
\\ : a backslash&#60;br /&#62;
\[ : begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt&#60;br /&#62;
\] : end a sequence of non-printing characters&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Adding some color&#60;br /&#62;
&#60;/strong&#62;&#60;br /&#62;
The last step is to add some colors to the prompt to make it stand out better. To add colors, use the following syntax:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;\e[x;ym \e[m&#60;/blockquote&#62;&#60;br /&#62;
Where \e[ begins the color scheme, x;y is the code for the color pair, and \e[m stops the color scheme. So for example, if you wanted to set a red color prompt you would type:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;export PS1=”\e[0;31m[\u@\h \W]\$ \e[m “&#60;/blockquote&#62;&#60;br /&#62;
You can mix and match different colors, but I will leave it to you to figure out the format. Don’t forget to append this line of code to your .bash_profile if you want to save the changes. Here is a short list of colors that may be used:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;Color	 Code&#60;br /&#62;
Black	 0;30&#60;br /&#62;
Red	 0;31&#60;br /&#62;
Green	 0;32&#60;br /&#62;
Brown	 0;33&#60;br /&#62;
Blue	 0;34&#60;br /&#62;
Purple	 0;35&#60;br /&#62;
Cyan	 0;36&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Replace digit 0 with 1 to get light color version.&#60;/p&#62;
&#60;p&#62;Play around with different a different combination of color codes and characters to get a good feel for it. I hope this guide will help you make a command prompt that will look cool as well as allow you to be more productive.
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Arch Linux - Yaourt (A Pacman Frontend)"</title>
<link>http://howto.webbynode.com/topic.php?id=21#post-24</link>
<pubDate>Mon, 15 Jun 2009 04:31:58 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">24@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;The traditional way to install Yaourt is through the actual AUR. In learning how to install yaourt this way, you will have the opportunity to learn how the AUR (and PKGBUILD)works.&#60;/p&#62;
&#60;p&#62;Open a web browser and head to the yaourt AUR page&#60;/p&#62;
&#60;p&#62;Under package details download the tarball&#60;/p&#62;
&#60;p&#62;Unpack the tarball&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tar zxvf yaourt.tar.gz&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Navigate into the new directory&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;cd yaourt&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;At this point; Make sure that you check the contents of the PKGBUILD and the yaourt.install files! This cannot be stressed enough, don't worry, they aren't too complicated. Just take a look, if you see anything suspicious, get on irc or the forum and ask about it.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;more yaourt.install more PKGBUILD&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;If everything looks good. We are ready to build the packages.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;makepkg PKGBUILD&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;After this process is complete, you will see several new files and directories. You should be interested in the file that ends with *.pkg.tar.gz (in this case mine is named; yaourt-0.9.2-i686.pkg.tar.gz)&#60;/p&#62;
&#60;p&#62;Now it's time to use pacman to install yaourt. Be sure to change the package name to the actual name of your package, don't just copy and paste this line&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;pacman -U yaourt-0.9.2-i686.pkg.tar.gz&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Congratulations! You're done! Remember, this is the SAME process for almost all AUR PKGBUILDs.&#60;/p&#62;
&#60;p&#62;See the yaourt man page for more. Easy Install&#60;/p&#62;
&#60;p&#62;The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:&#60;/p&#62;
&#60;p&#62;For i686:&#60;/p&#62;
&#60;p&#62;[archlinuxfr] Server = &#60;a href=&#34;http://repo.archlinux.fr/i686&#34; rel=&#34;nofollow&#34;&#62;http://repo.archlinux.fr/i686&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;For x86-64:&#60;/p&#62;
&#60;p&#62;[archlinuxfr] Server = &#60;a href=&#34;http://repo.archlinux.fr/x86_64&#34; rel=&#34;nofollow&#34;&#62;http://repo.archlinux.fr/x86_64&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Sync and install:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;pacman -Sy yaourt&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;If you wish, you may then create your own command aliases in ~/.bashrc to save typing:&#60;br /&#62;
&#60;blockquote&#62;&#60;br /&#62;
nano ~/.bashrc&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;alias p='pacman' alias y='yaourt'&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Save and then source:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;source ~/.bashrc&#60;/blockquote&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "CentOS 5.2 - Security and Hardening"</title>
<link>http://howto.webbynode.com/topic.php?id=20#post-23</link>
<pubDate>Mon, 15 Jun 2009 04:30:15 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">23@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;This wiki article will cover basic security in CentOS, from securing SSH to installing and configuring a basic firewall. Since your webby is pretty bare when we activate it, it is important to implement security as soon as you can to avoid being compromised. You will learn how to restrict access to your webby to a small number of selected individuals (or PCs) and design a very simple but effective firewall solution.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Superuser Account&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Once of the fundamentals of Linux security is to never work with a root account to avoid having your password sniffed or keylogged while working from a remote location. For that reason, we will create a new user account that will be used to administrate your webby. Lets start by creating such an account. In my example I will use the username name 'webbyadmin'.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;adduser webbyadmin&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;After creating the user we have to give it a password and add some basic permissions to the account. By adding the user to the wheel group we are giving it some administrative rights.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;passwd webbyadmin&#60;/blockquote&#62;&#60;br /&#62;
&#60;blockquote&#62;usermod -a -G wheel webbyadmin&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;You can now log in to your new account, but lets stay in root throughout the length of the article. Note that if you cant get a command to run for some reason (most likely because environmental variables haven't been set up for new user), you can always switch to root by giving the command&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;su -&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;We will not disable the root account, even though you should if you are really concerned about your security. Disabling the root account will require installing sudo and setting up some environmental variables, which will not be covered in this article. Now that we created the new account lets take a look at SSH and firewall security.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;SSH&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Let’s take a look at the default SSH configuration:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/ssh/sshd_config&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;We want to change the port SSH uses to an ambiguous, indistinct number. Look for the line that says ‘#Port 22’ and change it. Don't forget to take out the # symbol in front of the line. For example,&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;Port 12345&#60;/blockquote&#62;&#60;br /&#62;
The next level of security to apply to SSH is to disallowing login by the root user. This way you will only be able to log in with your new user we just created. You’ll want to search for the “#PermitRootLogin yes” line and change it to deny root login attempts, as such:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;PermitRootLogin no&#60;/blockquote&#62;&#60;br /&#62;
Save the configuration file and restart the SSH service. Don't forget to change the port in your SSH client when you reconnect&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;service ssh restart&#60;/blockquote&#62;&#60;br /&#62;
You should now have a pretty tightened down machine when it comes to SSH, stopping most brute force crack attempts in their tracks. Let’s move on to the next topic.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Firewall (APF)&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;If you run a website, blog, or any other type of service that opens your webby to the internet it's a good idea to close off any services that may leave your webby vulnerable. We'll be installing a free, lightweight firewall solution to address these issues. Download the latest version of APF:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;wget &#60;a href=&#34;http://www.r-fx.ca/downloads/apf-current.tar.gz&#34; rel=&#34;nofollow&#34;&#62;http://www.r-fx.ca/downloads/apf-current.tar.gz&#60;/a&#62;&#60;/blockquote&#62;&#60;br /&#62;
Next, unzip and install it:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tar -xvf apf-current.tar.gz&#60;br /&#62;
cd apf-current.tar.gz&#60;br /&#62;
./install.sh&#60;/blockquote&#62;&#60;br /&#62;
APF will now be installed to /etc/apf on CentOS. You can find the configuration file the firewall in /etc/apf/conf.apf. Now lets open and make some changes to match our SSH config.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/apf/conf.apf&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;First look for the line that says&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;DEVEL_MODE=&#34;1&#34;&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Leaving this option as “1” will disable your firewall after 5 minutes, so make sure to change it to “0”. Next, take a look at the allowed inbound ports. You should see something like&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;IG_TCP_CPORTS=&#34;22,80,443&#34;&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Notice that port 22, the default SSH port is open. We want to change this to the port we gave SSH earlier. You can leave port 80 (HTTP) and 443 (HTTPS) open if you plan on running a website. Next, take a look out outbound filtering. By default, APF will not filter outbound traffic but if would like to change that look for the following line&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;EGF=&#34;0&#34;&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;And change this value to “1”. On the line directly below it you should see the allowed outbound ports&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;EG_TCP_CPORTS=&#34;21,25,80,443&#34;&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Change these if you have enabled outbound filtering and save the firewall config. Now we should add the firewall to start when we reboot our webby and enable it&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;chkconfig --add apf&#60;br /&#62;
chkconfig --level 345 apf on&#60;br /&#62;
service apf start&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;You might get kicked out of your webby if you haven't relogged after changing the SSH config. Just log back in if you need to do any post-install stuff. Remember to use 'su -' if some of these commands aren't registering with the webby. You should not have a pretty secure box ready face the dangers of the internet.
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "CentOS 5.2 - Complete Server Solution"</title>
<link>http://howto.webbynode.com/topic.php?id=19#post-22</link>
<pubDate>Mon, 15 Jun 2009 04:26:22 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">22@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;In this wiki article we will look at installing and configuring a complete server solution for your webby, including HTTP, Database, and DNS. This article will cover a broad base of topics in a general sense, but will not focus on one specifically. If you would like to get a better understanding of a specific topic please refer to our other aticles or use the article request form to file a request.&#60;/p&#62;
&#60;p&#62;Before we begin lets get a couple of clarifications out of the way. At the time of writing the latest release of CentOS was version 5.2, but this article should apply to any earlier versions without much modification. We will be using the yum package manager rather than installing from source for its ease of use and ability to handle dependencies. Finally, we assume you will be installing from a root-level account.&#60;/p&#62;
&#60;p&#62;We'll be installing the latest versions of the following software:&#60;/p&#62;
&#60;p&#62;HTTP: Apache with PHP&#60;/p&#62;
&#60;p&#62;Database: MySQL&#60;/p&#62;
&#60;p&#62;DNS: BIND (chrooted)&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installing Apache 2 and PHP 5&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Before we proceed with installing anything let's update our webby to the latest version:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;yum update&#60;/blockquote&#62;&#60;br /&#62;
To install Apache and PHP, run the following command&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;yum install httpd httpd-devel php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml&#60;/blockquote&#62;&#60;br /&#62;
Now configure your system to start Apache at boot time:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;chkconfig --levels 235 httpd on&#60;/blockquote&#62;&#60;br /&#62;
We have to start Apache by hand after installation. To do this, type&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/httpd start&#60;/blockquote&#62;&#60;br /&#62;
You will see a warning about ServerName, so let’s go ahead and fix that now. Open the main apache config file:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/httpd/conf/httpd.conf&#60;/blockquote&#62;&#60;br /&#62;
Hit CTRL+W to bring up the search prompt and type in “ServerName”. Repeat until you find the line of code that says&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;ServerName &#60;a href=&#34;http://www.example.com:80&#34; rel=&#34;nofollow&#34;&#62;www.example.com:80&#60;/a&#62;&#60;/blockquote&#62;&#60;br /&#62;
Change this line to your hostname or FQDN and take out the pound sign (#) in front of ServerName. Now reload Apache:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/httpd reload&#60;/blockquote&#62;&#60;br /&#62;
Now open a web browser and type in your webby's IP address. If everything went well you should see the default Apache landing page.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installing MySQL 5&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;You can install MySQL server, client, and module with the following command:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;yum install mysql mysql-devel mysql-server&#60;/blockquote&#62;&#60;br /&#62;
MySQL should now be installed. The configuration file is located at: /etc/mysql/my.cnf&#60;/p&#62;
&#60;p&#62;Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;chkconfig --levels 235 mysqld on&#60;br /&#62;
/etc/init.d/mysqld start&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Now we delegate control of MySQL to a user. By default MySQL runs on the root account with no password. Lets password protect the root account:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mysql -u root&#60;br /&#62;
 mysql&#38;gt; USE mysql;&#60;br /&#62;
 mysql&#38;gt; UPDATE user SET Password=PASSWORD(’new-password’) WHERE user=’root’;&#60;br /&#62;
 mysql&#38;gt; FLUSH PRIVILEGES;&#60;br /&#62;
 mysql&#38;gt; quit;&#60;/blockquote&#62;&#60;br /&#62;
Although we have password protected the root account, you must never use it in your production environment. The best practice is to create a user to connect to MySQL. Then restart your MySQL server:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/mysqld restart&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installing BIND DNS Server&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;We will harden the BIND installation by installing it within a chroot jail. This is to provide increased security and prevent your DNS server from being compromised. To install a chrooted BIND9, we do this:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;yum install bind-chroot&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Then do these steps:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;chmod 755 /var/named/&#60;br /&#62;
chmod 775 /var/named/chroot/&#60;br /&#62;
chmod 775 /var/named/chroot/var/&#60;br /&#62;
chmod 775 /var/named/chroot/var/named/&#60;br /&#62;
chmod 775 /var/named/chroot/var/run/&#60;br /&#62;
chmod 777 /var/named/chroot/var/run/named/&#60;br /&#62;
cd /var/named/chroot/var/named/&#60;br /&#62;
ln -s ../../ chroot&#60;br /&#62;
cp /usr/share/doc/bind-9.3.4/sample/var/named/named.local /var/named/chroot/var/named/named.local&#60;br /&#62;
cp /usr/share/doc/bind-9.3.4/sample/var/named/named.root /var/named/chroot/var/named/named.root&#60;br /&#62;
touch /var/named/chroot/etc/named.conf&#60;br /&#62;
chkconfig --levels 235 named on&#60;br /&#62;
/etc/init.d/named start&#60;/blockquote&#62;&#60;br /&#62;
BIND will now run in a chroot jail under /var/named/chroot/var/named/. We will cover BIND configuration for CentOS in a future wiki.&#60;/p&#62;
&#60;p&#62;You should now have a complete installation of Apache, MySQL and BIND and should be ready to serve content on the web.
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "CentOS 5 - Remote Desktop"</title>
<link>http://howto.webbynode.com/topic.php?id=18#post-21</link>
<pubDate>Mon, 15 Jun 2009 04:22:53 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">21@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;In this wiki article we'll discuss setting up your webby as a VNC server and using a client from your Windows machine to connect. Why would you want to use your webby as a remote desktop? Well one example I can think of would be if you wanted to explore the GUI features of Linux before installing it on your box at home. Another advantage would be to install a desktop environment if you're unfamiliar or uncomfortable with the command prompt to run administrative tasks.&#60;/p&#62;
&#60;p&#62;But isn't a desktop environment a memory intensive application that will eat up my RAM and bring my webby to a crawl? Not really. We dont even need to run X Server (and couldn't because of video terminal issues with Xen), thereby eliminating much of the stress placed on the system. In our tests, VNC server with GNOME running a freshly rebuilt 256MB webby only consumed about 35MB RAM. Although this article applies to CentOS, the changes are minimal if you use any other Linux distribution we offer.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installation&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Lets start by logging on to our webby and installing the required packages for VNC. We'll need the X Window System and a desktop environment, which can be installed with:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;yum groupinstall &#34;X Window System&#34;&#60;br /&#62;
yum groupinstall &#34;GNOME Desktop Environment&#34;&#60;/blockquote&#62;&#60;br /&#62;
You may prefer to install a different desktop environment, such as KDE, which is a little larger and resource intensive than GNOME. To get a complete list of available packages give the “yum grouplist” command.&#60;/p&#62;
&#60;p&#62;The installation of each package may take a while to finish, so go pour yourself a cup of coffee.&#60;/p&#62;
&#60;p&#62;NOTE: If you receive the error “Error: Missing Dependency: libgaim.so.0 is needed by package nautilus-sendto” while installing GNOME Desktop Environment, you will need to manually install nautilus-sendto with the following procedure:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;yum install yum-utils&#60;br /&#62;
yumdownloader nautilus-sendto&#60;br /&#62;
rpm -Uvh --nodeps nautilus-sendto[PRESS TAB]&#60;/blockquote&#62;&#60;br /&#62;
Source: &#60;a href=&#34;http://bugs.centos.org/view.php?id=2483&#34;&#62;http://bugs.centos.org/view.php?id=2483&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Configure VNC Server&#60;/p&#62;
&#60;p&#62;&#60;/strong&#62;VNC Server should have been installed along with X Window System, so we can now move on to configuration. Edit the /etc/sysconfig/vncservers file and add (or uncomment) the following two lines:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/sysconfig/vncservers&#60;/blockquote&#62;&#60;br /&#62;
&#60;blockquote&#62;VNCSERVERS=&#34;5:root&#34; # display port and username&#60;br /&#62;
VNCSERVERARGS[2]=&#34;-geometry 800x600 -nolisten tcp -nohttpd -localhost&#60;/blockquote&#62;&#34;&#60;br /&#62;
Change the criteria to match your desired configuration. For example, change “5:root” to a different display port and/or username if you do not wish to use root. Likewise, change the resolution if you prefer. The other parameters can be left as they are. Save the file and exit.&#60;/p&#62;
&#60;p&#62;Now we need to assign a password to the VNC server. Do this by issuing:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;vncpasswd&#60;/blockquote&#62;&#60;br /&#62;
To start VNC server, type&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;vncserver :5&#60;/blockquote&#62;&#60;br /&#62;
This will generate a local Notice that :5 is the same port we gave in the first config file.&#60;/p&#62;
&#60;p&#62;Before you log in through a VNC client there is one more file that needs to be adjusted to match our configuration. First, kill the dekstop you launched earlier with:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;vncserver -kill :5&#60;/blockquote&#62;&#60;br /&#62;
Now edit the local config file in the root folder:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano ~/.vnc/xstartup&#60;/blockquote&#62;&#60;br /&#62;
We want to have VNC load GNOME instead of the default twm. Look for the following line:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;twm &#38;amp;&#60;/blockquote&#62;&#60;br /&#62;
And replace it with&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;gnome-session &#38;amp;&#60;/blockquote&#62;&#60;br /&#62;
Ok now save and restart the VNC instance:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;vncserver :5&#60;/blockquote&#62;&#60;br /&#62;
Remember the port you are using to start VNC (:5), you will need it later when connecting with a VNC client. VNC Server should be running GNOME as needed now. Notice we didn't even bother with any X Server configuration because it's not needed to give us a fully functioning remote desktop. This should do it for configuration. Let's go on to testing our setup.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Connecting with VNC client&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Load up your favorite VNC client (I use TightVNC or RealVNC) and type your IP followed by the port number you loaded VNC server with (NOT the general VNC port). Such as:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;123.45.67.89:5&#60;/blockquote&#62;&#60;br /&#62;
Then click connect. You will be prompted for your password (the one you specified with vncpasswd) after which your Linux desktop should come up. If you are having problems connecting, check your firewall rules to see if the generic VNC port (5900) is open for incoming connections. That should be it, congratulations on installing VNC server and enjoy your new Linux desktop!
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "CentOS 5 - Apache 2 with PHP"</title>
<link>http://howto.webbynode.com/topic.php?id=17#post-20</link>
<pubDate>Mon, 15 Jun 2009 04:19:36 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">20@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;In this wiki article you will learn how to install and test Apache Web Server with PHP 5. This article already assumes you have a working version of CentOS with the latest updates. We will be working with yum, the CentOS package management system. We also assume you are working with the root account, or an account with administrative privileges.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installation&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;To install Apache and PHP, run the following command&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;yum install httpd httpd-devel php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-&#60;/blockquote&#62;xml&#60;br /&#62;
After you enter this command yum will connect to the CentOS repositories and download the specified packages. Notice that yum will also download and install any security updates and dependencies that might be needed by Apache and PHP.&#60;/p&#62;
&#60;p&#62;We have to start Apache by hand after installation. To do this, type&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/httpd start&#60;/blockquote&#62;&#60;br /&#62;
You will see a warning about ServerName, so let’s go ahead and fix that now. Open the main apache config file:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/httpd/conf/httpd.conf&#60;/blockquote&#62;&#60;br /&#62;
Hit CTRL+W to bring up the search prompt and type in “ServerName”. Repeat until you find the line of code that says&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;#ServerName &#60;a href=&#34;http://www.example.com:80&#34; rel=&#34;nofollow&#34;&#62;www.example.com:80&#60;/a&#62;&#60;/blockquote&#62;&#60;br /&#62;
Change this line to your hostname or FQDN and take out the pound sign (#) in front of ServerName. Now reload Apache:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/httpd reload&#60;/blockquote&#62;&#60;br /&#62;
Now open a web browser and type in your webby's IP address. If everything went well you should see the default Apache landing page.&#60;/p&#62;
&#60;p&#62;To test if PHP was installed properly, create a phpinfo.php file in your web folder, as such:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /var/www/html/phpinfo.php&#60;/blockquote&#62;&#60;br /&#62;
Place the following code inside:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;# phpinfo.php&#60;/p&#62;
&#60;p&#62;&#38;lt;?php phpinfo(); ?&#38;gt;&#60;/blockquote&#62;&#60;br /&#62;
Now point your browser to &#60;a href=&#34;http://ip.address/phpinfo.php&#34; rel=&#34;nofollow&#34;&#62;http://ip.address/phpinfo.php&#60;/a&#62; and you should see your PHP configuration.&#60;/p&#62;
&#60;p&#62;Congratulations, you just successfully set up Apache Web Server with PHP!
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Ubuntu Hardy - Installing a DNS Server with BIND"</title>
<link>http://howto.webbynode.com/topic.php?id=16#post-19</link>
<pubDate>Mon, 15 Jun 2009 04:14:54 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">19@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;&#60;strong&#62;Installing BIND DNS Server (in a chroot jail) - Ubuntu Hardy&#60;/p&#62;
&#60;p&#62;This wiki article will go over how to install and set up a DNS server with BIND on your webby. BIND has been around for 20 years and has proven to be very reliable for managing DNS. We will be using Ubuntu Hardy 8.04 as the target OS for deployment but the process for deploying on any other OS should be just about the same.&#60;/p&#62;
&#60;p&#62;You add zones and manage records in BIND through a simple configuration file. Keep in mind that we will only be setting up a master server in this article, with none of the advanced features such as DDNS and DNSSEC. Obviously, if you run a critical website you should look into setting up a secondary DNS server on a separate webby, which could be put on a separate server in a different datacenter. Also, this article assumes you have already bought a domain with a registar (I use GoDaddy) and pointed it to your IP.&#60;/p&#62;
&#60;p&#62;[b]Installing &#38;amp; Creating Chroot Jail&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Start by updating your mirror list, base system, and downloading BIND:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get update&#60;br /&#62;
apt-get upgrade&#60;br /&#62;
apt-get install bind9 dnsutils&#60;/blockquote&#62;&#60;br /&#62;
Before proceeding any further lets turn off the BIND daemon while we reconfigure it:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/bind9 stop&#60;/blockquote&#62;&#60;br /&#62;
Since the version of BIND from apt-get is likely to be slightly outdated, we want to create a chroot jail for our installation for security reasons. Do this by creating the following directories:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mkdir -p /var/lib/named/etc&#60;br /&#62;
mkdir /var/lib/named/dev&#60;br /&#62;
mkdir -p /var/lib/named/var/cache/bind&#60;br /&#62;
mkdir -p /var/lib/named/var/run/bind/run&#60;/blockquote&#62;&#60;br /&#62;
We want to tell the daemon to use these new directories next time we start it up, so let's go ahead and edit the config file that tells it where to look for BIND:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/default/bind9&#60;/blockquote&#62;&#60;br /&#62;
Modify the line starting with OPTIONS so that it reads:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;OPTIONS=&#34;-u bind -t /var/lib/named&#34;&#60;/blockquote&#62;&#60;br /&#62;
Next, move the installation folder to the new location and create a symbolic link for the configuration back to old location:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mv /etc/bind /var/lib/named/etc&#60;br /&#62;
ln -s /var/lib/named/etc/bind /etc/bind&#60;/blockquote&#62;&#60;br /&#62;
Make null and random devices, and fix permissions of the directories:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mknod /var/lib/named/dev/null c 1 3&#60;br /&#62;
mknod /var/lib/named/dev/random c 1 8&#60;br /&#62;
chmod 666 /var/lib/named/dev/null /var/lib/named/dev/random&#60;/blockquote&#62;&#60;br /&#62;
Lastly, we will change the owner of the BIND system directory to the 'bind' user and group:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;chown -R bind:bind /var/lib/named/var/*&#60;br /&#62;
chown -R bind:bind /var/lib/named/etc/bind&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Configuring BIND&#60;/p&#62;
&#60;p&#62;&#60;/strong&#62;Ubuntu pre-configures BIND, adding the 'bind' user and group to your server. Edit the BIND configuration file that is made for us:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/bind/named.conf.local&#60;/blockquote&#62;&#60;br /&#62;
Note that you will actually be editing files in the new chroot jail that are linked to the /etc/bind location. All zone definitions should be added to this file. Use the example below but change domain.com with your domain name:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;zone &#34;domain.com&#34; {&#60;br /&#62;
type master;&#60;br /&#62;
file &#34;/etc/bind/zones/domain.com.db&#34;;&#60;br /&#62;
};&#60;/p&#62;
&#60;p&#62;# This is the zone definition for reverse DNS. replace&#60;br /&#62;
# 254.168.192 with your network address in reverse notation.&#60;br /&#62;
zone &#34;254.168.192.IN-ADDR.ARPA&#34; {&#60;br /&#62;
type master;&#60;br /&#62;
file &#34;/etc/bind/zones/192.168.254.rev&#34;;&#60;br /&#62;
};&#60;/blockquote&#62;&#60;br /&#62;
Now we need to edit the options file:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/bind/named.conf.options&#60;/blockquote&#62;&#60;br /&#62;
This is where we modify the forwarder, which is the DNS server yours will forward requests to that it cannot process. If you are unsure of what your forwarder is, take a look in the /etc/resolv.conf file, as this is the DNS server assigned by default to your webbt. Look for the following lines of code in /etc/bind/named.conf.options (might be commented out) and replace 123.45.65.89 with your forwarder:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;forwarders {&#60;br /&#62;
        123.45.67.89;&#60;br /&#62;
};&#60;/blockquote&#62;&#60;br /&#62;
Now lets make a zones home folder and add the definition files. Relace domain.com with your domain name:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mkdir /etc/bind/zones&#60;br /&#62;
nano /etc/bind/zones/domain.com.db&#60;/blockquote&#62;&#60;br /&#62;
This is where we put all the addresses and machine names that we want our DNS server to know. It is also where you would add multiple domain names if you host more than one website on your webby. Furthermore, sub-domains must be added here if you plan on doing stuff like ftp, mail, or virtual hosts. Dont forget to change domain.com with your domain and replace the IP addresses with yours. Add this code to the definition file:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;; BIND data file for domain.com&#60;br /&#62;
$TTL    604800&#60;br /&#62;
domain.com.    IN      SOA     ns1.domain.com. info.domain.com. (&#60;br /&#62;
                                    2008062101      ; Serial&#60;br /&#62;
                                    7200            ; Refresh&#60;br /&#62;
                                    120             ; Retry&#60;br /&#62;
                                    2419200         ; Expire&#60;br /&#62;
                                    604800          ; Default TTL&#60;br /&#62;
)&#60;/p&#62;
&#60;p&#62;; Replace ns1 as necessary (ns1 = Domain Server name)&#60;br /&#62;
domain.com.    IN      NS              ns1.domain.com.&#60;br /&#62;
domain.com.    IN      MX     10       mail.domain.com.&#60;/p&#62;
&#60;p&#62;; Add sub-domains, mail, ftp, etc. here&#60;br /&#62;
ns1                     IN      A       123.45.67.89&#60;br /&#62;
mail                    IN      A       123.45.67.89&#60;br /&#62;
www                     IN      A       123.45.67.89&#60;br /&#62;
blog                    IN      A       123.45.67.89&#60;br /&#62;
  &#60;/blockquote&#62;&#60;br /&#62;
Now let's set up the reverse DNS zone. Replace 254.168.192 with you network address in reverse notation.&#60;/p&#62;
&#60;p&#62;NOTE: This step is optional and was only added for consistency and standardization. To get RDNS set up properly for your webby please open up a ticket.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/bind/zones/rev.254.168.192.in-addr.arpa&#60;/blockquote&#62;&#60;br /&#62;
Copy and paste the following, modifying as needed:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;@	IN	SOA	ns1.domain.com.	info.domain.com. (&#60;br /&#62;
                        2008062101	;&#60;br /&#62;
                        28800		;&#60;br /&#62;
                        604800		;&#60;br /&#62;
                        604800		;&#60;br /&#62;
                        86400)&#60;/p&#62;
&#60;p&#62;; The number before IN PTR is the machine address of the VPS.&#60;br /&#62;
; In my case, it's 89, as my IP address is 123.45.67.89&#60;br /&#62;
                     IN    NS     ns1.domain.com.&#60;br /&#62;
89                   IN    PTR    domain.com&#60;/blockquote&#62;&#60;br /&#62;
Only a few more steps and we're done. We still need to edit the resolv.conf file and add our new DNS server:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/resolv.conf&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Add the following, relacing domain.com with your domain name and 123.45.67.89 with the IP of your new DNS server (your webby's IP):&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;search domain.com&#60;br /&#62;
nameserver 123.45.67.89&#60;/blockquote&#62;&#60;br /&#62;
Proceed by starting BIND:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/bind9 start&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Testing BIND Configuration[/b]&#60;/p&#62;
&#60;p&#62;First, let's test the integrity of your definition file:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;cd /etc/bind/zones&#60;br /&#62;
named-checkzone domain.com domain.com.db&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;This should return an 'OK' status. If you get some errors, go back and check your definition file (/etc/bind/zones/domain.com.db). To finish off, lets test your new DNS:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;dig domain.com&#60;/blockquote&#62;&#60;br /&#62;
You should get an answer similar to this:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;; &#38;lt;&#38;lt;&#38;gt;&#38;gt; DiG 9.4.2 &#38;lt;&#38;lt;&#38;gt;&#38;gt; domain.com&#60;br /&#62;
;; global options:  printcmd&#60;br /&#62;
;; Got answer:&#60;br /&#62;
;; -&#38;gt;&#38;gt;HEADER&#38;lt;&#38;lt;- opcode: QUERY, status: NOERROR, id: 6418&#60;br /&#62;
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0&#60;/p&#62;
&#60;p&#62;;; QUESTION SECTION:&#60;br /&#62;
;domain.com.                   IN      A&#60;/p&#62;
&#60;p&#62;;; AUTHORITY SECTION:&#60;br /&#62;
domain.com.            38400   IN      SOA     ns1.domain.com. admin.domain.com. 2006081401 28800 3600 604800 38400&#60;/p&#62;
&#60;p&#62;;; Query time: 2 msec&#60;br /&#62;
;; SERVER: 123.45.67.89#53(123.45.67.89)&#60;br /&#62;
;; WHEN: Wed Jun 25 02:19:16 2008&#60;br /&#62;
;; MSG SIZE  rcvd: 75&#60;/blockquote&#62;&#60;br /&#62;
If you see something like this above, that should do it. Congratulations on successfully setting up your new BIND DNS server in a chroot jail!
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Debian Etch - DNS Caching Server Setup"</title>
<link>http://howto.webbynode.com/topic.php?id=15#post-18</link>
<pubDate>Mon, 15 Jun 2009 04:09:54 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">18@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;A while back a client asked me to set up an onsite DNS cache for him so that all DNS requests from his network would be sent there. This is quite different than a typical 'DNS Server' that one would use to host their website, mail, or FTP server. Users could set the server as their primary DNS on their local machines and the DNS cache would resolve domain names by querying a number of master servers on the web. It then creates it's own database for DNS requests. If you run multiple webbies or a project on a different host and don't want to rely on your hosts DNS, you can create your own. This DNS can even be used on your home computer in case your provider's DNS goes down. In this article I will show you how to set up tinydns &#38;amp; djbdns on Ubuntu and secure it so that outsiders cannot use your nameserver.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installation&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Before we dive into the details we need to update the apt sources file to allow some of the packages to install correctly. Edit the sources.list file&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/apt/sources.list&#60;/blockquote&#62;&#60;br /&#62;
and make sure you have the proper sources enabled. Your file should look something like this:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;deb &#60;a href=&#34;http://ftp.us.debian.org/debian&#34; rel=&#34;nofollow&#34;&#62;http://ftp.us.debian.org/debian&#60;/a&#62; etch main contrib non-free&#60;br /&#62;
deb &#60;a href=&#34;http://security.debian.org/&#34; rel=&#34;nofollow&#34;&#62;http://security.debian.org/&#60;/a&#62; etch/updates main&#60;/blockquote&#62;&#60;br /&#62;
If your sources file contains additional lines starting with 'src' just leave those in there. Next, let's update our base system and install some dependencies&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get update&#60;br /&#62;
apt-get upgrade&#60;br /&#62;
apt-get install build-essential&#60;/blockquote&#62;&#60;br /&#62;
We can then start installing and building TinyDNS &#38;amp; djbDNS. Accept all the defaults when you perform the builds&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install ucspi-tcp-src&#60;br /&#62;
build-ucspi-tcp&#60;br /&#62;
apt-get install daemontools-installer&#60;br /&#62;
build-daemontools&#60;br /&#62;
apt-get install djbdns-installer&#60;br /&#62;
build-djbdns&#60;/blockquote&#62;&#60;br /&#62;
When the installations are finished you are ready to move on to configuring.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Configuration&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;First, check that the correct user accounts were created.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;cat /etc/passwd&#60;/blockquote&#62;&#60;br /&#62;
On the last three lines you should see dnslog, dnscache, &#38;amp; tinydns. If they are there, everything's fine. If they are not, you will have to add them manually:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;adduser –no-create-home –disabled-login -shell /bin/false dnscache&#60;br /&#62;
adduser –no-create-home –disabled-login -shell /bin/false dnslog&#60;br /&#62;
adduser –no-create-home –disabled-login -shell /bin/false tinydns&#60;/blockquote&#62;&#60;br /&#62;
Next, we will configure DNScache &#38;amp; tinyDNS&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mkdir /var/lib/svscan&#60;br /&#62;
dnscache-conf dnscache dnslog /var/lib/svscan/dnscache&#60;br /&#62;
ln -sf /var/lib/svscan/dnscache /service&#60;/blockquote&#62;&#60;br /&#62;
For dnscache, you will need to specify your webby's public IP. This will be your nameserver's IP&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;dnscache-conf dnscache dnslog /var/lib/svscan/dnscache 192.168.0.1&#60;br /&#62;
ln -sf /var/lib/svscan/dnscache /service&#60;/blockquote&#62;&#60;br /&#62;
For tinydns, you will need use the loopback IP on your box&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tinydns-conf tinydns dnslog /var/lib/svscan/tinydns 127.0.0.1&#60;br /&#62;
ln -sf /var/lib/svscan/tinydns /service&#60;/blockquote&#62;&#60;br /&#62;
This should sum up the configuration portion of the article. Next, we can move on to securing and testing your nameserver.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Testing DNS&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;First you can test this locally on the DNS server itself, modify /etc/resolv.conf and add your webby's IP. You can try both the public IP or the loopback (127.0.0.1). Either one should work.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/resolv.conf&#60;/blockquote&#62;&#60;br /&#62;
As of this point in the installation your nameserver is not open for public use. To enable remote machines to use this DNS you must add their IPs to dnscache's allow list. For example, this would allow the machine with the IP 192.168.0.2 to use the nameserver:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;cd /var/lib/svscan/dnscache/root/ip&#60;br /&#62;
touch 192.168.0.2&#60;/blockquote&#62;&#60;br /&#62;
This will create an empty file in the directory that gives the users under that IP access to the DNS. You can use an exact IP or specify a range, like so&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;touch 192.168.0&#60;br /&#62;
touch 10.0&#60;/blockquote&#62;&#60;br /&#62;
This would allow all machines on the 192.168.0 and 10.0 subnets to use this nameserver. To finish off, you can run some tests to make sure dnscache is functioning:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;dnsip google.com&#60;br /&#62;
dig google.com&#60;/blockquote&#62;&#60;br /&#62;
If both those commands give a successful output then your DNS cache is working fine. You can now modify the /etc/resolv.conf on your remote servers to start using the nameserver. Just remember to add new users to the allowed IP list if you want them to be able to use it. Congratulations on a successful setup!
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Debian Etch - Secure VNC Server with SSH Tunnel"</title>
<link>http://howto.webbynode.com/topic.php?id=14#post-17</link>
<pubDate>Mon, 15 Jun 2009 04:03:21 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">17@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Virtual Network Computing (VNC) is a system that allows you to use a graphical desktop on a remote host. This might be a useful tool for users just starting out with Linux because it essentially replaces the command line interface that might overwhelm some beginners. It's also useful for running applications with limited command line support, or as a security measure.&#60;/p&#62;
&#60;p&#62;In this article I will cover how to get VNC up and running on your webby, complete with security. I used Debian as a deployment platform, but originally I had used Ubuntu Hardy to set this up for a client. Therefore, the installation should be universal for all Debian clones. Keep in mind that you will be installing a desktop environment on your webby, which *can* use up quite a bit of memory. Therefore, if you plan on using your webby for anything other than just VNC, I wouldn't recommend this deployment on anything less than a 512 Webby.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installation&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Before you start using VNC you will need to connect to your webby via SSH to perform some updates and install the required software. Once you are in, upgrade your webby with the latest packages:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get update&#60;br /&#62;
apt-get upgrade&#60;/blockquote&#62;&#60;br /&#62;
After the system updates we need to install a desktop environment. For this article I recommend GNOME, but KDE and others should work as well.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install gnome-desktop-environment&#60;/blockquote&#62;&#60;br /&#62;
We also need to install some fonts for the GNOME session&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install xfonts-100dpi&#60;br /&#62;
apt-get install xfonts-100dpi-transcoded&#60;br /&#62;
apt-get install xfonts-75dpi&#60;br /&#62;
apt-get install xfonts-75dpi-transcoded&#60;br /&#62;
apt-get install xfonts-base&#60;/blockquote&#62;&#60;br /&#62;
Last of all, we are ready to install VNC Server. TightVNCServer is my choice here.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install tightvncserver&#60;/blockquote&#62;&#60;br /&#62;
This will install TightVNCServer. In order to initialize it we run&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tightvncserver :1&#60;/blockquote&#62;&#60;br /&#62;
VNC runs on port 5900 by default, so the :1 tells TightVNCServer to run on port 5901. This is the port you will use to later connect to your webby. There are some parameters you can give to adjust resolution, for example:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tightvncserver -geometry 1280×1024 :1&#60;/blockquote&#62;&#60;br /&#62;
This will create some files in ~/.vnc and it should ask you for a password. Make sure you pick a good password, even though we will be securing it with SSH later. After you initialize VNC for the first time you need stop it for further configuration. This is done with&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tightvncserver -kill :1&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Configuration&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;We'll use an editor to configure VNC from now on. Lets open the configuration file and look at the options&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano ~/.vnc/xstartup&#60;/blockquote&#62;&#60;br /&#62;
Since VNC uses the standard X Windows interface, we will need to tell it to use GNOME. Change the last line to invoke GNOME instead of X Windows, like so:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;#!/bin/sh&#60;/blockquote&#62;&#60;br /&#62;
&#60;blockquote&#62;xrdb $HOME/.Xresources&#60;br /&#62;
xsetroot -solid grey&#60;br /&#62;
#x-terminal-emulator -geometry 80x24+10+10 -ls -title &#34;$VNCDESKTOP Desktop&#34; &#38;amp;&#60;br /&#62;
#x-window-manager &#38;amp;&#60;br /&#62;
gnome-session &#38;amp;&#60;/blockquote&#62;&#60;br /&#62;
Save the config file and exit. You can now start VNC again&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tightvncserver :1&#60;/blockquote&#62;&#60;br /&#62;
Although you can now connect to your webby with a VNC client and start using the desktop, we have one more important step before we can call it finished. By default, VNC runs unencrypted so any information you transmit becomes vulnerable. It is therefore advised to set up a SSH tunnel for VNC to connect through. Since SSH is secure, we don't have to worry about someone snooping our password. In the next step we will go over how to set up an SSH tunnel just for this reason.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Set up SSH Tunnel&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;On your local machine give the following command, where 192.168.0.1 is the IP of your webby:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;ssh -f -N -L 5901:localhost:5901 &#60;a href=&#34;mailto:root@192.168.0.1&#34;&#62;root@192.168.0.1&#60;/a&#62; -p 22&#60;/blockquote&#62;&#60;br /&#62;
This will start the SSH tunnel for por 5901, so all traffic through that port will first be encrypted by SSH. You can then start VNC server on your webby again&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tightvncserver :1&#60;/blockquote&#62;&#60;br /&#62;
You can then connect to your virtual desktop with a VNC client on your computer. For PC, TightVNC is my favorite. For Mac, there is Chicken of the VNC. When asked for a password, give them one you typed when installing VNC. You should now have a functional graphical desktop on your webby. I hope this article was helpful and you find your adventure into VNC land rewarding.
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Debian Etch - lighthttpd and PHP"</title>
<link>http://howto.webbynode.com/topic.php?id=13#post-16</link>
<pubDate>Mon, 15 Jun 2009 03:52:36 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">16@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;This wiki article will explain how to install and configure lighthttpd with PHP5 and MySQL. lighthttd is a web server designed to be fast, secure, flexible and standards-complient while being optimized for speed-critical environments.&#60;/p&#62;
&#60;p&#62;Its low memory footprint, light CPU load and speed make it the perfect web server for an environment such as a 256MB webby. Lighthttpd supports the FastCGI interface, which we will use to enable PHP5 support. This article assumes you have already updated your system with the latest fixes and DO NOT have a web server, such as Apache, already installed on your webby. We will be installing all required applications with the apt-get utility in Debian.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Install MySQL&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;We begin by installing MySQL 5.0:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install mysql-server mysql-client&#60;br /&#62;
&#60;/blockquote&#62;This should install and start up the MySQL server. Let's give the MySQL root account a password, such as:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mysqladmin -u root password yourpassword&#60;/blockquote&#62;&#60;br /&#62;
Now we have to check on which address MySQL is listening with netstat:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;netstat -tap &#124; grep mysql&#60;/blockquote&#62;&#60;br /&#62;
The output should look similair to this:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tcp 0 0 localhost:mysql *:* LISTEN 1695/mysqld&#60;/blockquote&#62;&#60;br /&#62;
Which means MySQL is listening on localhost only. But lets say you see output such as:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;tcp 0 0 *:mysql *:* LISTEN 1695/mysqld&#60;/blockquote&#62;&#60;br /&#62;
That means anyone can access your database and modify data, so you should set a password for your hostname. For example:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mysqladmin -h server1.domain.com -u root password yourpassword&#60;br /&#62;
&#60;/blockquote&#62;Replacing sever1.domain.com with your domain name.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Install lighthttpd&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;We can install lighthttpd with apt-get, like this:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install lighttpd&#60;/blockquote&#62;&#60;br /&#62;
After installation finishes, open your web browser and type in your webby's IP and you should see the placeholder page. Lighttpd's default document root is /var/www on Debian, and the configuration file is /etc/lighttpd/lighttpd.conf.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Install PHP5&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;PHP works on lighthttpd using the FastCGI interface. Debian provides a FastCGI-enabled PHP5 package, which we can install like this:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install php5-cgi&#60;/blockquote&#62;&#60;br /&#62;
To enable PHP5 in lighttpd, we must modify two files (/etc/php5/cgi/php.ini &#38;amp; /etc/lighttpd/lighttpd.conf). First we open /etc/php5/cgi/php.ini:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/php5/cgi/php.ini&#60;/blockquote&#62;&#60;br /&#62;
Add the following line right at the end of the file:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;cgi.fix_pathinfo = 1&#60;/blockquote&#62;&#60;br /&#62;
Then we open /etc/lighttpd/lighttpd.conf and add “mod_fastcgi”, to the server.modules stanza:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/lighttpd/lighttpd.conf&#60;/blockquote&#62;&#60;br /&#62;
Look for the following text:&#60;/p&#62;
&#60;p&#62; &#60;blockquote&#62; server.modules        = (&#60;br /&#62;
  &#34;mod_access&#34;,&#60;br /&#62;
  &#34;mod_alias&#34;,&#60;br /&#62;
  &#34;mod_accesslog&#34;,&#60;br /&#62;
  &#34;mod_fastcgi&#34;,&#60;br /&#62;
  #        &#34;mod_rewrite&#34;,&#60;br /&#62;
  #        &#34;mod_redirect&#34;,&#60;br /&#62;
  #        &#34;mod_status&#34;,&#60;br /&#62;
  #        &#34;mod_evhost&#34;,&#60;br /&#62;
  #        &#34;mod_compress&#34;,&#60;br /&#62;
  #        &#34;mod_usertrack&#34;,&#60;br /&#62;
  #        &#34;mod_rrdtool&#34;,&#60;br /&#62;
  #        &#34;mod_webdav&#34;,&#60;br /&#62;
  #        &#34;mod_expire&#34;,&#60;br /&#62;
  #        &#34;mod_flv_streaming&#34;,&#60;br /&#62;
  #        &#34;mod_evasive&#34;&#60;br /&#62;
  )&#60;/blockquote&#62;&#60;br /&#62;
and then right at the end of the file, we add the following stanza:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;fastcgi.server = ( &#34;.php&#34; =&#38;gt; ((&#60;br /&#62;
&#34;bin-path&#34; =&#38;gt; &#34;/usr/bin/php5-cgi&#34;,&#60;br /&#62;
&#34;socket&#34; =&#38;gt; &#34;/tmp/php.socket&#34;&#60;br /&#62;
)))&#60;/blockquote&#62;&#60;br /&#62;
Next, we restart lighthttpd:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/lighttpd restart&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Testing Your Installation&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;The document root of the default web site is /var/www. To test if PHP was installed properly, create a test.php file in your web folder, as such:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /var/www/phpinfo.php&#60;/blockquote&#62;&#60;br /&#62;
Place the following code inside:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;&#38;lt;?php phpinfo(); ?&#38;gt;&#60;/blockquote&#62;&#60;br /&#62;
Now point your browser to &#60;a href=&#34;http://ip.address/phpinfo.php&#34; rel=&#34;nofollow&#34;&#62;http://ip.address/phpinfo.php&#60;/a&#62; and you should see your PHP configuration. As you can see on the Server API line, PHP5 is working through FastCGI. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support in PHP5 yet.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Enable MySQL Support in PHP5&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;To get MySQL working with PHP5 all we have to do is install the php5-mysql package.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install php5-mysql&#60;/blockquote&#62;&#60;br /&#62;
Now restart lighthttpd:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/lighttpd restart&#60;/blockquote&#62;&#60;br /&#62;
Reload the phpinfo.php file in your web browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module. That's about it, congratulations on installing MySQL/lighthttpd/PHP5 on your webby!
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Debian Etch - LAMP Server"</title>
<link>http://howto.webbynode.com/topic.php?id=12#post-15</link>
<pubDate>Mon, 15 Jun 2009 03:45:41 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">15@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;In this wiki article, we are going to discuss how to get a LAMP Server up and running on Debian 4.0. The reason we picked Debian for this article is because it is by far one of the most commonly used distributions for hosting websites. In addition Debian is one of the lightest installations, with respect to memory and disk usage. LAMP, as it is commonly referred to, stands for Linux + Apache + MySQL + PHP/Perl. The instructions in this article can also be applied to any other version of Debian and also Ubuntu.&#60;/p&#62;
&#60;p&#62;There are a couple things to keep in mind before proceeding. First, we will be installing everything on a remote virtual private server using an SSH connection, but if you are installing on a local system not a whole lot should change in your procedure. Second, we will be using the apt-get package management system instead of installing from source. This is because apt-get will handle all dependencies and security updates that might be required by the server software we are installing.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installing Apache &#38;amp; PHP&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Before we start installing any server packages, let’s do a quick system update to get any last-minute fixes for Debian:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get update&#60;/blockquote&#62;&#60;br /&#62;
Apache and PHP can both be installed using the following command&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install apache2 php5 libapache2-mod-php5&#60;/blockquote&#62;&#60;br /&#62;
Notice that we can specify which version we want to make apt-get install. For example,&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install apache php4&#60;/blockquote&#62;&#60;br /&#62;
would install earlier versions of Apache and PHP. You might want to install older versions if you’re looking for a more stable environment, although Apache 2 has been hardened pretty well already.&#60;/p&#62;
&#60;p&#62;Now you have to add the following line to the end of your Apache configuration file to get it to stop crying about ServerName. Set ServerName to your hostname or FQDN. If you’re not sure what your hostname is look in /etc/hostname or just use localhost. Your Apache configuration file is found at /etc/apache2/apache2.conf&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;ServerName localhost&#60;/blockquote&#62;&#60;br /&#62;
Point your web browser to your IP (http://ip.address) and if everything went well you should see the default landing page for Apache 2.&#60;/p&#62;
&#60;p&#62;To test if PHP was installed properly, create a test.php file in your web folder, as such:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /var/www/phpinfo.php&#60;/blockquote&#62;&#60;br /&#62;
Place the following code inside:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;# phpinfo.php&#60;/p&#62;
&#60;p&#62;&#38;lt;?php phpinfo(); ?&#38;gt;&#60;/blockquote&#62;&#60;br /&#62;
Now point your browser to &#60;a href=&#34;http://ip.address/phpinfo.php&#34; rel=&#34;nofollow&#34;&#62;http://ip.address/phpinfo.php&#60;/a&#62; and you should see your PHP configuration.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installing MySQL&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;MySQL is a database server that you will need if you plan to run an ecommerce website or a forum. There are several alternatives but MySQL is regarded as the ‘mainstream’ database solution. In addition to the server, you will also need the MySQL client to manage your database and PHP module. You can install MySQL server, client, and module with the following command:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install mysql-server mysql-client php5-mysql&#60;/blockquote&#62;&#60;br /&#62;
MySQL should now be installed. The configuration file is located at: /etc/mysql/my.cnf&#60;/p&#62;
&#60;p&#62;Now we delegate control of MySQL to a user. By default MySQL runs on the root account with no password. Lets password protect the root account:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mysql -u root&#60;br /&#62;
 mysql&#38;gt; USE mysql;&#60;br /&#62;
 mysql&#38;gt; UPDATE user SET Password=PASSWORD('new-password') WHERE user='root';&#60;br /&#62;
 mysql&#38;gt; FLUSH PRIVILEGES;&#60;br /&#62;
 mysql&#38;gt; quit;&#60;/blockquote&#62;&#60;br /&#62;
Although we have password protected the root account, you must never use it in your production environment. The best practice is to create a user to connect to MySQL. Since we are finished with MySQL setup, we will now install a control panel called phpMyAdmin to do just that.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installing phpMyAdmin&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;phpMyAdmin is a web based database management and administration control panel that makes it easy to create and assign database permissions to users. It is very ‘lightweight’ and easy to setup and configure. In addition, it makes managing databases much easier. To install phpMyAdmin run the following command:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install phpmyadmin&#60;/blockquote&#62;&#60;br /&#62;
To set up phpMyAdmin under Apache you need to include the following line in the Apache configuration file found in /etc/apache2/apache2.conf&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;Include /etc/phpmyadmin/apache.conf&#60;/blockquote&#62;&#60;br /&#62;
To finish off, restart Apache.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/apache2 restart&#60;/blockquote&#62;&#60;br /&#62;
Point your browser to &#60;a href=&#34;http://ip.address/phpmyadmin&#34; rel=&#34;nofollow&#34;&#62;http://ip.address/phpmyadmin&#60;/a&#62; and log in with your root account. From here you can create a user to connect to the database for your PHP scripts.&#60;/p&#62;
&#60;p&#62;Last thing we will do is check to see how much memory is being used up by our new LAMP Server. To do that run:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;free –m&#60;/blockquote&#62;&#60;br /&#62;
After a reboot my system indicates I’m using 58MB RAM. Not bad for a full suite of server applications. That’s it, you have successfully set up a LAMP Server on Debian. Congratulations!
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Debian Etch - Apache Virtual Hosts"</title>
<link>http://howto.webbynode.com/topic.php?id=11#post-14</link>
<pubDate>Mon, 15 Jun 2009 03:42:46 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">14@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;This wiki article is intended to help you set up name based virtual hosts on the Apache Web server. Apache allows you to host several different domains and subdomains on a single IP. While this is an integral part of Apache, many people seem to struggle with setting up such a scenario.&#60;/p&#62;
&#60;p&#62;We will assume you already have Apache installed and configured on your webby. Also, we will assume you are trying to host two sites; &#60;a href=&#34;http://www.siteone.com,&#34; rel=&#34;nofollow&#34;&#62;www.siteone.com,&#60;/a&#62; which also hosts a blog on blog.siteone.com, and &#60;a href=&#34;http://www.sitetwo.com&#34; rel=&#34;nofollow&#34;&#62;www.sitetwo.com&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Adding Hosting Directories&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;By default, Apache serves files that are located in the hosting root folder, usually /var/www. You can put your site files just about anywhere, just make sure to be consistent and organized. For this article we will be creating the following directories for our first domain:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;mkdir /var/www/www.siteone.com&#60;br /&#62;
mkdir /var/www/www.siteone.com/public&#60;br /&#62;
mkdir /var/www/www.siteone.com/private&#60;br /&#62;
mkdir /var/www/www.siteone.com/cgi-bin&#60;br /&#62;
mkdir /var/www/www.siteone.com/logs&#60;/blockquote&#62;&#60;br /&#62;
And so on… repeating the process for &#60;a href=&#34;http://www.siteone.com&#34; rel=&#34;nofollow&#34;&#62;www.siteone.com&#60;/a&#62; with blog.siteone.com and &#60;a href=&#34;http://www.sitetwo.com.&#34; rel=&#34;nofollow&#34;&#62;www.sitetwo.com.&#60;/a&#62; This gives you the directories to place your publically served files in public, files you do not want to expose in private, CGI scripts in cgi-bin, logfiles in logs. Configure Virtual Hosts&#60;/p&#62;
&#60;p&#62;Next, we will add the configuration for each site to the default Apache configuration file found in /etc/apache2/apache2.conf&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;NameVirtualHost *:80&#60;br /&#62;
&#38;lt;VirtualHost *:80&#38;gt;&#60;br /&#62;
        ServerName &#60;a href=&#34;http://www.siteone.com&#34; rel=&#34;nofollow&#34;&#62;www.siteone.com&#60;/a&#62;&#60;br /&#62;
        DocumentRoot /var/www/www.siteone.com/public/&#60;/p&#62;
&#60;p&#62;        # Logfiles&#60;br /&#62;
        ErrorLog  /var/www/www.siteone.com/logs/error.log&#60;br /&#62;
        CustomLog /var/www/www.siteone.com/logs/access.log combined&#60;br /&#62;
&#38;lt;/VirtualHost&#38;gt;&#60;/blockquote&#62;&#60;br /&#62;
Notice we added NameVirtualHost * to the beginning of the configuration. This is to enable multiple host support and only needs to be specified once in the config. Then repeat for your subdomain (blog.siteone.com) and second domain (www.sitetwo.com):&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;&#38;lt;VirtualHost *:80&#38;gt;&#60;br /&#62;
        ServerName blog.siteone.com&#60;br /&#62;
        DocumentRoot /var/www/blog.siteone.com/public/&#60;/p&#62;
&#60;p&#62;        # Logfiles&#60;br /&#62;
        ErrorLog  /var/www/blog.siteone.com/logs/error.log&#60;br /&#62;
        CustomLog /var/www/blog.siteone.com/logs/access.log combined&#60;br /&#62;
&#38;lt;/VirtualHost&#38;gt;&#60;/p&#62;
&#60;p&#62;&#38;lt;VirtualHost *:80&#38;gt;&#60;br /&#62;
        ServerName blog.siteone.com&#60;br /&#62;
        DocumentRoot /var/www/www.sitetwo.com/public/&#60;/p&#62;
&#60;p&#62;        # Logfiles&#60;br /&#62;
        ErrorLog  /var/www/www.sitetwo.com/logs/error.log&#60;br /&#62;
        CustomLog /var/www/www.sitetwo.com/logs/access.log combined&#60;br /&#62;
&#38;lt;/VirtualHost&#38;gt;&#60;/blockquote&#62;&#60;br /&#62;
This sets up two sites, which have their docements and logfiles contained beneath /var/www/nameofsite.com. You can adjust the paths if you wish to keep the files elsewhere. Now put some content in the public folders.&#60;/p&#62;
&#60;p&#62;To finish off, just restart Apache:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/apache2 restart&#60;/blockquote&#62;&#60;br /&#62;
That's it. Hopefully now you should be able to surf to your new sites through unique domain names. If you run into a problem don't forget to add DNS zones for your new sites. Congratulations on setting up virtual hosts!
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Debian Etch - Security &#38; Hardening"</title>
<link>http://howto.webbynode.com/topic.php?id=10#post-13</link>
<pubDate>Mon, 15 Jun 2009 03:40:46 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">13@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;This wiki article will cover basic security in Debian, from securing SSH to installing and configuring iptables. You will learn how to restrict access to your webby to a small number of selected individuals (or PCs) and design a very simple but effective firewall solution.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Sudo &#38;amp; SSH&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;First of all, if you are still using the root account to manage your webby you should know that this can be hazardous if your webby is ever compromised. For this reason let's create a new superuser that will have admin permissions. Obviously replace the username with something else and choose a good, long password:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;adduser newsuperuser&#60;/blockquote&#62;&#60;br /&#62;
We will need to add the user to sudo so that you can perform administrative tasks. This is changed in the /etc/sudoers file or by just typing 'visudo':&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/sudoers&#60;/blockquote&#62;&#60;br /&#62;
If, for some reason, you do not have sudo installed you can install it with:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install sudo&#60;/blockquote&#62;&#60;br /&#62;
In /etc/sudoers you want to add the privileges for the new user to the end of the file. There should already be a root user in there so copy that line:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;newsuperuser ALL=(ALL) ALL&#60;/blockquote&#62;&#60;br /&#62;
Let’s take a look at the default SSH configuration:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/ssh/sshd_config&#60;/blockquote&#62;&#60;br /&#62;
We want to change the port SSH uses to an ambiguous, indistinct number. Look for the line that says ‘Port 22’ and change it. For example,&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;Port 12345&#60;/blockquote&#62;&#60;br /&#62;
The next level of security to apply to SSH is to disallowing login by the root user. You’ll want to search for the “PermitRootLogin yes” line and change it to deny root login attempts, as such:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;PermitRootLogin no&#60;/blockquote&#62;&#60;br /&#62;
Finally, restart the SSH service:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;/etc/init.d/ssh restart&#60;/blockquote&#62;&#60;br /&#62;
Now log out and log back in with your new superuser account. You should now have a pretty tightened down machine when it comes to SSH, stopping most brute force crack attempts in their tracks. Let’s move on to the next topic.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;iptables&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Iptables is defined as a “user space tool by which administrators create rules for the packet filtering”, but for simplicity iptables is just a firewall within Linux. If for some reason it’s not on your webby, iptables can be installed with apt-get, as such:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;sudo apt-get install iptables&#60;/blockquote&#62;&#60;br /&#62;
We’ll have iptables open and close ports that will be commonly used; ssh, http, and https. Note that changing iptables rules will require us to be logged in as root again. To switch to the root user type:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;sudo -i&#60;/blockquote&#62;&#60;br /&#62;
As root, lets backup existing rules to /etc/iptables.rules and check which rules are currently running&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;iptables-save &#38;gt; /etc/iptables.old.rules&#60;br /&#62;
iptables -L&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;You will see some output that basically indicates all connects are open for incoming and outgoing traffic. Lets add some rules to iptables. First, let’s allow all outbound traffic and incoming ping requests:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;iptables -A OUTPUT -j ACCEPT&#60;br /&#62;
iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT&#60;/blockquote&#62;&#60;br /&#62;
Next, allow incoming ssh, http and https connections:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;iptables -A INPUT -p tcp --dport 80 -j ACCEPT&#60;br /&#62;
iptables -A INPUT -p tcp --dport 443 -j ACCEPT&#60;br /&#62;
iptables -A INPUT -p tcp -m state --state NEW --dport 12345 -j ACCEPT&#60;/blockquote&#62;&#60;br /&#62;
Remember that the –dport should be the same as the one you set in /etc/ssh/sshd_config. Next, lets enable denied call logging, previously established connections and allow loopback traffic :&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;iptables -A INPUT -m limit --limit 15/min -j LOG --log-level 7 --log-prefix &#34;iptables blocked: &#34;&#60;br /&#62;
iptables -A INPUT -s 127.0.0.1 -j ACCEPT&#60;br /&#62;
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT&#60;/blockquote&#62;&#60;br /&#62;
Last but not least, deny all other incoming traffic:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;iptables -A INPUT -j REJECT&#60;br /&#62;
iptables -A FORWARD -j REJECT&#60;/blockquote&#62;&#60;br /&#62;
Pass the ‘iptables –L’ command again to make sure everything looks good. Keep in mind that these are just basic rules and I encourage you to explore iptables further if you wish to learn the more advanced features. Let’s apply the rules and permanently save them on our webby:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;iptables-save &#38;gt; /etc/iptables.rules&#60;/blockquote&#62;&#60;br /&#62;
Now we need to make sure that the iptables rules we created survive a reboot. Even though they are saved in /etc/iptables.up.rules, they are not loaded by default when the webby restarts. To make the rules load during start, edit the /etc/rc.local file&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/rc.local&#60;/blockquote&#62;&#60;br /&#62;
and add the following line of code to the end of the file&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;iptables-restore &#38;lt; /etc/iptables.rules&#60;/blockquote&#62;&#60;br /&#62;
Just as you would expect, this will restore the iptables rules from the /etc/iptables.rules file.&#60;/p&#62;
&#60;p&#62;Now restart your webby and give another ‘iptables –L’ command (from root) to make sure the changes were effective. If everything looks normal, congratulations on securing your webby!
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Debian Etch - Setup and Updating"</title>
<link>http://howto.webbynode.com/topic.php?id=9#post-12</link>
<pubDate>Mon, 15 Jun 2009 01:57:39 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">12@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Setup &#38;amp; Updating&#60;/p&#62;
&#60;p&#62;This article will walk you through basic setup and updating procedures to get your webby ready for web hosting, development, or whatever else you may choose to do with it. It is meant to give you a better understanding of the Debian environment and what is happening within it.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Account Management&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Let’s begin by setting up a few basics. Connect to your webby as root using your favorite SSH client, or optionally you may work from console, accessible from the management portal. Once you’re logged in, immediately change your root password.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;passwd&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;As you may know, for security reasons it’s not recommended to log in to your webby using the root account. We only logged in with root this one time to do the initial setup. With that in mind, let’s create a user we will be using instead of root from now on. Choose your own name instead of poweruser.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;adduser poweruser&#60;/blockquote&#62;&#60;br /&#62;
Now we must give the poweruser account some administrative rights. Before we can do that though, it may be necessary to install sudo onto your webby.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;apt-get install sudo&#60;/blockquote&#62;&#60;br /&#62;
Sudo stands for super user do and it enables a regular user such as poweruser to run administrative tasks that would typically be available only to root. To enable sudo for the new user, let’s look at the /etc/sudoers file and give our new user super user privileges.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;nano /etc/sudoers&#60;/blockquote&#62;&#60;br /&#62;
Add to the end of file:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;poweruser ALL=(ALL) ALL&#60;/blockquote&#62;&#60;br /&#62;
You should now be able to log in with your new account and use sudo to perform administrative tasks. When you run a command using sudo, you will be asked for the root password.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Updating the base system&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;We are now ready to update our webby. Let’s start by updating the list of packages available to us.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;sudo apt-get update&#60;/blockquote&#62;&#60;br /&#62;
Updating works by looking at a list of repositories located in /etc/apt/sources.list. If you plan to install 3rd-party or non-standard software, you may wish to edit your sources.list with your favorite editor (I use nano).&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;sudo nano /etc/apt/sources.list&#60;/blockquote&#62;&#60;br /&#62;
To install the latest security updates and bug fixes, type the full upgrade commands:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;sudo apt-get upgrade&#60;br /&#62;
sudo apt-get dist-upgrade&#60;/blockquote&#62;&#60;br /&#62;
After the first command you may be asked to set your timezone. If you are not you may now set it manually for your home location.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;sudo ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime&#60;/blockquote&#62;&#60;br /&#62;
This creates a symbolic link from /etc/localtime to a file in /usr/share/zoneinfo corresponding with what zone you are in. Have a look in the directories under /usr/share/zoneinfo to see what timezones are available.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Resource Checks&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Before we finish, we’ll run several system utilities to verify the resources on your webby. Start by looking at the memory usage.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;free –m&#60;/strong&#62;&#60;br /&#62;
You should see a table reporting your memory usage. Focus your attention on the second line, starting with -/+ buffers/cache. Under the used column, you will see how much memory applications on your webby use. Above that you might see a higher number, but this is because it reports memory already used for buffers and cached. A more powerful command, top, shows how much processing power and memory is being used and for which running processes.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;top –bn 1&#60;/blockquote&#62;&#60;br /&#62;
This will run top in batch mode with one iteration, so that you get a nice and clean output of everything running. Keep in mind that running top with the -bn switches is like taking a snapshot, while running it without them would provide you an ongoing look at processor activity in real-time.&#60;/p&#62;
&#60;p&#62;Next, let’s take a look at disk usage:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;df&#60;/blockquote&#62;&#60;br /&#62;
Df simply shows the amount of total and available disk space on a file system.&#60;/p&#62;
&#60;p&#62;Well, now your system is up to date, you have a new user account that can perform administrative tasks, and you are aware of the resources in your working environment. Whatever your choose to use it for, you should now be aware of how to take your webby from a barebones system to something with a little more meat on it.
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Unattended Ruby / Passenger Installation"</title>
<link>http://howto.webbynode.com/topic.php?id=8#post-11</link>
<pubDate>Mon, 15 Jun 2009 01:51:01 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">11@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;For those who are lazy and like script try &#60;a href=&#34;http://gist.github.com/37213&#34;&#62;this script&#60;/a&#62; to setup a rails stack using ruby enterprise and the marvelous passenger gem. Download and run the script, get a cup of joe and return to deploy your applications on your fresh stack.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;#!/bin/bash&#60;br /&#62;
# Unattended REE/Passenger installation&#60;br /&#62;
# Source: &#60;a href=&#34;http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/&#34; rel=&#34;nofollow&#34;&#62;http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/&#60;/a&#62;&#60;br /&#62;
# 15/03/09 Updated to use latest r.e.e. and passenger 2.1 and rewrote bits thanks to the comments left on my blog. Thanks guys&#60;/p&#62;
&#60;p&#62;if [ &#34;$(whoami)&#34; != &#34;root&#34; ]; then&#60;br /&#62;
  echo &#34;You need to be root to run this!&#34;&#60;br /&#62;
  exit 2&#60;br /&#62;
fi&#60;/p&#62;
&#60;p&#62;VERSION=&#34;1.2&#34;&#60;br /&#62;
REEV=&#34;http://rubyforge.org/frs/download.php/51100/ruby-enterprise-1.8.6-20090201.tar.gz&#34;&#60;br /&#62;
REEF=&#34;ruby-enterprise-1.8.6-20090201.tar.gz&#34;&#60;br /&#62;
REEFF=${REEF%&#34;.tar.gz&#34;}&#60;br /&#62;
PASSENGER=&#34;2.1.2&#34;&#60;br /&#62;
export PASSENGER&#60;/p&#62;
&#60;p&#62;echo &#34;#####################################&#34;&#60;br /&#62;
echo &#34;Welcome, let's get this party rollin'&#34;&#60;br /&#62;
echo &#34;#####################################&#34;&#60;/p&#62;
&#60;p&#62;echo &#34;Updating Aptitude&#34;&#60;br /&#62;
apt-get update&#60;/p&#62;
&#60;p&#62;echo &#34;Installing build essentials&#34;&#60;br /&#62;
apt-get install build-essential zlib1g-dev libssl-dev wget libreadline5-dev -y&#60;/p&#62;
&#60;p&#62;echo &#34;Installing GIT&#34;&#60;br /&#62;
apt-get install -y git-core&#60;/p&#62;
&#60;p&#62;echo &#34;Installing apache&#34;&#60;br /&#62;
apt-get install -y apache2&#60;/p&#62;
&#60;p&#62;echo &#34;Installing apache headers&#34;&#60;br /&#62;
apt-get install -y apache2-prefork-dev&#60;/p&#62;
&#60;p&#62;echo &#34;Installing Ruby Enterprise from following url&#34;&#60;br /&#62;
echo $REEV&#60;br /&#62;
wget $REEV&#60;/p&#62;
&#60;p&#62;if [ -e $REEF ]&#60;br /&#62;
then&#60;br /&#62;
  echo &#34;File downloaded succesful&#34;&#60;/p&#62;
&#60;p&#62;else&#60;br /&#62;
  echo &#34;Error, file wasn't downloaded!&#34;&#60;br /&#62;
  exit&#60;br /&#62;
fi&#60;/p&#62;
&#60;p&#62;tar -zxvf $REEF&#60;br /&#62;
# possible options perhaps for checker&#60;br /&#62;
# --extra rails --no-tcmalloc&#60;/p&#62;
&#60;p&#62;if [ -d ./$REEFF ]&#60;br /&#62;
then&#60;br /&#62;
   ./$REEFF/installer --auto /opt/ruby&#60;br /&#62;
  echo &#34;Dir test&#34;&#60;br /&#62;
else&#60;br /&#62;
  echo &#34;Dir not found, exiting..&#34;&#60;br /&#62;
  exit&#60;br /&#62;
fi&#60;/p&#62;
&#60;p&#62;echo &#34;Creating ruby symlinks&#34;&#60;br /&#62;
ln -s /opt/ruby/bin/ruby /usr/bin/ruby&#60;br /&#62;
ln -s /opt/ruby/bin/gem /usr/bin/gem&#60;br /&#62;
ln -s /opt/ruby/bin/rake /usr/bin/rake&#60;br /&#62;
ln -s /opt/ruby/bin/rails /usr/bin/rails&#60;/p&#62;
&#60;p&#62;echo &#34;Installing other gems&#34;&#60;br /&#62;
gem install rails&#60;br /&#62;
gem install will_paginate&#60;br /&#62;
gem install shoulda&#60;br /&#62;
gem install mysql&#60;/p&#62;
&#60;p&#62;echo &#34;Installing passenger&#34;&#60;br /&#62;
gem install passenger -v=$PASSENGER&#60;/p&#62;
&#60;p&#62;echo &#34;Config passenger&#34;&#60;br /&#62;
yes '' &#124; /opt/ruby/bin/passenger-install-apache2-module&#60;/p&#62;
&#60;p&#62;echo &#34;Copying passenger files&#34;&#60;br /&#62;
touch /etc/apache2/mods-available/passenger.load&#60;br /&#62;
touch /etc/apache2/mods-available/passenger.conf&#60;/p&#62;
&#60;p&#62;echo &#34;LoadModule passenger_module /opt/ruby/lib/ruby/gems/1.8/gems/passenger-$PASSENGER/ext/apache2/mod_passenger.so&#34; &#38;gt;&#38;gt; /etc/apache2/mods-available/passenger.load&#60;br /&#62;
echo &#34;PassengerRoot /opt/ruby/lib/ruby/gems/1.8/gems/passenger-$PASSENGER&#60;br /&#62;
PassengerRuby /opt/ruby/bin/ruby&#34; &#38;gt;&#38;gt; /etc/apache2/mods-available/passenger.conf&#60;/p&#62;
&#60;p&#62;echo &#34;Enabling passenger module&#34;&#60;br /&#62;
a2enmod passenger&#60;/p&#62;
&#60;p&#62;echo &#34;Reloading apache&#34;&#60;br /&#62;
/etc/init.d/apache2 reload&#60;/p&#62;
&#60;p&#62;echo &#34;##########################&#34;&#60;br /&#62;
echo &#34;# Installation Complete&#34;&#60;br /&#62;
echo &#34;##########################&#34;&#60;br /&#62;
sleep 2&#60;br /&#62;
echo &#34;##########################&#34;&#60;br /&#62;
echo &#34;# Installed Ruby Version #&#34;&#60;br /&#62;
echo &#34;##########################&#34;&#60;br /&#62;
ruby -v&#60;br /&#62;
echo &#34;##########################&#34;&#60;br /&#62;
echo &#34;# Installed Gems Version #&#34;&#60;br /&#62;
echo &#34;##########################&#34;&#60;br /&#62;
gem -v&#60;br /&#62;
/opt/ruby/bin/passenger-status&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Contributed by Maran
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Ubuntu Hardy - Creating a RubyGems Mirror With HTTP Basic Authentication"</title>
<link>http://howto.webbynode.com/topic.php?id=7#post-10</link>
<pubDate>Mon, 15 Jun 2009 01:48:00 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">10@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Would you like to create your own RubyGems remote repository that bypasses the sometimes overloaded RubyForge mirrors? Here's how. In addition, you can see how to create a repository that is user/password protected, which allows you to restrict the repository for remote and internal use, preventing public Internet usage of the server and your company's bandwidth. This article also explains how to set up each user environment to access the remote repository that is created.&#60;/p&#62;
&#60;p&#62;Note: The following environment was used for the procedures in this article: Solaris 10 Operating System, Apache version 2.2.6, Ruby version 1.8.6p114, and RubyGems version 1.2.0. The Apache2 package was installed via CSK 1.2, see Optimized Open Source Software Stack (Cool Stack). Repository Access Method After Completion&#60;/p&#62;
&#60;p&#62;After using the procedures in this article, you should have two repositories that have a setup similar to the following (but with a different domain, that is, not blah.com) and a user/password combination:&#60;/p&#62;
&#60;p&#62;&#60;li&#62;&#60;a href=&#34;http://gems.blah.com/dev:&#34; rel=&#34;nofollow&#34;&#62;http://gems.blah.com/dev:&#60;/a&#62; This gets updated from RubyForge every Sunday morning at 3 a.m.&#60;/li&#62;&#60;li&#62;&#60;a href=&#34;http://gems.blah.com/stable:&#34; rel=&#34;nofollow&#34;&#62;http://gems.blah.com/stable:&#60;/a&#62; This is a stable list of gems used for QA, staging, and production environments. This should be used for environments that standardize on software.&#60;/li&#62;&#60;/p&#62;
&#60;p&#62;You can then access your repository using the following authentication method:&#60;/p&#62;
&#60;p&#62;user: gems pass: password&#60;/p&#62;
&#60;p&#62;Prerequisites&#60;/p&#62;
&#60;p&#62;1. First, upgrade your RubyGems to the latest and greatest version, if possible (at the time of this writing, 2.1.0).&#60;/p&#62;
&#60;p&#62;2. Then download the prerequisite Cool Stack (CSKruby) package and install it.&#60;/p&#62;
&#60;p&#62;3. Use the following command to install the gem builder (XML Builder library) that is used to create the yaml index:&#60;/p&#62;
&#60;p&#62;gem install builder&#60;/p&#62;
&#60;p&#62;Creating RubyForge Mirror&#60;/p&#62;
&#60;p&#62;1. Set up the mirror configuration file by creating a /root/.gemmirrorrc file with the following:&#60;/p&#62;
&#60;p&#62;— - from: &#60;a href=&#34;http://gems.rubyforge.org/&#34; rel=&#34;nofollow&#34;&#62;http://gems.rubyforge.org/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;to: /gemrepo/dev&#60;/blockquote&#62;&#60;br /&#62;
This example creates an “everything” repository that's the latest and greatest within the /gemrepo/dev directory. Change this directory location to suit your needs.&#60;/p&#62;
&#60;p&#62;2. To download gems, run the gem command to create the mirror. (You may want to run this in screen mode.)&#60;/p&#62;
&#60;p&#62;gem mirror&#60;/p&#62;
&#60;p&#62;3. Create a yaml index file that has all the gem information. (You may want to run this in screen mode.)&#60;/p&#62;
&#60;p&#62;gem generate_index -d /gemrepo/dev&#60;/p&#62;
&#60;p&#62;Note: This command should be run in the directory that contains the gems directory.&#60;/p&#62;
&#60;p&#62;Sample output:&#60;/p&#62;
&#60;p&#62;gem generate_index -d /gemrepo/dev Loading 15132 gems from /gemrepo/dev …………………………………….. …………………………………….. …………………………………….. …&#60;/p&#62;
&#60;p&#62;Setting Up Apache Permissions&#60;/p&#62;
&#60;p&#62;Next, set up HTTP basic authentication against the gem repository, so users must authenticate to access the repository. Requiring authentication enables you to control who can use the server and prevents the repository from being publicly available. This is useful if you want to control what is distributed.&#60;/p&#62;
&#60;p&#62;For instance, here is an example based on the domain blah.com. Change the domain to match your environment settings.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;&#38;lt;VirtualHost *:80&#38;gt;&#60;br /&#62;
      ServerName gems.blah.com&#60;br /&#62;
      ServerAdmin &#60;a href=&#34;mailto:webmaster@blah.com&#34;&#62;webmaster@blah.com&#60;/a&#62;&#60;br /&#62;
      DocumentRoot /gemrepo&#60;br /&#62;
      &#38;lt;Directory /&#38;gt;&#60;br /&#62;
              Options Indexes FollowSymLinks MultiViews&#60;br /&#62;
              AllowOverride None&#60;br /&#62;
      &#38;lt;/Directory&#38;gt;&#60;/blockquote&#62;&#60;br /&#62;
&#60;blockquote&#62;      &#38;lt;Directory /gemrepo/ &#38;gt;&#60;br /&#62;
              Options Indexes FollowSymLinks MultiViews&#60;br /&#62;
              AllowOverride None&#60;br /&#62;
     AuthName &#34;Dev Access&#34;&#60;br /&#62;
      AuthType Basic&#60;br /&#62;
      AuthBasicProvider file&#60;br /&#62;
      AuthUserFile /opt/coolstack/apache2/conf/htpasswd.users&#60;br /&#62;
      Require user gems&#60;br /&#62;
# user: gems # pass: password&#60;br /&#62;
              Order allow,deny&#60;br /&#62;
              allow from all&#60;br /&#62;
      &#38;lt;/Directory&#38;gt;&#60;/blockquote&#62;&#60;br /&#62;
      ErrorLog /var/log/httpd/error-gems.log&#60;br /&#62;
      LogLevel warn&#60;br /&#62;
      CustomLog /var/log/httpd/access-gems.log combined&#60;br /&#62;
      ServerSignature Off&#60;br /&#62;
&#38;lt;/VirtualHost&#38;gt;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Configuring Ruby Client&#60;br /&#62;
&#60;/strong&#62;&#60;br /&#62;
Since you're using your own repository with a password (so the public doesn't mooch off of you), you need to include a $HOME/.gemrc file by using the following:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;# cat $HOME/.gemrc gem: –source &#60;a href=&#34;http://gems:password@gems.blah.com/dev/&#34; rel=&#34;nofollow&#34;&#62;http://gems:password@gems.blah.com/dev/&#60;/a&#62;&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Note: The /dev/ can be changed to match your environment, for example, /stable/. Creating Other Repositories&#60;/p&#62;
&#60;p&#62;The /dev repository has every gem available and its version. You can then create a /gemrepo/stable/gems directory with all the gems you standardize for, let's say, production, staging, and QA, since these should have a similar repository setup.&#60;/p&#62;
&#60;p&#62;Once, you copy the gems, you then just create the index in the parent, for example:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;cd /gemrepo/stable gem generate_index -d /gemrepo/stable&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Change your $HOME/.gemrc file to reflect the changes. Keeping Your Repository Up to Date&#60;/p&#62;
&#60;p&#62;Create a script that will update the repositories.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;# cat /root/bin/gem-mirror.sh&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;#!/bin/ksh # Author: William D. Pool # Description: This will update the dev mirror with # The latest gems. It will also run an index on dev / stable # So, everything is clean, you still have to manually place # a gem into the /gemrepo/stable/gems directory for it to be # indexed! # # Put into Crontab # # 30 3 * * 0 /root/bin/gem-mirror.sh &#38;gt; /dev/null 2&#38;gt;&#38;amp;1 # gem mirror –no-verbose -q gem generate_index -d /gemrepo/dev gem generate_index -d /gemrepo/stable&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Throw it into cron!&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;30 3 * * 0 /root/bin/gem-mirror.sh &#38;gt; /dev/null 2&#38;gt;&#38;amp;1&#60;/blockquote&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Ruby on Rails - Ubuntu Hardy"</title>
<link>http://howto.webbynode.com/topic.php?id=6#post-9</link>
<pubDate>Mon, 15 Jun 2009 00:37:03 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">9@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;Ruby on Rails is a web application framework designed to make web development faster, simpler, and more efficient. This wiki article will show you how you can install Ruby on Rails and configure it to work with a web server and database on your webby.&#60;/p&#62;
&#60;p&#62;Ruby is a interpreted programming language inspired by Perl and Ada and designed over 10 years ago. Rails is a web application framework written in Ruby. Although Rails supports several different databases and web servers, we will be installing Nginx and MySQL alongside Ruby on Rails. Throughout the article we will use a mixture of different installation procedures, using apt-get in some situations and installing from source in others.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Installing the Essentials&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;We'll be hosting our RoR apps using Nginx, Mongrels and MySQL. I chose this configuration because I saw much better benchmark results while testing the different front ends and database servers. But of course you can use your own combination as you see fit. First, we will install the build-essentials package needed to make many source installations:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  apt-get install build-essential&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Now go ahead and install Nginx:&#60;/p&#62;
&#60;p&#62;  &#60;blockquote&#62;apt-get install nginx&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Next, we install MySQL and the required Ruby API:&#60;/p&#62;
&#60;p&#62;  &#60;blockquote&#62;apt-get install mysql-server mysql-client libmysqlclient15-dev libmysql-ruby&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;You will be asked for a password during install. Give it any password you like. Later, you can change your MySQL root password with this command:&#60;/p&#62;
&#60;p&#62; &#60;blockquote&#62; mysqladmin -u root -p password new_password&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;Installing Ruby, Gems and Rails&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Let's proceed with the Ruby install. We will be installing everything including documentation (RDoc and Ri):&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;After Ruby install finishes we need to create some dynamic links from the install location:&#60;/p&#62;
&#60;p&#62; &#60;blockquote&#62; ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby&#60;br /&#62;
  ln -s /usr/bin/ri1.8 /usr/local/bin/ri&#60;br /&#62;
  ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc&#60;br /&#62;
  ln -s /usr/bin/irb1.8 /usr/local/bin/irb&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;You can varify the version with:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  ruby -v&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Now we'll need to install RubyGems, &#34;the Ruby standard for publishing and managing third party libraries&#34;. Basically it will let us download Rails and any other framework packages later on. Head on over to &#60;a href=&#34;http://rubyforge.org/projects/rubygems/&#34; rel=&#34;nofollow&#34;&#62;http://rubyforge.org/projects/rubygems/&#60;/a&#62; and grab the latest release (v. 1.3.1 at the time of writing this). Download it right to the root of your stack and extract:&#60;/p&#62;
&#60;p&#62;  &#60;blockquote&#62;wget &#60;a href=&#34;http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz&#34; rel=&#34;nofollow&#34;&#62;http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz&#60;/a&#62;&#60;br /&#62;
  tar -xvf rubygems-1.3.1&#60;br /&#62;
  cd rubygems-1.3.1.tgz&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Now we need to compile it and create another symlink:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  ruby setup.rb&#60;br /&#62;
  ln -s /usr/bin/gem1.8 /usr/bin/gem&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Check your version of Gems with:&#60;/p&#62;
&#60;p&#62; &#60;blockquote&#62; gem -v&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Now install rails using RubyGems:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  gem install rails&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Rails installation might take a while, but after it is finished you can verify your installation with:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  rails -v&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Now we'll go ahead and install a the mongrel web server and mongrel cluster. Mongrel is a lightweight web server that Nginx will proxy requests to. We'll use mongrels to serve our RoR applications faster:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  gem install mongrel&#60;br /&#62;
  gem install mongrel_cluster&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Now you can create a new rails application for testing, calling it 'railsapp'. It doesn't really matter where you make it but I chose the /var/rails directory:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  mkdir /var/rails&#60;br /&#62;
  cd /var/rails&#60;br /&#62;
  rails railsapp&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;You will see rails create the files needed by our first application. Great, everything is installed and we are ready to move on and do some basic configuration.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Configuring Nginx and Mongrel&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Now that everything we need is installed there are only but a few steps left to tie it all together and make it work. Let us first take a look at the Nginx configuration and point it to our new application. Create a new config file in Nginx's sites-available directory that you would like pointing to the dummy app we made (replace domain.com with your domain):&#60;/p&#62;
&#60;p&#62;  &#60;blockquote&#62;nano /etc/nginx/sites-available/railsapp.domain.com&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Paste the following into the new configuration and edit whatever is needed to change, such as the location of the application or your domain name:&#60;/p&#62;
&#60;p&#62; &#60;blockquote&#62; upstream railsapp {&#60;br /&#62;
        server 127.0.0.1:5000;&#60;br /&#62;
        server 127.0.0.1:5001;&#60;br /&#62;
        server 127.0.0.1:5002;&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;  server {&#60;br /&#62;
            listen   80;&#60;br /&#62;
            server_name railsapp.domain.com;&#60;/p&#62;
&#60;p&#62;            access_log /var/rails/railsapp/log/access.log;&#60;br /&#62;
            error_log /var/rails/railsapp/log/error.log;&#60;/p&#62;
&#60;p&#62;            root   /var/rails/railsapp/public/;&#60;br /&#62;
            index  index.html;&#60;/p&#62;
&#60;p&#62;            location / {&#60;br /&#62;
                          proxy_set_header  X-Real-IP  $remote_addr;&#60;br /&#62;
                          proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;&#60;br /&#62;
                          proxy_set_header Host $http_host;&#60;br /&#62;
                          proxy_redirect false;&#60;/p&#62;
&#60;p&#62;                          if (-f $request_filename/index.html) {&#60;br /&#62;
                                           rewrite (.*) $1/index.html break;&#60;br /&#62;
                          }&#60;/p&#62;
&#60;p&#62;                          if (-f $request_filename.html) {&#60;br /&#62;
                                           rewrite (.*) $1.html break;&#60;br /&#62;
                          }&#60;/p&#62;
&#60;p&#62;                          if (!-f $request_filename) {&#60;br /&#62;
                                           proxy_pass &#60;a href=&#34;http://railsapp;&#34; rel=&#34;nofollow&#34;&#62;http://railsapp;&#60;/a&#62;&#60;br /&#62;
                                           break;&#60;br /&#62;
                          }&#60;br /&#62;
            }&#60;/p&#62;
&#60;p&#62;  }&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;The first few lines of the configuration are the proxy to mongrels, which we will configure next. But first, proceed by creating a symbolic link to the sites-enabled directory to enable our new virtual host:&#60;/p&#62;
&#60;p&#62; &#60;blockquote&#62; ln -s /etc/nginx/sites-available/railsapp.domain.com /etc/nginx/sites-enabled/railsapp.domain.com&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Now let's move into our new rails application and create a mongrel cluster:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  cd /var/rails/railsapp&#60;br /&#62;
  mongrel_rails cluster::configure -e production -p 5000 -N 3 -c /var/rails/railsapp -a 127.0.0.1&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;This will create a mongrels configuration in YAML format in config/mongrel_cluster.yml. You can open this file any time to change the parameters mongrels uses. The last thing we need to do is start the mongrel cluster from within our railsapp directory:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  mongrel_rails cluster:start&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Also, go ahead and restart Nginx to apply the new virtual host we created&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;  /etc/init.d/nginx restart&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;You can now browse to your site (http://railsapp.domain.com) and see your new Rails application in action. This is all you need to get started with Ruby on Rails hosted on your webby. Good luck and happy hacking!
&#60;/p&#62;</description>
</item>
<item>
<title>carlos on "Ubuntu Hardy - Multiple Rails Apps with Passenger"</title>
<link>http://howto.webbynode.com/topic.php?id=5#post-8</link>
<pubDate>Mon, 15 Jun 2009 00:28:58 +0000</pubDate>
<dc:creator>carlos</dc:creator>
<guid isPermaLink="false">8@http://howto.webbynode.com/</guid>
<description>&#60;p&#62;The installer provides exhaustive built-in documentation, describes every step and suggests solution for every unmet requirement like “please install Apache headers with apt-get install apache2-prefork-dev”. Other guys and we all can learn a lot from mod_rails about how a perfect installer looks like.&#60;/p&#62;
&#60;p&#62;At the end of the installation process it asks to put three configuration lines into apache configuration file although it does not tell how. According to online documentation the requirement is that these lines should be only executed once.&#60;/p&#62;
&#60;p&#62;So my solution (in Debian way) is to&#60;/p&#62;
&#60;p&#62;create new passenger.load file in /etc/apache2/mods-available&#60;br /&#62;
create a symbolic link to it a2enmod passenger&#60;br /&#62;
Then I followed the documentation. But I had to make an additional change to enable the FollowSymLinks.&#60;/p&#62;
&#60;p&#62;It was also not clear from the documentation how to set up multiple applications to the same VirtualHost and that RailsBaseURI is allowed multiple times. So I had to experiment. Here is the result (works on Ubuntu 7.10):&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;&#38;lt;VirtualHost *:80&#38;gt;&#60;/p&#62;
&#60;p&#62;ServerAdmin &#60;a href=&#34;mailto:admin@example.com&#34;&#62;admin@example.com&#60;/a&#62;&#60;br /&#62;
ServerName myapps.example.com&#60;br /&#62;
  DocumentRoot /home/passenger&#60;br /&#62;
  RailsBaseURI /app1&#60;br /&#62;
  RailsBaseURI /app2&#60;br /&#62;
  &#38;lt;Directory /home/passenger&#38;gt;&#60;br /&#62;
    AllowOverride All&#60;br /&#62;
  &#38;lt;/Directory&#38;gt;&#60;br /&#62;
&#38;lt;/VirtualHost&#38;gt;&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Then for every additional application you need to&#60;/p&#62;
&#60;p&#62;copy your application to some folder, e.g. /home/myprojects/app2&#60;br /&#62;
set owner for your project folder to www-data:www-data&#60;br /&#62;
create a link from public folder of your rails application to /home/passenger&#60;br /&#62;
add one line to your site configuration RailsBaseURI /app2&#60;br /&#62;
restart apache&#60;br /&#62;
I did not find any way to avoid last two tasks. Hopefully the next version of passenger will offer some sort of wildcard-based mass-RailsBaseURI.&#60;/p&#62;
&#60;p&#62;Current mod_proxy advantages:&#60;/p&#62;
&#60;p&#62;no ActionController::AbstractRequest.relative_url_root requierd anymore&#60;br /&#62;
no obscure mod_proxy_html&#60;br /&#62;
SSL is now possible for multiple Rails applications on the same server (VirtualHosts on the same IP address do not work with SSL)&#60;br /&#62;
TODO:&#60;/p&#62;
&#60;p&#62;did not have time yet to configure with capistrano, simply checked in the file `tmp/restart.txt’. Every time I do ‘svn update’, the application is automatically restarted.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
