<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Linux Sysadmin Blog</title>
	
	<link>http://linuxsysadminblog.com</link>
	<description />
	<lastBuildDate>Tue, 10 May 2011 03:23:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/LinuxSystemAdminsBlog" /><feedburner:info uri="linuxsystemadminsblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Colbert tells how Barr stuck his penis into the Anonymous hornets nest</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/rgSeCallZI8/</link>
		<comments>http://linuxsysadminblog.com/2011/05/colbert-tells-how-barr-stuck-his-penis-into-the-anonymous-hornets-nest/#comments</comments>
		<pubDate>Tue, 10 May 2011 03:23:06 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1351</guid>
		<description><![CDATA[I realized that I missed a great episode of Colbert when a friend described at lunch how Colbert had likened the Barr attack on anonymous to him sticking his penis to the hornets nest. I hope you enjoy a laugh. For a good article on how anonymous got into Barrs accounts read this Ars Technica [...]]]></description>
			<content:encoded><![CDATA[<p>I realized that I missed a great episode of Colbert when a friend described at lunch how Colbert had likened the Barr attack on anonymous to him sticking his penis to the hornets nest.  I hope you enjoy a laugh.  For a good article on how anonymous got into Barrs accounts read this Ars Technica article on <a href="http://arstechnica.com/tech-policy/news/2011/02/anonymous-speaks-the-inside-story-of-the-hbgary-hack.ars">Anonymous and HBGary hacking</a>.  It is a great study on how to improve your security and how vulnerable a corporation may be due to lax security practices.</p>
<div style="background-color:#000000;width:520px;">
<div style="padding:4px;"><embed src="http://media.mtvnservices.com/mgid:cms:video:colbertnation.com:375428" width="512" height="288" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" base="." flashVars=""></embed>
<p style="text-align:left;background-color:#FFFFFF;padding:4px;margin-top:4px;margin-bottom:0px;font-family:Arial, Helvetica, sans-serif;font-size:12px;"><b><a href="http://www.colbertnation.com/the-colbert-report-videos/375428/february-24-2011/corporate-hacker-tries-to-take-down-wikileaks">The Colbert Report</a></b><br/>Tags: <a href='http://www.colbertnation.com/full-episodes/'>Colbert Report Full Episodes</a>,<a href='http://www.indecisionforever.com/'>Political Humor &#038; Satire Blog</a>,<a href='http://www.colbertnation.com/video'>Video Archive</a></p>
</div>
</div>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/rgSeCallZI8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/05/colbert-tells-how-barr-stuck-his-penis-into-the-anonymous-hornets-nest/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/05/colbert-tells-how-barr-stuck-his-penis-into-the-anonymous-hornets-nest/</feedburner:origLink></item>
		<item>
		<title>HowTo Install APC on CPanel/WHM</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/ZfCeryjwm98/</link>
		<comments>http://linuxsysadminblog.com/2011/05/howto-install-apc-on-cpanelwhm/#comments</comments>
		<pubDate>Fri, 06 May 2011 02:07:16 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[cpanel]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[whm]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1338</guid>
		<description><![CDATA[CPanel includes support in their installer for eaccelerator; still, for some strange reason they don&#8217;t include support for APC also. So, if you want to install APC on your CPanel powered server, you will have to go back at the command line and install it manually. Here are the steps needed to install the latest [...]]]></description>
			<content:encoded><![CDATA[<p><strong>CPanel</strong> includes support in their installer for <strong>eaccelerator</strong>; still, for some strange reason they don&#8217;t include support for <strong><a href="http://pecl.php.net/package/APC" target="_blank">APC</a></strong> also. So, if you want to install APC on your CPanel powered server, you will have to go back at the command line and install it manually.</p>
<p>Here are the steps needed to install the latest version of APC (3.1.8 at the time of writing this article; please check for the latest version available when you are reading this and make the changes accordingly):<br />
<code>cd /usr/local/src<br />
wget http://pecl.php.net/get/APC-3.1.8.tgz<br />
tar -zxvf APC-3.1.8.tgz<br />
cd APC-3.1.8<br />
phpize<br />
./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/local/bin/php-config<br />
make<br />
make install</code></p>
<p>Next, activate the apc module in <strong>php.ini</strong> by adding something like this:<br />
<code>extension="apc.so"<br />
apc.enabled=1<br />
apc.shm_segments=1<br />
apc.shm_size=128</code></p>
<p>Finally, you will have to <em>restart apache</em> and after that the APC module should be activated and in use. Hopefully, this will help you enable APC on your CPanel server in some very simple steps in less that 5minutes.</p>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/ZfCeryjwm98" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/05/howto-install-apc-on-cpanelwhm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/05/howto-install-apc-on-cpanelwhm/</feedburner:origLink></item>
		<item>
		<title>Amazon AWS worse failure</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/VqzNwfi5CBs/</link>
		<comments>http://linuxsysadminblog.com/2011/04/amazon-aws-worse-failure/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 20:59:01 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[aws]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1333</guid>
		<description><![CDATA[I&#8217;m sure almost everyone is aware at this point on the failure that caused Amazon cloud computing solution AWS to be down yesterday (and still is at some smaller extend happening at this time as we can see on their status page) for most of the day. This has affected a few big (Reddit, Foursquare, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure almost everyone is aware at this point on the <strong>failure</strong> that caused Amazon cloud computing solution AWS to be down yesterday (and still is at some smaller extend happening at this time as we can see on their <a href="http://status.aws.amazon.com/" target="_blank">status</a> page) for most of the day. This has affected a few big (Reddit, Foursquare, Quora, Heroku, Engine Yard, for ex.) and many small sites hosted in the <strong>us-east-1</strong> AWS region. This happened regardless on the availability zone you were in the region US-EAST (this is the oldest one and still the default for many client tools) and questioned the <a href="http://aws.amazon.com/ec2/faqs/#How_isolated_are_Availability_Zones_from_one_another" target="_blank">independence and isolation</a> of the availability zones in the AWS infrastructure design.</p>
<p>The failure was specifically related to the <strong>EBS</strong> drives that made customer instances non responding, but also prevented them to start or stop new instances with the same EBS volumes (that probably 99% have tried immediately as they got paged). There are some sites that had failover mechanisms, but if they were in the same availability zone it was useless (something that looked like a good solution and fast and cost effective). Others, many startups, found out that they had no such mechanism at all, and that they depended way too much on the Amazon reliability. Until this issue, Amazon had a great uptime record; there were many issues but with individual instances, but not such a global issue. You would expect people running their application in the cloud to expect failures and be prepared and I&#8217;m sure most of them are compared with applications deployed in the regular datacenter, but apparently there is still much work to be done.</p>
<p>Overall I believe this showed (if we needed a reminder), that failures can happen and anyone can suffer from such a problem (Google had problems, Facebook the same, and Twitter is most of the time down, and now was just Amazon&#8217;s turn). We need to be prepared and build and architect our applications with this in mind and be ready to failover. A great example of this is the twilio application design: <a href="http://www.twilio.com/engineering/2011/04/22/why-twilio-wasnt-affected-by-todays-aws-issues/" target="_blank">http://www.twilio.com/engineering/2011/04/22/why-twilio-wasnt-affected-by-todays-aws-issues/</a></p>
<p>Also I think Amazon will learn many things from this event, and hopefully one of them will be to <em>better communicate with their clients</em>. They can definitely improve on this, and not leave people to go to twitter or ec2 forums for the best updates on such problems instead from the source.</p>
<p>I&#8217;ve also seen different providers (I will not give names but they are everywhere on twitter) come out and offer their services to people hit by this. I don&#8217;t believe this is the best approach to sell your very performant cloud solution or barebone datacenter servers or whatever, and probably it does worse for their reputation making them look like coyotes on a fallen prey. I&#8217;m sure like me, most people felt disgusted on their offers at this time, and it will definitely not make me look at their offering again.</p>
<p>Now its time to get back to work on failover and redundancy design for our clients that need help with this. If you&#8217;ve been affected by this and want to share your story and what are your takeaways feel free to comment bellow on the post. If you need specialized help to design or implement a fully fault tolerant infrastructure feel free to <a href="http://www.prometsource.com/contact">contact us</a> anytime. We are here to help.</p>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/VqzNwfi5CBs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/04/amazon-aws-worse-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/04/amazon-aws-worse-failure/</feedburner:origLink></item>
		<item>
		<title>Setup SSH Key Authentication</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/A4cjYCAfi6M/</link>
		<comments>http://linuxsysadminblog.com/2011/04/setup-ssh-key-authentication/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 20:46:41 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[key authentication]]></category>
		<category><![CDATA[password-less]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1317</guid>
		<description><![CDATA[Setup ssh key authentication for password-less login between servers.  For use by ssh/sftp users or scripts. Source Server (or local system) Generate RSA key for user on this system, you can also use DSA.  This asks for key pass-phrase but you can leave it blank. ssh-keygen -t rsa This asks for location to place the [...]]]></description>
			<content:encoded><![CDATA[<p>Setup ssh key authentication for password-less login between servers.  For use by ssh/sftp users or scripts.</p>
<p><strong>Source Server </strong>(or local system)</p>
<p>Generate RSA key for user on this system, you can also use DSA.  This asks for key pass-phrase but you can leave it blank.</p>
<p><code>ssh-keygen -t rsa</code></p>
<p>This asks for location to place the generated key, by default it will be your home directory (<em>ex: /home/your_username/.ssh/</em>).  This generates two files:  <em>id_rsa</em> and <em>id_rsa.pub</em>.  Content of <em>id_rsa.pub </em>is what we need to copy to destination server.</p>
<p><strong>Destination Server </strong>(or remote server)</p>
<p>Check if you have the directory <em>.ssh</em> on your home (<em>ex: /home/username/.ssh/</em>), if not, create that directory.</p>
<p><code>ls  ~/.ssh<br />
mkdir  ~/.ssh<br />
</code><br />
Check if you have existing file <em>authorized_keys </em>on your <em>.ssh</em> directory, if not create it.</p>
<p><code>ls  ~/.ssh/ authorized_keys<br />
touch   ~/.ssh/ authorized_keys</code></p>
<p>Copy content of <em>id_rsa.pub </em>that you created<em> </em>from your source/local server, or execute this command from your <strong>source/local server</strong>:</p>
<p><code>scp  ~/.ssh/id_rsa.pub username@remote_host:~/.ssh/authorized_keys</code></p>
<p>Test your password-less login from source to destination server.</p>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/A4cjYCAfi6M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/04/setup-ssh-key-authentication/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/04/setup-ssh-key-authentication/</feedburner:origLink></item>
		<item>
		<title>CentOS 5.6 released</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/l0M-XGVFzAQ/</link>
		<comments>http://linuxsysadminblog.com/2011/04/centos-5-6-released/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 19:44:29 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[releases]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1326</guid>
		<description><![CDATA[While people are still waiting to for Centos 6 (after many month since RHEL6 was released) we got a little teaser in the release of Centos 5.6 last week. This is a minor security release, but it also brings in some interesting additions like ext4 support and php53 packages among others. If you are running [...]]]></description>
			<content:encoded><![CDATA[<p>While people are still waiting to for Centos 6 (after many month since RHEL6 was released) we got a little teaser in the <a href="http://lists.centos.org/pipermail/centos-announce/2011-April/017282.html" target="_blank">release</a> of <strong>Centos 5.6</strong> last week. This is a minor security release, but it also brings in some interesting additions like <strong>ext4</strong> support and <strong>php53</strong> packages among others.</p>
<p>If you are running any Centos 5.x minor version you should be able to upgrade just by running:<br />
<code>yum update</code></p>
<p>We already upgraded to Centos 5.6 all our servers and you should do the same also, and hopefully soon we will see the Centos6 release that everyone is waiting for.</p>
<p>For the full list of packages changed/added please see the centos5.6 release notes: <a href="http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.6" target="_blank">http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.6</a></p>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/l0M-XGVFzAQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/04/centos-5-6-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/04/centos-5-6-released/</feedburner:origLink></item>
		<item>
		<title>Setup SFTP-Only Access (Redhat-based Distro)</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/ttxK-n9tD6Y/</link>
		<comments>http://linuxsysadminblog.com/2011/04/setup-sftp-only-access-redhat-based-distro/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 19:41:17 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[sftp-only]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1310</guid>
		<description><![CDATA[Setup sftp-only access on default Redhat/CentOS install. Use built-in sftp-server which is non-chrooted and easy to setup. Server: Locate sftp-server binary and add to your list of valid shells on the system. which sftp-server Note:   This will most likely give you this: /usr/libexec/openssh/sftp-server echo /usr/libexec/openssh/sftp-server &#62;&#62; /etc/shells Note:  You may want to backup your /etc/shells [...]]]></description>
			<content:encoded><![CDATA[<p>Setup sftp-only access on default Redhat/CentOS install.  Use built-in <em>sftp-server</em> which is non-chrooted and easy to setup.</p>
<p><strong>Server: </strong>Locate sftp-server binary and add to your list of valid shells on the system.</p>
<p><code>which sftp-server</code></p>
<p>Note:   This will most likely give you this: <em>/usr/libexec/openssh/sftp-server</em></p>
<p><code>echo /usr/libexec/openssh/sftp-server &gt;&gt; /etc/shells</code></p>
<p>Note:  You may want to backup your /etc/shells first</p>
<p><strong>User Accounts</strong>:  Add or modify accounts to use sftp-server.</p>
<p><strong>New User</strong></p>
<p><code>useradd -s /usr/libexec/openssh/sftp-server  sftponlyuser</code></p>
<p>Note:  Important parameter there is the <em>“-s /usr/libexec/openssh/sftp-server&#8221;</em>, which sets the default shell for this account.   By default you will have “<em>/bin/bash</em>”.</p>
<p><strong>Existing User:</strong></p>
<p><code>vi /etc/passwd</code></p>
<p><strong><em> </em></strong> Find the user that you want to configure for sftp only access and edit its shell.  For exampleyou will see a line “<em>username:x:500:500::/home/username:/bin/bash” </em> change &#8220;<em>/bin/bash</em>&#8221; to &#8220;<em>/usr/libexec/openssh/sftp-server</em>&#8221; and save.  Note: <em> Y</em>ou may want to backup your /etc/passwd file as well.</p>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/ttxK-n9tD6Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/04/setup-sftp-only-access-redhat-based-distro/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/04/setup-sftp-only-access-redhat-based-distro/</feedburner:origLink></item>
		<item>
		<title>Moving Drupal site with CiviCRM</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/se9XWBbPzvw/</link>
		<comments>http://linuxsysadminblog.com/2011/04/moving-drupal-site-with-civicrm/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 15:24:29 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[civicrm]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1300</guid>
		<description><![CDATA[The common headache for beginners who try to move their Drupal site with CiviCRM is the CiviCRM configuration on new location or domain. I did this countless times and dealt with different problems before. I&#8217;ve read many online tutorials and how-tos, and I finally have my notes which is working for me everytime i move [...]]]></description>
			<content:encoded><![CDATA[<p>The common headache for beginners who try to move their Drupal site with CiviCRM is the CiviCRM configuration on new location or domain.  I did this countless times and dealt with different problems before.  I&#8217;ve read many online tutorials and how-tos, and I finally have my notes which is working for me everytime i move Drupal and CiviCRM site.</p>
<p>Let&#8217;s assume you already moved the databases (separate database for Drupal and CiviCRM as a recommended setup) and the files to new location and have set the correct file permissions as well.  Here is the part that you need for your CiviCRM to work on new location and domain:</p>
<ul>
<li> access your database and empty <code>civicrm.domain:config_backend</code>.  You see this anywhere with CiviCRM guide.</li>
<li> update database details, site path/directory, and domain on <code>civicrm.settings.php</code></li>
<li> emtpy <code>sites/default/files/civicrm/template_c</code> (or make this entire dir writable by web user)</li>
<li> login to you new Drupal site and visit these urls:<br />
<code>http://sitename/civicrm/menu/rebuild?reset=1</code><br />
	<code>http://sitename/civicrm/admin/setting/updateConfigBackend?reset=1</code><br />
      <strong>Note:</strong> This will rebuild the settings for you &#8211; if not, repeat/review all the above steps.
</li>
</ul>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/se9XWBbPzvw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/04/moving-drupal-site-with-civicrm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/04/moving-drupal-site-with-civicrm/</feedburner:origLink></item>
		<item>
		<title>Install ApacheSolr in Ubuntu for Drupal</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/LYS5mkh9aGc/</link>
		<comments>http://linuxsysadminblog.com/2011/04/install-apachesolr-in-ubuntu-for-drupal/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 19:26:25 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1259</guid>
		<description><![CDATA[I&#8217;ve written few Drupal ApacheSolr install guides here and this one is basically an install draft for Ubuntu. Environment: Ubuntu 10.10, Apache, PHP, MySQL, Drupal 6.20 Things to install / setup: Solr, Tomcat6, ApacheSolr module for Drupal, and SolrPHPClient library 1.) Install Tomcat and setup your Tomcat admin user. aptitude install tomcat6 tomcat6-admin tomcat6-common tomcat6-user [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written few Drupal ApacheSolr install guides here and this one is basically an install draft for Ubuntu.</p>
<p><strong>Environment: </strong>  <a href="http://www.ubuntu.com/">Ubuntu 10.10</a>, Apache, PHP, MySQL, <a href="http://drupal.org">Drupal 6.20</a></p>
<p><strong>Things to install / setup</strong>:   <a href="http://apache.rediris.es/lucene/solr/">Solr</a>, <a href="http://tomcat.apache.org/download-60.cgi">Tomcat6</a>, <a href="http://drupal.org/project/apachesolr">ApacheSolr module for Drupal</a>, and <a href="http://code.google.com/p/solr-php-client/">SolrPHPClient library</a>
</ul>
<p><strong>1.)  Install Tomcat and setup your Tomcat admin user.</strong></p>
<p><code>aptitude install tomcat6 tomcat6-admin tomcat6-common tomcat6-user<br />
vi /etc/tomcat6/tomcat-users.xml</code><br />
<em>&lt;role rolename=&#8221;admin&#8221;/&gt;<br />
&lt;role rolename=&#8221;manager&#8221;/&gt;<br />
&lt;user username=&#8221;tomcat&#8221; password=&#8221;password&#8221; roles=&#8221;admin,manager&#8221;/&gt;</em><br />
<code>/etc/init.d/tomcat6 restart</code><br />
<span id="more-1259"></span><br />
If all is good you will be able to access Tomcat admin at <em>http://hostname:8080</em>.  Default page will show with links to admin section, etc.</p>
<p><strong>2.)  Install Solr</strong></p>
<p><code>wget http://apache.rediris.es/lucene/solr/1.4.1/apache-solr-1.4.1.zip</code> (<a href="http://apache.rediris.es/lucene/solr/"><em>check for updates</em></a>)<br />
<code>unzip apache-solr-1.4.1.zip<br />
mkdir /usr/share/tomcat6/webapps<br />
cp apache-solr-1.4.1/dist/apache-solr-1.4.1.war /usr/share/tomcat6/webapps/solr.war<br />
cp -r apache-solr-1.4.1/example/solr /usr/share/tomcat6/solr<br />
vi /etc/tomcat6/Catalina/localhost/solr.xml</code><br />
<em>&lt;Context docBase=&#8221;/usr/share/tomcat6/webapps/solr.war&#8221; debug=&#8221;0&#8243; privileged=&#8221;true&#8221; allowLinking=&#8221;true&#8221; crossContext=&#8221;true&#8221;&gt;<br />
&lt;Environment name=&#8221;solr/home&#8221; type=&#8221;java.lang.String&#8221; value=&#8221;/usr/share/tomcat6/solr&#8221; override=&#8221;true&#8221; /&gt;<br />
&lt;/Context&gt;</em><br />
<code>chown -r tomcat6.tomcat6 /var/lib/tomcat6<br />
/etc/init.d/tomcat6 restart</code></p>
<p>You should see Solr access on your Tomcat admin/manager page (<em>http://hostname:8080/manager/html</em>).</p>
<p><strong>3.)  Connect Drupal Site to Solr (multi-core setup)</strong></p>
<p>I already have a Drupal site with ApacheSolr module installed and SolrPHPclient library.</p>
<p><code>cp /path/drupal_site/sites/all/modules/apachesolr/schema.xml /usr/share/tomcat6/solr/conf/schema.xml<br />
cp /path/drupal_site/sites/all/modules/apachesolr/solrconfig.xml /usr/share/tomcat6/solr/conf/solrconfig.xml<br />
cp apache-solr-1.4.1/example/multicore/solr.xml /usr/share/tomcat6/solr/<br />
mkdir /usr/share/tomcat6/solr/site_sample1<br />
cp -r /usr/share/tomcat6/solr/conf /usr/share/tomcat6/solr/site_sample1/conf<br />
vi /usr/share/tomcat6/solr/solr.xml</code><br />
<em>&lt;core name=&#8221;site1&#8243; instanceDir=&#8221;site_sample1&#8243; /&gt;</em><br />
<code>chown -R tomcat6:root /usr/share/tomcat6/solr/<br />
/etc/init.d/tomcat6 restart</code></p>
<p>Visit ApacheSolr settings of your Drupal admin and enter the configuration:<br />
<em>Solr Hostname: <strong>localhost</strong><br />
Solr Port: <strong>8080</strong><br />
Solr Path: <strong>/solr/site1</strong></em></p>
<p><strong>To add new site to Solr:</strong><br />
<code>mkdir /usr/share/tomcat6/solr/site_sample2<br />
cp -r /usr/share/tomcat6/solr/conf /usr/share/tomcat6/solr/site_sample2/conf<br />
vi /usr/share/tomcat6/solr/solr.xml</code><br />
<em>&lt;core name=&#8221;site2&#8243; instanceDir=&#8221;site_sample2&#8243; /&gt;</em></p>
<p>That&#8217;s All.</p>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/LYS5mkh9aGc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/04/install-apachesolr-in-ubuntu-for-drupal/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/04/install-apachesolr-in-ubuntu-for-drupal/</feedburner:origLink></item>
		<item>
		<title>APC should be enabled by default</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/wxajVbMLDOY/</link>
		<comments>http://linuxsysadminblog.com/2011/04/apc-should-be-enabled-by-default/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 19:36:15 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Drupal performance]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1261</guid>
		<description><![CDATA[PHP is slow. This should not be a huge revelation for any of us, and this is not because PHP is a bad programing language, or because Python or Ruby are better. This is because it is an interpreted language. Every time you execute a PHP script it is going to do the exact same [...]]]></description>
			<content:encoded><![CDATA[<p><strong>PHP is slow</strong>. This should not be a huge revelation for any of us, and this is not because PHP is a bad programing language, or because Python or Ruby are better. This is because it is an <a href="http://en.wikipedia.org/wiki/Interpreted_language" target="_blank"><em>interpreted language</em></a>. Every time you execute a PHP script it is going to do the exact same thing and interpret your code and then execute it over and over. This is obviously slow and doesn&#8217;t compare with any compiled language like C++ for example. But we don&#8217;t want to write in C++ for our webapps, right? and we would like to use the PHP simplicity as many other open source products and developers; what can we do then? We can very easily enable any of the opcode cache available: <a href="http://pecl.php.net/package/APC" target="_blank"><strong>APC</strong></a>, <a href="http://eaccelerator.net/" target="_blank"><strong>eaccelerator</strong></a> or <a href="http://xcache.lighttpd.net/" target="_blank"><strong>xcache</strong></a> (I&#8217;m not aware of something similar for python or ruby, but if it exists you should probably use it also). An <strong>opcode cache</strong> or <strong>PHP accelerator</strong>, will cache the compiled form of the php scripts speeding up dramatically their execution time. Many people have done this a long time as they needed to improve the performance of their sites, and get results up to 20x speed up from plain PHP. A very simple step-by-step intro on how you can install APC can be found on this <a href="http://linuxsysadminblog.com/2010/03/enabledisable-apc-on-virtual-host-level/" target="_blank">older post</a>.<br />
<span id="more-1261"></span><br />
Now here is the question a good friend of mine asked me a while ago: <strong>why is APC not enabled by default?</strong> Why do people have to do an extra step to install an external module for this (that many don&#8217;t). And my answer at that time was that opcode caches are not perfect, and depending by how you write your code they might cause problems and have it no longer functioning correctly. I think I was quite happy with my answer as myself I would always install an opcode cache on any high traffic site I managed from day one (most of the time APC, but also eaccelerator) and many time even running comparisons between them to see if one of them is faster. Still even today, in most of the <strong>performance projects</strong> we completed, we found people don&#8217;t do this, and they <strong>don&#8217;t have APC installed and enabled</strong>. There are some tricks on how to tune APC and improve even better its performance but here I&#8217;m talking just to have it installed. This is why I think that APC should be enabled by default everywhere (not only by &#8216;high traffic&#8217; sites). It should give PHP scripts a boost of performance and if you really have problems with it you can disable it on a vhost or directory level very simple just by adding in .htaccess:<br />
<code>php_flag apc.cache_by_default On<br />
</code></p>
<p>I&#8217;m hoping more and more people will do this so we can focus on more serious performance problems in our PHP webapps. I don&#8217;t see why not, because this is very simple and there are plenty of <a href="http://www.google.com/search?q=howto+php+apc" target="_blank">howto&#8217;s</a> available. Still if you need help, and you would like us to do it for you, please <a href="http://www.prometsource.com/contact" target="_blank">contact us</a> and let us speed up your site.</p>
<p>Note: if you have done this many years ago and want somethign even faster for your PHP code you should take a look at <a href="https://github.com/facebook/hiphop-php/wiki/" target="_blank"><strong>HipHop</strong></a> the project from Facebook to <strong>compile your php scripts</strong> (actually transforms PHP source code into highly optimized C++ and then uses g++ to compile it to machine code) and run them as executables (but this is going to be much harder to implement, but still a very interesting project to keep an eye).</p>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/wxajVbMLDOY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/04/apc-should-be-enabled-by-default/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/04/apc-should-be-enabled-by-default/</feedburner:origLink></item>
		<item>
		<title>Gmail Shorcuts</title>
		<link>http://feedproxy.google.com/~r/LinuxSystemAdminsBlog/~3/cGIres41Vdk/</link>
		<comments>http://linuxsysadminblog.com/2011/04/gmail-shorcuts/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 18:11:45 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[gmail]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1230</guid>
		<description><![CDATA[Besides Gmail, many sites are moving to GoogleApps for hosting their emails, and if you use Gmail or GoogleApps a lot then you might love the keyboard shortcuts feature. You can quickly see available shortcut keys by typing &#8220;?&#8221; (question mark, no qoutes) and it will give you this screen. Of course you need to [...]]]></description>
			<content:encoded><![CDATA[<p>Besides Gmail, many sites are moving to GoogleApps for hosting their emails, and if you use Gmail or GoogleApps a lot then you might love the keyboard shortcuts feature.</p>
<p>You can quickly see available shortcut keys by typing &#8220;?&#8221; (<em>question mark, no qoutes</em>) and it will give you this screen.</p>
<p><a href="http://linuxsysadminblog.com/wp-content/uploads/2011/04/gmail_shortcut.png"><img src="http://linuxsysadminblog.com/wp-content/uploads/2011/04/gmail_shortcut-300x175.png" alt="gmail shortcut" title="gmail_shortcut" width="486" height="258" class="aligncenter size-medium wp-image-1247" /></a></p>
<p>Of course you need to enable keyboard shortcuts on your settings.  <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/LinuxSystemAdminsBlog/~4/cGIres41Vdk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2011/04/gmail-shorcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://linuxsysadminblog.com/2011/04/gmail-shorcuts/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.469 seconds --><!-- Cached page served by WP-Cache -->

