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

<channel>
	<title>Plugged.in</title>
	<atom:link href="http://www.plugged.in/feed" rel="self" type="application/rss+xml" />
	<link>http://www.plugged.in</link>
	<description>I.T. Resources for I.T. Professionals</description>
	<lastBuildDate>Sat, 12 Nov 2011 00:43:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Rescuing system with Linux Rescue</title>
		<link>http://www.plugged.in/linux/linux_help/rescuing-system-with-linux-rescue.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rescuing-system-with-linux-rescue</link>
		<comments>http://www.plugged.in/linux/linux_help/rescuing-system-with-linux-rescue.html#comments</comments>
		<pubDate>Sat, 12 Nov 2011 00:43:38 +0000</pubDate>
		<dc:creator>ckaraca</dc:creator>
				<category><![CDATA[LINUX Help]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=212</guid>
		<description><![CDATA[<p>You are reading this article, most probably you faced trouble booting your Linux. Follow the steps below to fully chroot into your system as you booted regularly. Please note that we offer you to take a disk clone before doing anything in your boot configuration. To do so, you can use dd or dd_rescue to [...]]]></description>
			<content:encoded><![CDATA[<p>You are reading this article, most probably you faced trouble booting your Linux. Follow the steps below to fully chroot into your system as you booted regularly. Please note that we offer you to take a disk clone before doing anything in your boot configuration. To do so, you can use dd or dd_rescue to clone your disk. attach a bigger hard disk to your server to take its clone, we say bigger as you can easly get confused which drive is your real disk and which is the clone. Put your distros install disk to the CD drive and select rescue from the boot menu, when you reach the prompt, check your disks with the command:</p>
<p><strong>&gt; to see the attached disks, type:</strong></p>
<blockquote>
<div>ls /dev/ | grep sd<br />
#sda<br />
#sda1<br />
#sda2<br />
#sdb<br />
#sdb1</div>
</blockquote>
<p><strong>&gt; to get additional info about your disks, type:</strong></p>
<blockquote>
<div>fdisk -l /dev/sda</div>
</blockquote>
<p>instead of sda, you may type sdb, sdc etc. In FreeBSD you may try with /dev/ad0. To start cloning disk type dd with, dd if=/dev/old_disk_id of=/dev/new_disk_id bs=10M.</p>
<p>When you finish clonning your disk, you may de-attach the clone and continue to fix the device. Try the commands below, we assume that you boot from /dev/sda2</p>
<blockquote>
<div>mount /dev/sdax /mnt<br />
mount -t proc /proc /mnt/proc<br />
mount -t sysfs /mnt/sysfs<br />
mount &#8211;bind /dev /mnt/dev</p>
<p>chroot /mnt</p></div>
</blockquote>
<p>To mount your additional drives such as RAM drives &amp; etc you should mount them with:</p>
<blockquote>
<div>mount -a</div>
</blockquote>
<p>Now, you reached your original system with all resources, you can even use rpm and yum and even start your services.</p>
<p><strong>&gt; to fix system boot:</strong></p>
<p><strong>GRUB issues</strong></p>
<p>find the boot drive with fdisk, marked with (*)</p>
<blockquote>
<div>fdisk -l /dev/sda<br />
Disk /dev/sda: 250.0 GB, 250059350016 bytes<br />
255 heads, 63 sectors/track, 30401 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>Device Boot Start End Blocks Id System<br />
/dev/sda1 * 1 13 104391 83 Linux<br />
/dev/sda2 14 535 4192965 82 Linux swap / Solaris<br />
/dev/sda3 536 1057 4192965 83 Linux<br />
/dev/sda4 1058 30401 235705680 5 Extended<br />
/dev/sda5 1058 30401 235705648+ 83 Linux</p></div>
</blockquote>
<p>In the example above, the first partition is used for booting the system. type &#8220;grub&#8221; to log in to the Grub interface, /dev/sda is the first disk as hd0 and /dev/sda1 is identified as (hd0,0) in grub, use hd0,1 for sda2 and hd0,2 for sda3 respectively as needed:</p>
<blockquote>
<div>root (hd0,0)<br />
find /boot/grub/stage1 #if it gives error try other alternatives<br />
setup (hd0,0)</div>
</blockquote>
<p><strong>Booting problems caused by hardware changes:</strong></p>
<p>If you made a significant change in the hardware, you might be missing additional modules from the kernel, you may re-install the kernel to fix the problem (easiest way):</p>
<blockquote>
<div>rpm -qa | grep kernel # remove the current kernel &amp; re-install it<br />
rpm -e kernel.2.6&#8230;<br />
rpm -Uvh kernel.2.6&#8230; #or<br />
yum install kernel.2.6..</div>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/linux/linux_help/rescuing-system-with-linux-rescue.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serial Console Redirection in pfsense</title>
		<link>http://www.plugged.in/linux/linux_help/serial-console-redirection-in-pfsense.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=serial-console-redirection-in-pfsense</link>
		<comments>http://www.plugged.in/linux/linux_help/serial-console-redirection-in-pfsense.html#comments</comments>
		<pubDate>Tue, 25 Oct 2011 15:59:23 +0000</pubDate>
		<dc:creator>ckaraca</dc:creator>
				<category><![CDATA[LINUX Help]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=205</guid>
		<description><![CDATA[<p>If you want to show console output from a Serial device such as RS-232 interface, you need to make minor modifications in pfsense 2.0 distro.</p> <p>Switch to shell by pressing 8 from the pfsense console menu and edit the file /boot/loader.conf by typing:</p> <p>vi /boot/loader.conf</p> <p>Add the below lines to the file after pressin &#8220;i&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to show console output from a Serial device such as RS-232 interface, you need to make minor modifications in pfsense 2.0 distro.</p>
<p>Switch to shell by pressing 8 from the pfsense console menu and edit the file /boot/loader.conf by typing:</p>
<blockquote><p>vi /boot/loader.conf</p></blockquote>
<p>Add the below lines to the file after pressin &#8220;i&#8221; (insert) or &#8220;A&#8221; (append)</p>
<blockquote><p>console=&#8221;comconsole,vidconsole&#8221;<br />
comconsole_speed=&#8221;115200&#8243;</p></blockquote>
<p>press ESC and type :wq to save and exit, we had choosen 115200 for baud rate as most of the devices accept those speeds, you may choose below rates.</p>
<p>Add the following line to /etc/ttys</p>
<blockquote><p>console    &#8220;/usr/libexec/getty Pc&#8221;         cons25  on  secure</p></blockquote>
<p>type the following to enable booting from serial console</p>
<blockquote><p>echo &#8216;-h&#8217; &gt;&gt; /boot.config</p></blockquote>
<p>Note that, after adding -h to the<br />
If available be sure to configure BIOS serial console redirection with the same speed you set above.</p>
<pre class="SCREEN" style="margin: 0.75em 0px; line-height: 1; font-family: monospace; padding: 1ex;">echo 'console="comconsole"' &gt;&gt; /boot/loader.conf</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/linux/linux_help/serial-console-redirection-in-pfsense.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why should I use a MVC Framework ?</title>
		<link>http://www.plugged.in/programm-in/web-developer/why-should-i-use-a-mvc-framework.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=why-should-i-use-a-mvc-framework</link>
		<comments>http://www.plugged.in/programm-in/web-developer/why-should-i-use-a-mvc-framework.html#comments</comments>
		<pubDate>Mon, 18 Jul 2011 13:13:47 +0000</pubDate>
		<dc:creator>polatahmet</dc:creator>
				<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=200</guid>
		<description><![CDATA[<p>You wanna create a web based application, you have ideas but you have no idea about where to start.</p> <p>That is exactly where you should start using a MVC Framework.</p> <p>So what is a MVC Framework ?</p> <p>MVC is a programming pattern that comes with 3 components.</p> <p>M -&#62; Model</p> <p>V -&#62; View</p> <p>C -&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>You wanna create a web based application, you have ideas but you have no idea about where to start.</p>
<p>That is exactly where you should start using a MVC Framework.</p>
<p><strong>So what is a MVC Framework ?</strong></p>
<p>MVC is a programming pattern that comes with 3 components.</p>
<p>M -&gt; Model</p>
<p>V -&gt; View</p>
<p>C -&gt; Controller</p>
<p>Let me explain briefly.</p>
<p><strong>Model </strong>contains database related functions. So in your <strong>Model</strong> component, you can execute database queries, read, write or any type of process that you may want.</p>
<p><strong>View </strong>contains design elements. In another way, <strong>User Interface</strong> of your application.</p>
<p><strong>Controller </strong>contains all procedures. So in your <strong>Controller</strong> you can use algorithms, logical processes and all the other things you wanna do.</p>
<p>&nbsp;</p>
<p><strong>Why should I use a MVC Framework ?</strong></p>
<p>Here are some benefits of using MVC Frameworks;</p>
<ul>
<li>Faster programming</li>
<li>Faster execution (cause it&#8217;ll be object oriented)</li>
<li>Modular applications</li>
<li>Layered programming (you can do the model parts and a colleague can do the controller parts)</li>
<li>Ready to collaborated work structure</li>
</ul>
<div><strong>OK, I wanna use a MVC Framework, which one should I prefer ?</strong></div>
<div>There are plenty of MVC Frameworks on the Internet. But I could suggest a few;</div>
<div>
<ul>
<li>CodeIgniter</li>
<li>CakePHP (inspired by Ruby on Rails)</li>
<li>YII (for large-scale web applications)</li>
<li>PHPDevShell</li>
<li>Symfony</li>
<li>Akelos</li>
<li>Prado</li>
<li>and of course Zend Framework</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/programm-in/web-developer/why-should-i-use-a-mvc-framework.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco Router IPv6 Configuration</title>
		<link>http://www.plugged.in/network/cisco-router-ipv6-configuration.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cisco-router-ipv6-configuration</link>
		<comments>http://www.plugged.in/network/cisco-router-ipv6-configuration.html#comments</comments>
		<pubDate>Mon, 18 Jul 2011 08:33:30 +0000</pubDate>
		<dc:creator>ckaraca</dc:creator>
				<category><![CDATA[Network]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=181</guid>
		<description><![CDATA[<p>In the beginning of the year 2011, we decided to apply IPv6 configuration to our data center (<a title="VeriTeknik" href="http://www.veriteknik.com/en" target="_blank">VeriTeknik</a>) and requested our IPv6 block from RIPE. RIRs give out /32 blocks to LIRs at the first assignment.</p> The Preperation Steps Request your IPv6 Addresses from your RIR or LIR Add IPv6 Route to [...]]]></description>
			<content:encoded><![CDATA[<p>In the beginning of the year 2011, we decided to apply IPv6 configuration to our data center (<a title="VeriTeknik" href="http://www.veriteknik.com/en" target="_blank">VeriTeknik</a>) and requested our IPv6 block from RIPE. RIRs give out /32 blocks to LIRs at the first assignment.</p>
<h3>The Preperation Steps</h3>
<ol>
<li>Request your IPv6 Addresses from your RIR or LIR</li>
<li>Add IPv6 Route to your AS number in LIR Portal</li>
<li>Get your IPv6 VLAN IP from your Upstrem Provider</li>
<li>Configure your router</li>
</ol>
<p>&nbsp;</p>
<h3>Configuring Cisco Routers for IPv6</h3>
<p>&nbsp;</p>
<p>Before you start applying IPv6 on your routers make sure that you backup your current configuration.</p>
<p>First of all, make a table of your arguments such as your IP addresses, AS numbers etc like below, we put some values for you to easly analyze the configuration:</p>
<table border="0">
<tbody>
<tr>
<td style="text-align: left;"><strong>Your AS Number</strong></td>
<td style="text-align: left;">AS65535</td>
</tr>
<tr>
<td style="text-align: left;"><strong>Remote As Number</strong></td>
<td style="text-align: left;">AS1000</td>
</tr>
<tr>
<td style="text-align: left;"><strong>VLAN IP Your Side (Given by Telco op)</strong></td>
<td style="text-align: left;">2A01:358:4500:2::2/64</td>
</tr>
<tr>
<td style="text-align: left;"><strong>VLAN IP remote Side (Telco Side)</strong></td>
<td style="text-align: left;">2A01:358:4500:2::1</td>
</tr>
<tr>
<td style="text-align: left;"><strong>Your IPv6 Addresses to Annnounce</strong></td>
<td style="text-align: left;">2B00:7300::/32</td>
</tr>
</tbody>
</table>
<p><strong>Enable IPv6 &amp; IPv6 cef on your Cisco router:</strong></p>
<blockquote><p>ipv6 unicast-routing<br />
ipv6 cef<br />
!</p></blockquote>
<p><strong>Set your IPv6 address to the interface facing telco:</strong></p>
<p>Don&#8217;t delete your IPv4 configuration or other necessary codes, just add</p>
<blockquote><p>interface GigabitEthernet0/0<br />
description $ETH-WAN$<br />
ipv6 address 2A01:358:4500:2::2/64<br />
ipv6 enable<br />
ipv6 virtual-reassembly<br />
..<br />
..<br />
!</p></blockquote>
<p><strong>Switch to BGP configuration by typing &#8220;router bgp 65535&#8243;</strong></p>
<p>add:</p>
<blockquote><p>router bgp 65535<br />
.<br />
.<br />
neighbor 2A01:358:4500:2::1 remote-as 1000<br />
!</p></blockquote>
<p>type exit and type <strong>address-family ipv6</strong> to enter IPv6 configuration</p>
<p>to announce your prefixes type:</p>
<blockquote><p>address-family ipv6<br />
neighbor 2A01:358:4500:2::1 activate<br />
distance bgp 200 200 200<br />
network 2B00:7300::/32<br />
network 2B00:7300:100::/48<br />
redistribute connected<br />
redistribute static<br />
no synchronization<br />
exit-address-family<br />
!</p></blockquote>
<p>Type exit one more and you need to add routes for your IPv6 addresses,</p>
<blockquote><p>ipv6 route 2B00:7300::/32 Null0 254</p></blockquote>
<p>This is the basic IPv6 configuration for Cisco routers, now you should be able to communicate with IPv6 enabled hosts. To test your configuration you may assign IPv6 to one of your VLANs, an example given below:</p>
<blockquote><p>interface GigabitEthernet0/1.201<br />
description LOCAL<br />
encapsulation dot1Q 201<br />
.<br />
.<br />
ipv6 address 2B00:7300:100::1/48<br />
!</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/network/cisco-router-ipv6-configuration.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Push Email with Dovecot Mail Server</title>
		<link>http://www.plugged.in/linux/whm-cpanel/push-email-with-dovecot-mail-server.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=push-email-with-dovecot-mail-server</link>
		<comments>http://www.plugged.in/linux/whm-cpanel/push-email-with-dovecot-mail-server.html#comments</comments>
		<pubDate>Thu, 05 May 2011 11:20:44 +0000</pubDate>
		<dc:creator>ckaymaz</dc:creator>
				<category><![CDATA[WHM/Cpanel]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[push email]]></category>
		<category><![CDATA[whm]]></category>
		<category><![CDATA[z-push]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=174</guid>
		<description><![CDATA[<p>I have been looking for push e-mail since i got my iphone. Just found sth for my test server and it works for me…</p> <p>I have a webserver running cPanel, Dovecot and suPHP. ( centOS 5.4, WHM 11.25 )</p> <p>Steps:</p> <p>1- You can download z-push from <a href="http://developer.berlios.de/project/showfiles.php?group_id=8963" target="_blank">here</a>.</p> <p>2- Upload z-push to /usr/local/apache/htdocs</p> <p>3- [...]]]></description>
			<content:encoded><![CDATA[<p>I have been looking for push e-mail since i got my iphone. Just found sth for my test server and it works for me…</p>
<p>I have a webserver running cPanel, Dovecot and suPHP. ( centOS 5.4, WHM 11.25 )</p>
<p><strong>Steps:</strong></p>
<p>1- You can download z-push from <a href="http://developer.berlios.de/project/showfiles.php?group_id=8963" target="_blank">here</a>.</p>
<p>2- Upload z-push to /usr/local/apache/htdocs</p>
<p>3- Change ownership to nobody because it fails if you leave it as root</p>
<p>4- If you are using suPHP than Modify index.php</p>
<p>Comment out $requestheaders = apache_request_headers(); and replace it with</p>
<blockquote><p>function getHeaders()<br />
{<br />
$headers = array();<br />
foreach ($_SERVER as $k =&gt; $v)<br />
{<br />
if (substr($k, 0, 5) == &#8220;HTTP_&#8221;)<br />
{<br />
$k = str_replace(&#8216;_&#8217;, &#8216; &#8216;, substr($k, 5));<br />
$k = str_replace(&#8216; &#8216;, &#8216;-&#8217;, ucwords(strtolower($k)));<br />
$headers[$k] = $v;<br />
}<br />
}<br />
return $headers;<br />
}<br />
$requestheaders = getHeaders();</p></blockquote>
<p>5- Modify config.php</p>
<p>Change <strong>$BACKEND_PROVIDER = “BackendICS”; to $BACKEND_PROVIDER = “BackendIMAP”;</strong></p>
<p>6- Add the alias to httpd. conf as explained in the config file, but use /usr/local/apache/htdocs instead of /var/www</p>
<p>7- Restart Apache</p>
<p>8- Go to your iPhone and set up your e-mail account as a Microsoft Exchange account. (Be sure to sync “All messages” or else you’ll be deleting things twice.)</p>
<p>9- Thats All. You now have push email on your iPhone..</p>
<p>10- You may need to modify backend/diffbackend.php to make it delete properly.</p>
<p>Find the following code:</p>
<blockquote><p>function ImportMessageMove($id, $newfolder) {<br />
return true;<br />
}</p></blockquote>
<p>Change to:</p>
<blockquote><p>function ImportMessageMove($id, $newfolder) {<br />
//do nothing if it is in a dummy folder<br />
if ($this-&gt;_folderid == SYNC_FOLDER_TYPE_DUMMY)<br />
return true;</p>
<p>// See if there&#8217;s a conflict<br />
$conflict = $this-&gt;isConflict(&#8220;move&#8221;, $this-&gt;_folderid, $id);</p>
<p>// Update client state<br />
$change = array();<br />
$change["id"] = $id;<br />
$change["newfolder"] = $newfolder;<br />
$this-&gt;updateState(&#8220;move&#8221;, $change);</p></blockquote>
<p>P.S. I am not the author of these information. These were all found in the z-push forums.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/linux/whm-cpanel/push-email-with-dovecot-mail-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLV doesnt work in Firefox with Hotlink Protection</title>
		<link>http://www.plugged.in/programm-in/web-developer/flv-doesnt-work-in-firefox-with-hotlink-protection.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flv-doesnt-work-in-firefox-with-hotlink-protection</link>
		<comments>http://www.plugged.in/programm-in/web-developer/flv-doesnt-work-in-firefox-with-hotlink-protection.html#comments</comments>
		<pubDate>Thu, 05 May 2011 11:09:19 +0000</pubDate>
		<dc:creator>ckaymaz</dc:creator>
				<category><![CDATA[Web Developer]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=170</guid>
		<description><![CDATA[<p>I cannot get my flv files to load in Firefox but they work perfect in IE… My system running apache..<br /> Finally, I found out that the problem was related with the Hotlink Protection implemented by some hosts through the .htaccess file and the fact that Flash does not send the referrer and Firefox does [...]]]></description>
			<content:encoded><![CDATA[<p>I cannot get my flv files to load in Firefox but they work perfect in IE… My system running apache..<br />
Finally, I found out that the problem was related with the Hotlink Protection implemented by some hosts through the .htaccess file and the fact that Flash does not send the referrer and Firefox does not add it to the request.<br />
After some research I found this workaround adding some lines in the .htaccess file:</p>
<blockquote><p>RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yoursite.com [NC]<br />
RewriteRule \.(jpg|jpeg|png|gif|flv)$ &#8211; [NC,F,L]</p></blockquote>
<p>This solved my problem..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/programm-in/web-developer/flv-doesnt-work-in-firefox-with-hotlink-protection.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Optimization from the scratch</title>
		<link>http://www.plugged.in/linux/linux-optimization/linux-optimization-from-the-scratch.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=linux-optimization-from-the-scratch</link>
		<comments>http://www.plugged.in/linux/linux-optimization/linux-optimization-from-the-scratch.html#comments</comments>
		<pubDate>Thu, 28 Apr 2011 13:25:17 +0000</pubDate>
		<dc:creator>ckaraca</dc:creator>
				<category><![CDATA[Linux Optimization]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[logrotate]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=141</guid>
		<description><![CDATA[Using LINUX as a server?, if so please read below <p style="text-align: justify;">Most of the Linux distros released as CD or DVD media for installing and if you install Linux with defualy options you get a nice user interface and a bunch of applications that you will never use in a server environment. Also default [...]]]></description>
			<content:encoded><![CDATA[<h2>Using LINUX as a server?, if so please read below</h2>
<p style="text-align: justify;">Most of the Linux distros released as CD or DVD media for installing and  if you install Linux with defualy options you get a nice user interface  and a bunch of applications that you will never use in a server  environment. Also default installation will require second, third CDs or  all of seven CDs in one installation. But Linux, especially CentOS  could be install with the first CD and the rest of the packages could be  install with the installer &#8220;YUM&#8221;.  For more security and reservation of resources the system must be installed with only base packages described below.</p>
<p style="text-align: justify;">You don&#8217;t need to select the services that you will use in a server at  the installation. The best choice is to unselect all the ticks you see  on the installation screen as follows, we will install the necessay  packages after the installation.</p>
<div id="attachment_142" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.plugged.in/wp-content/uploads/centos-sunucu-kurulum.png"><img class="size-medium wp-image-142" title="centos-server-installation" src="http://www.plugged.in/wp-content/uploads/centos-sunucu-kurulum-300x226.png" alt="CentOS Install first step" width="300" height="226" /></a><p class="wp-caption-text">CentOS Install first step</p></div>
<p style="text-align: justify;">You won&#8217;t need any GUI in server mode or you should better get used to  using terminal for better performance &amp; security. Click Next when  you done in this step and uncheck all prechecked items on all tabs. This  way you should be able to install the OS with only one CD.</p>
<p><strong>Install base packages after the reboot, most of the packages install dependencies, never mind installing them alone</strong></p>
<blockquote><p>yum install vixie-cron bind-utils jwhois which</p></blockquote>
<p>If you need other packages instal them also. If you know the  application but not the package containing it, you can always search it  with the following command. For example, to install <strong>locate</strong>, you should.</p>
<blockquote><p>yum whatprovides */locate</p></blockquote>
<p>Yum will find the package (mlocate) for you easily.</p>
<p><strong>Close IPv6 if you don&#8217;t use it </strong>(depreciated)</p>
<blockquote>
<div>echo &#8220;alias net-pf-10 off&#8221; &gt;&gt; /etc/modprobe.conf<br />
echo &#8220;alias ipv6 off&#8221; &gt;&gt; /etc/modprobe.conf</div>
</blockquote>
<div><strong>Setup Logrotate to shrink log sizes</strong></div>
<p>If you have your own log files in your custom directory and you want  to rotate them daily, follow the directions below to create a custom  logrotate script. In our example we will rotate the log files in folder  /home/user/logs/ ending with *log:</p>
<blockquote>
<div>vi /etc/logrotate.d/custom</div>
</blockquote>
<p>and add the lines below to keep 8 days of log and compress them</p>
<blockquote>
<div>/hsphere/user/logs/*log {<br />
daily<br />
rotate 8<br />
missingok<br />
compress<br />
delaycompress<br />
postrotate<br />
/usr/sbin/apachectl graceful<br />
endscript<br />
}</div>
</blockquote>
<div><strong>Using SSD Disks? use EXT2</strong></div>
<p>For better performance you should use SSD disks, but you must take  into account that SSD disks could be damaged if written all the time.  Since EXT3 file system makes more utilization on disks more than EXT2,  your disks might have a shorten life than expected. EXT3 makes journal  of disks and some kind of defragmentation that you will never need in  SSDs. Also Linux default file system uses <strong>atime</strong> to  store last access time to a file, thus every read on a file makes a  write and we will close this option as you rearly use it or you can find  severeal other ways to see last access time if you need so. Also note  that, do not try to convert EXT3 to EXT2 on a production server, edit  /etc/fstab to disable atime:</p>
<blockquote><p>/dev/sda1               /     ext2   defaults      0     0</p></blockquote>
<p>add noatime after all <strong>defaults</strong>:</p>
<blockquote><p>/dev/sda1               /     ext2   defaults,<strong>noatime </strong>0     0</p></blockquote>
<p>You can remount the disks by typing &#8220;mount -o remount,rw,noatime  /dev/sda1&#8243; (sda1: replace with your appropriate disks) without writing  to fstab (the changes will be lost on any reboot if you don&#8217;t write to  fstab). To test the disk speeds you can call:</p>
<blockquote><p>hdparm -tT /dev/sda1 # use df to see your disks instead of sda1</p></blockquote>
<p>If you get less than 30 MB/s in &#8220;Timing buffered disk reads&#8221; part try  to enable DMA or simply dispose your old disk and buy a new one.<br />
<strong>Set 32 bit transfers and Interrupt mask in your disk.</strong></p>
<p>New SATA disks, while promising huge speeds they came with minimum  speed configurations in order to work on all type of systems including  new and legacy. Such SATA3 devices promise to reach up to 6 Gbps (715  MB/s) but you can never see those results in your server. To see what  your disk can do type the following command:</p>
<blockquote><p>hdparm -I /dev/sda # use &#8220;df&#8221; to see your disks instead of sda</p></blockquote>
<p>Commands/Features part of the result shows the options of your disk.  the ones marked with (*) shows the options that you can set/unset. We  will only show 32 bit transfers and interrupt masking here as an  example, it is your own risk to set these features:</p>
<blockquote><p>hdparm -tT /dev/sda # test speed before applying<br />
hdparm -u1 -c3 /dev/sda<br />
hdparm -tT /dev/sda</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/linux/linux-optimization/linux-optimization-from-the-scratch.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run /tmp from memory for faster performance</title>
		<link>http://www.plugged.in/linux/linux-optimization/run-tmp-from-memory-for-faster-performance.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=run-tmp-from-memory-for-faster-performance</link>
		<comments>http://www.plugged.in/linux/linux-optimization/run-tmp-from-memory-for-faster-performance.html#comments</comments>
		<pubDate>Wed, 27 Apr 2011 15:10:54 +0000</pubDate>
		<dc:creator>ckaraca</dc:creator>
				<category><![CDATA[Linux Optimization]]></category>
		<category><![CDATA[/tmp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ram]]></category>
		<category><![CDATA[ramfs]]></category>
		<category><![CDATA[session]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=138</guid>
		<description><![CDATA[<p style="text-align: justify;">Running /tmp partition makes great performance enhancements as soon as you store temprorary information, please be aware that you mustn&#8217;t store valuable data as a reboot will flush all the data inside.</p> <p style="text-align: justify;">/tmp &#38; /var/tmp runs faster from RAM, to do so:</p> vi /etc/fstab Switch to Insert mode by pressing I [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Running <strong>/tmp</strong> partition makes great performance enhancements as soon  as you store temprorary information, please be aware that you mustn&#8217;t  store valuable data as a reboot will flush all the data inside.</p>
<p style="text-align: justify;"><strong>/tmp &amp; /var/tmp runs faster from RAM, </strong>to do so:</p>
<blockquote>
<div>vi /etc/fstab</div>
</blockquote>
<div style="text-align: justify;">Switch to Insert mode by pressing I or INSERT button on keyboard and  comment out /tmp partition if you already have one with a # and enter  the information below:</div>
<blockquote>
<div>tmpfs                   /tmp                    tmpfs   defaults,noatime,mode=1777 0 0<br />
tmpfs                   /var/tmp                tmpfs defaults,noatime,mode=1777 0 0</div>
</blockquote>
<p style="text-align: justify;">save the file by pressing<strong> ESC and SHIFT ZZ</strong> or <strong>ESC + wq</strong> and type &#8220;<strong>mount -a</strong>&#8221; to apply the changes immediately. You can check the results by typing &#8220;<strong>df -h</strong>&#8221; and you will see something similar to below one:</p>
<blockquote>
<div>Filesystem            Size  Used Avail Use% Mounted on<br />
/dev/hdb5              50G  5.0G   43G  11% /<br />
/dev/hdb1              99M   24M   71M  25% /boot<br />
tmpfs                 1.5G     0  1.5G   0% /dev/shm<br />
<strong>tmpfs                 1.5G     0  1.5G   0% /tmp</strong><br />
<strong>tmpfs                 1.5G     0  1.5G   0% /var/tmp</strong></div>
</blockquote>
<div>Please note that, all your data and sessions will be gone when you switch to/from ramfs.</div>
<div><strong><span style="color: #ff0000;"><strong>IMPORTANT NOTE:</strong></span> </strong>This document is prepared for CentOS 5.6 and ment to work with other versions and distros.Never assume the directory structures exist in your system as written in the document. Never blindly follow security instructions — read, review, compare, apply as it fits your system.<strong><br />
</strong></div>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/linux/linux-optimization/run-tmp-from-memory-for-faster-performance.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using vi Editor</title>
		<link>http://www.plugged.in/linux/linux_help/using-vi-editor.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-vi-editor</link>
		<comments>http://www.plugged.in/linux/linux_help/using-vi-editor.html#comments</comments>
		<pubDate>Wed, 27 Apr 2011 13:20:08 +0000</pubDate>
		<dc:creator>ckaraca</dc:creator>
				<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=117</guid>
		<description><![CDATA[Vi is the one of the mostly used editor in Linux via terminal. In most cases where Linux is used as a server operating system, admins use the terminal, where GUI uses more system resources &#38; network bandwidth. Since Vi is used from the terminal, the lack of GUI force the user to learn function [...]]]></description>
			<content:encoded><![CDATA[<div><strong>Vi</strong> is the one of the mostly used editor in Linux via terminal. In  most cases where Linux is used as a server operating system, admins use  the terminal, where GUI uses more system resources &amp; network  bandwidth. Since Vi is used from the terminal, the lack of GUI force the  user to learn function keys of the editor. Vi is a powerful and  functional application if it is used with the ideas that is built on.</div>
<p>To run vi, type vi from the terminal, vi is installed on most of the  Linux distros as default. You may also you the improved version called  &#8220;Vim&#8221; if you are developing codes or scripts. If you don&#8217;t have vim  installed just run the command to install &#8220;<strong>yum install vim-enhanced -y</strong>&#8220;.</p>
<p>To create a new file just write the name of the file after the command as follows:</p>
<div>vi /root/newfile.txt</div>
<p>For more functionality Vi is designed to work in three modes described below:</p>
<ol>
<li><strong>Command Mode</strong></li>
<li><strong>Edit (editing + adding) Mode</strong></li>
<li><strong>Command Line Mode<br />
</strong></li>
</ol>
<p>Vi starts in Command mode, thus you cannot directly start typing or  editing the lines inside the editor. You can always return to command  mode by pressing ESC button anytime. To switch to Editing mode while you  are in command mode press &#8220;ESC&#8221; and type &#8220;:&#8221; or press &#8220;Insert&#8221; button  on your keyboard.</p>
<p>Below are the mostly used functions in <strong>Command Mode:</strong>:</p>
<table class="alignleft" border="1" cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td><strong>Command</strong></td>
<td style="text-align: left;"><strong>Action</strong></td>
</tr>
<tr>
<td>i</td>
<td style="text-align: left;">Switches to Insert (edit) Mode</td>
</tr>
<tr>
<td>a</td>
<td style="text-align: left;">Switches edit mode at the end of cursor</td>
</tr>
<tr>
<td>A</td>
<td style="text-align: left;">Switches edit mode at the end of current line</td>
</tr>
<tr>
<td>ESC</td>
<td style="text-align: left;">Closes edit mode and switches to Command Mode</td>
</tr>
<tr>
<td>u</td>
<td style="text-align: left;">Undo</td>
</tr>
<tr>
<td>U</td>
<td style="text-align: left;">Undo all</td>
</tr>
<tr>
<td>o</td>
<td style="text-align: left;">Insert new line</td>
</tr>
<tr>
<td>dd</td>
<td style="text-align: left;">Delete whole line</td>
</tr>
<tr>
<td>/string</td>
<td style="text-align: left;">makes search for the &#8220;string&#8221;</td>
</tr>
<tr>
<td>n</td>
<td style="text-align: left;">Search next item</td>
</tr>
</tbody>
</table>
<p>To switch to<strong> Command Line </strong>mode press <strong>ESC</strong> and type <strong>&#8220;:&#8221;</strong> without quotes. Below are the commands that you can use in <strong>command line mode</strong>:</p>
<table class="alignleft" border="1" cellspacing="5" cellpadding="5" align="left">
<tbody>
<tr>
<td><strong>Command</strong></td>
<td style="text-align: left;"><strong>Action</strong></td>
</tr>
<tr>
<td>ZZ</td>
<td style="text-align: left;">Saves the current file and exits or</td>
</tr>
<tr>
<td>wq</td>
<td style="text-align: left;">w for saving, q to exit</td>
</tr>
<tr>
<td>w!</td>
<td style="text-align: left;">saves read-only files (force)</td>
</tr>
<tr>
<td>q!</td>
<td style="text-align: left;">Quit without saving</td>
</tr>
<tr>
<td>q</td>
<td style="text-align: left;">Quit</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/linux/linux_help/using-vi-editor.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to update Linux with Yum</title>
		<link>http://www.plugged.in/linux/linux_help/how-to-update-linux-with-yum.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-update-linux-with-yum</link>
		<comments>http://www.plugged.in/linux/linux_help/how-to-update-linux-with-yum.html#comments</comments>
		<pubDate>Tue, 26 Apr 2011 11:55:38 +0000</pubDate>
		<dc:creator>ckaraca</dc:creator>
				<category><![CDATA[LINUX Help]]></category>

		<guid isPermaLink="false">http://www.plugged.in/?p=115</guid>
		<description><![CDATA[<p>Updating RedHat &#38; CentOS with Yum</p> <p>&#160;</p> <p>If you are using RedHat &#38; its clones like CentOS or CloudLinux etc. you can use Yum or up2date to upgrade your current system.</p> <p>Please note that is you have a RedHat Enterprise Linux Subscription we offer you to use the command up2date, to upgrade your server with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Updating RedHat &amp; CentOS with Yum</strong></p>
<ul></ul>
<p>&nbsp;</p>
<p>If you are using RedHat &amp; its clones like CentOS or CloudLinux  etc. you can use Yum or up2date to upgrade your current system.</p>
<p>Please note that is you have a RedHat Enterprise Linux Subscription we offer you to use the command <strong>up2date</strong>, to upgrade your server with yum write the command from shell:</p>
<blockquote>
<div>yum upgrade</div>
</blockquote>
<p>If it asks for the keys, you can press &#8220;Y&#8221; to accept the keys and  continue to install the upgrades, to install an application or library  with yum type:</p>
<blockquote>
<div>yum install <strong>packagename</strong></div>
</blockquote>
<p>If you don&#8217;t know the package name containing the application you want to use, you can use the list function of yum.</p>
<p>For example to list packages related to <strong>dig </strong>similiar to Windows <strong>nslookup </strong>type the following command:</p>
<blockquote>
<div>yum list dig*</div>
</blockquote>
<p>Yum will find the packages names starting with dig, this function is so useful when finding <strong>apache </strong>modules (mod-*) and <strong>php </strong>modules (php-*) but this time it will return with an error as it cannot find any related packages names starting with <strong>dig*</strong>:</p>
<blockquote>
<div>#Error: No matching Packages to list</div>
</blockquote>
<p>Because some applications reside in a set of packages in Linux distros. Here comes the &#8220;<strong>whatprovides</strong>&#8221;  in stage. If you used the command in Linux before but you don&#8217;t know  the package containing the command you can find it easily with yum:</p>
<blockquote>
<div>yum whatprovides */dig</div>
</blockquote>
<p>and the output of yum is:</p>
<blockquote>
<div>#30:<strong>bind-utils</strong>-9.3.6-4.P1.el5_4.2.x86_64 : Utilities for querying DNS name servers.<br />
#Repo        : base<br />
#Matched from:<br />
#Filename    : /usr/bin/dig</div>
</blockquote>
<p>Yum tell us the package we were searching for is <strong>bind-utils</strong>. When you install bind-utils you will have a bunch of useful utulities related to <strong>named</strong>. After this step the only thing you need to do is:</p>
<blockquote>
<div>yum install bind-utils</div>
</blockquote>
<p>and yum will install the package with all prerequisities.</p>
<p><span style="color: #ff0000;"><strong>IMPORTANT NOTE:</strong></span> This document is prepared for CentOS 5.6 and ment to work with other  versions and distros.Never assume the directory structures exist in your  system as written in  the document.  Never blindly follow security  instructions &#8212; read,  review, compare, apply as it fits your system.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.plugged.in/linux/linux_help/how-to-update-linux-with-yum.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

