<?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/" version="2.0">

<channel>
	<title>[ How2CentOS ]</title>
	
	<link>http://www.how2centos.com</link>
	<description>CentOS Tutorials</description>
	<lastBuildDate>Wed, 24 Oct 2012 14:49:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/how2centos" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="how2centos" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">how2centos</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Installing PHP 5.4 on CentOS 6.2</title>
		<link>http://www.how2centos.com/installing-php-5-4-on-centos-6-2/</link>
		<comments>http://www.how2centos.com/installing-php-5-4-on-centos-6-2/#comments</comments>
		<pubDate>Sun, 26 Aug 2012 13:38:49 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 6.2 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2783</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>The assumption for installing PHP 5.4 on CentOS 6.2 tutorial is that you are running as root and have a basic understanding of the software required but if you follow this tutorial you should be able to complete the task successfully. Install Yum Priorities For a brief overview on and how to configure Yum Priorities [...]</p></p><p><a href="http://www.how2centos.com/installing-php-5-4-on-centos-6-2/">Installing PHP 5.4 on CentOS 6.2</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>The assumption for installing PHP 5.4 on CentOS 6.2 tutorial is that you are running as root and have a basic understanding of the software required but if you follow this tutorial you should be able to complete the task successfully.</p>
<h3>Install Yum Priorities</h3>
<p>For a brief overview on and how to configure Yum Priorities you can follow the instructions outlined in our <a href="http://www.how2centos.com/install-yum-priorities-centos/" target="_blank">Install YUM Priorities on CentOS</a> tutorial.<br />
<blockquote># yum install yum-priorities</p></blockquote>
<h3>Installing PHP 5.4 on CentOS 6.2 x86_64</h3>
<h3>Install the EPEL x86_64 YUM Repository</h3>
<blockquote><p># rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm</p></blockquote>
<h3>Install the IUS x86_64 YUM Repository</h3>
<blockquote><p># rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-10.ius.el6.noarch.rpm</p></blockquote>
<blockquote><p>
# yum install php54 php54-common php54-devel
</p></blockquote>
<blockquote><p>
# php -v<br />
PHP 5.4.5 (cli) (built: Jul 23 2012 10:10:54)<br />
Copyright (c) 1997-2012 The PHP Group<br />
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
</p></blockquote>
<h3>Installing PHP 5.4 on CentOS 6.2 i386</h3>
<h3>Install the EPEL i386 YUM Repository</h3>
<blockquote><p># rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm</p></blockquote>
<h3>Install the IUS i386 YUM Repository</h3>
<blockquote><p># rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/ius-release-1.0-10.ius.el6.noarch.rpm</p></blockquote>
<blockquote><p>
# yum install php54 php54-common php54-devel
</p></blockquote>
<blockquote><p>
# php -v<br />
PHP 5.4.5 (cli) (built: Jul 23 2012 10:10:54)<br />
Copyright (c) 1997-2012 The PHP Group<br />
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
</p></blockquote>
<p><a href="http://www.how2centos.com/installing-php-5-4-on-centos-6-2/">Installing PHP 5.4 on CentOS 6.2</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/2o17Xybuvcw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/installing-php-5-4-on-centos-6-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install yum priorities on CentOS</title>
		<link>http://www.how2centos.com/install-yum-priorities-centos/</link>
		<comments>http://www.how2centos.com/install-yum-priorities-centos/#comments</comments>
		<pubDate>Wed, 01 Aug 2012 10:39:14 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 5.6 Tutorials]]></category>
		<category><![CDATA[CentOS 5.7 Tutorials]]></category>
		<category><![CDATA[CentOS 5.8 Tutorials]]></category>
		<category><![CDATA[CentOS 6.0 Tutorials]]></category>
		<category><![CDATA[CentOS 6.1 Tutorials]]></category>
		<category><![CDATA[CentOS 6.2 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2741</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>The Yum Priorities plugin can be used to enforce ordered protection of repositories, by associating priorities to repositories. The priorities plugin is a useful tool if properly configured, and used with an understanding of the functionality and a recognition of the limitations and potential issues. It can be used in conjunction with the &#8216;exclude&#8217; and/or [...]</p></p><p><a href="http://www.how2centos.com/install-yum-priorities-centos/">Install yum priorities on CentOS</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>The Yum Priorities plugin can be used to enforce ordered protection of repositories, by associating priorities to repositories.</p>
<p>The priorities plugin is a useful tool if properly configured, and used with an understanding of the functionality and a recognition of the limitations and potential issues. It can be used in conjunction with the &#8216;exclude&#8217; and/or &#8216;includepkg&#8217; options, as well as the &#8216;enabled=0&#8242; option to disable a repo by default. This can let you choose which packages a less important repo will supersede those of a more important one.</p>
<h3>Install Yum Priorities</h3>
<blockquote><p>
# yum install yum-priorities
</p></blockquote>
<p><span id="more-2741"></span></p>
<h3>Configure Yum Priorities</h3>
<blockquote><p>
# vi /etc/yum/pluginconf.d/priorities.conf
</p></blockquote>
<p>Ensure the following lines exist</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">[main]
enabled=1</pre></td></tr></table></div>

<p>Save and close the file</p>
<p>Open the CentOS base repository configuration file</p>
<blockquote><p>
# vi /etc/yum.repos.d/CentOS-Base.repo
</p></blockquote>
<p>Add the following text to the end of the base, updates and extras entries</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">priority=1</pre></td></tr></table></div>

<p>Add the following line to the end of the centosplus, contrib entries</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">priority=2</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;"># CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
&nbsp;
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1
&nbsp;
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1
&nbsp;
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1
&nbsp;
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=2
&nbsp;
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=2</pre></td></tr></table></div>

<p><a href="http://www.how2centos.com/install-yum-priorities-centos/">Install yum priorities on CentOS</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/uKfUt0jmbs8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/install-yum-priorities-centos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing PHP 5.4 on CentOS 5.8</title>
		<link>http://www.how2centos.com/installing-php-5-4-on-centos-5-8/</link>
		<comments>http://www.how2centos.com/installing-php-5-4-on-centos-5-8/#comments</comments>
		<pubDate>Sat, 28 Jul 2012 09:10:36 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 5.8 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2794</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>This tutorial is intended for system administrators wanting to install PHP 5.4 on CentOS 5.8 The reader should know how to configure a web server or application server and have basic knowledge of the HTTP protocol. Once finished the reader should have PHP 5.4 running with the default configuration. Install Yum Priorities For a brief [...]</p></p><p><a href="http://www.how2centos.com/installing-php-5-4-on-centos-5-8/">Installing PHP 5.4 on CentOS 5.8</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>This tutorial is intended for system administrators wanting to install PHP 5.4 on CentOS 5.8</p>
<p>The reader should know how to configure a web server or application server and have basic knowledge of the HTTP protocol. Once finished the reader should have PHP 5.4 running with the default configuration.</p>
<h3>Install Yum Priorities</h3>
<p>For a brief overview on and how to configure Yum Priorities you can follow the instructions outlined in our <a href="http://www.how2centos.com/install-yum-priorities-centos/" target="_blank">Install YUM Priorities on CentOS</a> tutorial.<br />
<blockquote># yum install yum-priorities</p></blockquote>
<h3>Installing PHP 5.4 on CentOS 5.8 x86_64</h3>
<h3>Install the EPEL x86_64 YUM Repository</h3>
<blockquote><p># rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm</p></blockquote>
<h3>Install the IUS x86_64 YUM Repository</h3>
<blockquote><p># rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-10.ius.el5.noarch.rpm</p></blockquote>
<blockquote><p>
# yum install php54 php54-common php54-devel
</p></blockquote>
<blockquote><p>
# php -v<br />
PHP 5.4.5 (cli) (built: Jul 23 2012 10:10:54)<br />
Copyright (c) 1997-2012 The PHP Group<br />
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
</p></blockquote>
<h3>Installing PHP 5.4 on CentOS 5.8 i386</h3>
<h3>Install the EPEL i386 YUM Repository</h3>
<blockquote><p># rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm</p></blockquote>
<h3>Install the IUS i386 YUM Repository</h3>
<blockquote><p># rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-10.ius.el5.noarch.rpm</p></blockquote>
<blockquote><p>
# yum install php54 php54-common php54-devel
</p></blockquote>
<blockquote><p>
# php -v<br />
PHP 5.4.5 (cli) (built: Jul 23 2012 10:10:54)<br />
Copyright (c) 1997-2012 The PHP Group<br />
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
</p></blockquote>
<p><a href="http://www.how2centos.com/installing-php-5-4-on-centos-5-8/">Installing PHP 5.4 on CentOS 5.8</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/czs-Im2n6KU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/installing-php-5-4-on-centos-5-8/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CentOS 6.3 Released</title>
		<link>http://www.how2centos.com/centos-6-3-released/</link>
		<comments>http://www.how2centos.com/centos-6-3-released/#comments</comments>
		<pubDate>Tue, 10 Jul 2012 10:59:07 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 6.3 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2758</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>CentOS 6.3 has been released. CentOS-6.3 is based on the upstream release EL 6.3 and includes packages from all variants. All upstream repositories have been combined into one, to make it easier for end users to work with. CentOS 6.3 Downloads You can download CentOS 6.3 via the web/ftp server or via BitTorrent (recommended) client. [...]</p></p><p><a href="http://www.how2centos.com/centos-6-3-released/">CentOS 6.3 Released</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>CentOS 6.3 has been released.</p>
<p>CentOS-6.3 is based on the upstream release EL 6.3 and includes packages from all variants. All upstream repositories have been combined into one, to make it easier for end users to work with.</p>
<h3>CentOS 6.3 Downloads</h3>
<p>You can download CentOS 6.3 via the web/ftp server or via BitTorrent (recommended) client.</p>
<h3>CentOS 6.3 DVD ISO downloads</h3>
<p>Choose a CentOS mirror close to you :</p>
<p><a href="http://www.centos.org/modules/tinycontent/index.php?id=30" title="CentOS 6.3 mirrors">CentOS 6.3 Mirrors</a></p>
<h3>CentOS 6.3 DVD ISO Torrents</h3>
<p>Torrent files for the DVD&#8217;s are available at the following location:</p>
<ul>
<li><a href="http://mirror.centos.org/centos/6.3/isos/i386/CentOS-6.3-i386-bin-DVD1to2.torrent" title="Download CentOS 6.3 32bit">Download 32 bit i386 torrent file</a></li>
<li><a href="http://mirror.centos.org/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-bin-DVD1to2.torrent" title="Download CentOS 6.3 64bit">Download  64 bit x86_64 torrent file</a></li>
</ul>
<h3>Upgrading from CentOS-6.0 / 6.1 or 6.2</h3>
<p>Unless you have edited your yum configs, a &#8216;yum update&#8217; should move your<br />
machine seamlessly from any previous CentOS-6.x release to CentOS-6.3</p>
<p><a href="http://www.how2centos.com/centos-6-3-released/">CentOS 6.3 Released</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/8EYxfJkU_xg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/centos-6-3-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 6 NTP Server</title>
		<link>http://www.how2centos.com/centos-6-ntp-server/</link>
		<comments>http://www.how2centos.com/centos-6-ntp-server/#comments</comments>
		<pubDate>Thu, 24 May 2012 13:01:07 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 6.0 Tutorials]]></category>
		<category><![CDATA[CentOS 6.1 Tutorials]]></category>
		<category><![CDATA[CentOS 6.2 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2644</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>It is important for systems administrators to make sure that mission-critical servers are always using the correct system time. The ntpd (Network Time Protocol daemon) program is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers. Make sure that the time zone configuration of [...]</p></p><p><a href="http://www.how2centos.com/centos-6-ntp-server/">CentOS 6 NTP Server</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>It is important for systems administrators to make sure that mission-critical servers are always using the correct system time. </p>
<p>The ntpd (Network Time Protocol daemon) program is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers. Make sure that the time zone configuration of your computer is correct. ntpd itself does not do anything about the time zones, it just uses UTC internally.<br />
<span id="more-2644"></span></p>
<h3>Install Network Time Protocol (NTP) daemon</h3>
<blockquote><p>
# yum install ntp
</p></blockquote>
<h3>Add NTP daemon to startup</h3>
<blockquote><p>
# chkconfig ntpd on
</p></blockquote>
<h3>Edit the NTPD config file</h3>
<p>Here you can either use the default NTP public servers or add servers closer to your region.</p>
<p>Visit <a href="http://www.pool.ntp.org/en/">http://www.pool.ntp.org/en/</a> and either considder joining or getting your regional NTP pool servers</p>
<blockquote><p>
# vi /etc/ntp.conf
</p></blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>20
21
22
23
24
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Use public servers from the pool.ntp.org project.</span>
<span style="color: #666666; font-style: italic;"># Please consider joining the pool (http://www.pool.ntp.org/join.html).</span>
server <span style="color: #000000;">0</span>.centos.pool.ntp.org
server <span style="color: #000000;">1</span>.centos.pool.ntp.org
server <span style="color: #000000;">2</span>.centos.pool.ntp.org</pre></td></tr></table></div>

<h3>Start the NTP daemon</h3>
<blockquote><p>
# service ntpd start
</p></blockquote>
<h3>Standard NTP query program (ntpq)</h3>
<p>Print a list of the peers known to the server as well as a summary of their state.</p>
<blockquote><p>
# ntpq -p<br />
     remote           refid      st t when poll reach   delay   offset  jitter<br />
==============================================================================<br />
*javanese.kjsl.c 69.36.224.15     2 u  108  128  377    1.401    3.392   4.779<br />
+66-191-139-149. 132.163.4.101    2 u   70  128  377   46.044   11.205   5.378<br />
+ntp.sunflower.c 132.236.56.250   3 u   85  128  377   50.962   -2.129  14.112
</p></blockquote>
<h3>Managing NTPd with Puppet</h3>
<p>If you&#8217;re running Puppet we have included the manifest for installing Varnish on CentOS 6. If you&#8217;re not running Puppet then you can install it by following the instructions outlined in our <a href="http://www.how2centos.com/centos-6-puppet-install/" title="CentOS 6 Puppet Install" target="_blank">CentOS 6 Puppet Install</a>.</p>
<p>This is only the manifest and doesn&#8217;t include any of the files (i.e. ntp.conf).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> ntpd::install <span style="color:#006600; font-weight:bold;">&#123;</span>
&nbsp;
	<span style="color:#ff6633; font-weight:bold;">$packagelist</span> = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;ntp&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
	package <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff6633; font-weight:bold;">$packagelist</span>:
		<span style="color:#9966CC; font-weight:bold;">ensure</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> installed
	<span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> ntpd::service <span style="color:#006600; font-weight:bold;">&#123;</span>
&nbsp;
	service <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;ntpd&quot;</span>:
		<span style="color:#9966CC; font-weight:bold;">ensure</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
		enable <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
		hasrestart <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
		hasstatus <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
		<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#9966CC; font-weight:bold;">Class</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;ntpd::install&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
	<span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> ntpd::conf <span style="color:#006600; font-weight:bold;">&#123;</span>
&nbsp;
	<span style="color:#CC00FF; font-weight:bold;">File</span> <span style="color:#006600; font-weight:bold;">&#123;</span>
		<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#9966CC; font-weight:bold;">Class</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;ntpd::install&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
		owner <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;root&quot;</span>,
		group <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;root&quot;</span>,
		mode <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">644</span>,
		notify <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#9966CC; font-weight:bold;">Class</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;ntpd::service&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
	<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
	file <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;/etc/ntp.conf&quot;</span>:
		source  <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;puppet:///modules/ntpd/ntp.conf&quot;</span>
	<span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> ntpd <span style="color:#006600; font-weight:bold;">&#123;</span>
	<span style="color:#9966CC; font-weight:bold;">include</span> ntpd::install, ntpd::service, ntpd::conf
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></td></tr></table></div>

<p><a href="http://www.how2centos.com/centos-6-ntp-server/">CentOS 6 NTP Server</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/iKj883ZCinI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/centos-6-ntp-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Install Varnish CentOS 6</title>
		<link>http://www.how2centos.com/install-varnish-centos-6/</link>
		<comments>http://www.how2centos.com/install-varnish-centos-6/#comments</comments>
		<pubDate>Sat, 19 May 2012 11:11:33 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 6.0 Tutorials]]></category>
		<category><![CDATA[CentOS 6.1 Tutorials]]></category>
		<category><![CDATA[CentOS 6.2 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2549</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>This tutorial is intended for system administrators wanting to install Varnish on CentOS 6. The reader should know how to configure a web server or application server and have basic knowledge of the HTTP protocol. Once finished the reader should have a basic Varnish cache up and running with the default configuration. Varnish is a [...]</p></p><p><a href="http://www.how2centos.com/install-varnish-centos-6/">Install Varnish CentOS 6</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>This tutorial is intended for system administrators wanting to install Varnish on CentOS 6. The reader should know how to configure a web server or application server and have basic knowledge of the HTTP protocol. Once finished the reader should have a basic Varnish cache up and running with the default configuration.</p>
<p><a href="https://www.varnish-cache.org" title="Varnish">Varnish</a> is a web application accelerator. You install it in front of your web application and it will speed it up significantly.</p>
<p>Varnish web application accelerator homepage: <a href="https://www.varnish-cache.org" title="Varnish">https://www.varnish-cache.org</a><br />
<span id="more-2549"></span></p>
<h3>Install the Varnish YUM Repository</h3>
<blockquote><p># rpm -Uvh http://repo.varnish-cache.org/redhat/varnish-3.0/el5/noarch/varnish-release-3.0-1.noarch.rpm</p></blockquote>
<h3>Install Varnish web accelerator</h3>
<blockquote><p>
# yum install varnish
</p></blockquote>
<h3>Enable Varnish web accelerator at startup</h3>
<blockquote><p>
# chkconfig varnish on
</p></blockquote>
<h3>Basic default.vcl</h3>
<blockquote><p>
# vi /etc/varnish/default.vcl
</p></blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;"># This is a basic VCL configuration file for varnish.  See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition.  Set this to point to your content
# server.
#
backend default {
  .host = &quot;127.0.0.1&quot;;
  .port = &quot;80&quot;;
}</pre></td></tr></table></div>

<h3>Start Varnish web accelerator</h3>
<blockquote><p>
# service varnish start
</p></blockquote>
<p>You will now have a basic Varnish web accelerator running on port 8080</p>
<h3>Top 5 Varnish commands</h3>
<h5>varnishstat</h5>
<p>Provides all the info you need to spot cache misses and errors.</p>
<h5>varnishhist</h5>
<p>Provides a histogram view of cache hits/misses</p>
<h5>varnishlog</h5>
<p>Provides detailed information on requests.</p>
<h5>varnishtop</h5>
<p>The  varnishtop utility reads varnishd shared memory logs and presents a continuously updated list of the most commonly occurring log entries.</p>
<h5>varnishadm</h5>
<p>Command-line varnish administration used to reload vcl and purge urls.</p>
<h3>Managing Varnish with Puppet</h3>
<p>If you&#8217;re running Puppet we have included the manifest for installing Varnish on CentOS 6. If you&#8217;re not running Puppet then you can install it by following the instructions outlined in our <a href="http://www.how2centos.com/centos-6-puppet-install/" title="CentOS 6 Puppet Install" target="_blank">CentOS 6 Puppet Install</a>.</p>
<p>This is only the manifest and doesn&#8217;t include any of the files (i.e. default.vcl).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> varnish::repo <span style="color:#006600; font-weight:bold;">&#123;</span>
&nbsp;
	Package <span style="color:#006600; font-weight:bold;">&#123;</span>
		provider <span style="color:#006600; font-weight:bold;">=&gt;</span> rpm,
		<span style="color:#9966CC; font-weight:bold;">ensure</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> installed
	<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
	package <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;varnish-release&quot;</span>: source <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;http://repo.varnish-cache.org/redhat/varnish-3.0/el5/noarch/varnish-release-3.0-1.noarch.rpm&quot;</span>
	<span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> varnish::install <span style="color:#006600; font-weight:bold;">&#123;</span>
&nbsp;
	<span style="color:#ff6633; font-weight:bold;">$packagelist</span> = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;varnish&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
	package <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff6633; font-weight:bold;">$packagelist</span>:
		<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#9966CC; font-weight:bold;">Class</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;varnish::repo&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
		<span style="color:#9966CC; font-weight:bold;">ensure</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> installed
	<span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> varnish::service <span style="color:#006600; font-weight:bold;">&#123;</span>
&nbsp;
	service <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;varnish&quot;</span>:
		<span style="color:#9966CC; font-weight:bold;">ensure</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
		enable <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
		hasrestart <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
		hasstatus <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
		<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#9966CC; font-weight:bold;">Class</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;varnish::install&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
	<span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> varnish::conf <span style="color:#006600; font-weight:bold;">&#123;</span>
&nbsp;
	<span style="color:#CC00FF; font-weight:bold;">File</span> <span style="color:#006600; font-weight:bold;">&#123;</span>
		<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#9966CC; font-weight:bold;">Class</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;varnish::install&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
		owner <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;root&quot;</span>,
		group <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;root&quot;</span>,
		mode <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">644</span>,
		notify <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#9966CC; font-weight:bold;">Class</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;varnish::service&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
	<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
	file <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;/etc/varnish/default.vcl&quot;</span>:
		source  <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;puppet:///modules/varnish/default.vcl&quot;</span>
	<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
	file <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;/etc/sysconfig/varnish&quot;</span>:
		source  <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;puppet:///modules/varnish/varnish&quot;</span>
	<span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> varnish <span style="color:#006600; font-weight:bold;">&#123;</span>
	<span style="color:#9966CC; font-weight:bold;">include</span> varnish::repo, varnish::install, varnish::service, varnish::conf
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></td></tr></table></div>

<p><a href="http://www.how2centos.com/install-varnish-centos-6/">Install Varnish CentOS 6</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/SXie1wWQW7g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/install-varnish-centos-6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CentOS 6 Puppet Install</title>
		<link>http://www.how2centos.com/centos-6-puppet-install/</link>
		<comments>http://www.how2centos.com/centos-6-puppet-install/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 12:51:05 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 6.0 Tutorials]]></category>
		<category><![CDATA[CentOS 6.1 Tutorials]]></category>
		<category><![CDATA[CentOS 6.2 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2473</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>In this tutorial we&#8217;ll be covering the very basics of installing and configuring Puppet. Puppet is a system for automating system administration tasks. Its automation saves you countless hours of frustration, monotony and reinventing the wheel. It lets you perform administrative task from a central systems to any number of systems running any variant of [...]</p></p><p><a href="http://www.how2centos.com/centos-6-puppet-install/">CentOS 6 Puppet Install</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>In this tutorial we&#8217;ll be covering the very basics of installing and configuring Puppet. Puppet is a system for automating system administration tasks. Its automation saves you countless hours of frustration, monotony and reinventing the wheel. It lets you perform administrative task from a central systems to any number of systems running any variant of operating system.</p>
<p>For a more complete description visit <a href="http://reductivelabs.com/trac/puppet/wiki/AboutPuppet">Puppet Labs.</a><br />
<span id="more-2473"></span></p>
<h3>Installing the Puppet CentOS 6 packages</h3>
<h3>Install the Puppet Repository</h3>
<blockquote><p>rpm -ivh http://yum.puppetlabs.com/el/5/products/i386/puppetlabs-release-5-6.noarch.rpm</p></blockquote>
<h3>Install the EPEL x86_64 YUM Repository</h3>
<blockquote><p># rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm</p></blockquote>
<h3>Install the Puppet Master packages</h3>
<blockquote><p>
# yum install puppet-server
</p></blockquote>
<h3>Install the Puppet Client packages</h3>
<blockquote><p>
# yum install puppet
</p></blockquote>
<h3>A Simple Manifest: Managing Ownership of a File</h3>
<p>Step 1: Create a minimal manifest file called site.pp in /etc/puppet/manifests with the following content:</p>
<blockquote><p>
# vi /etc/puppet/manifests/site.pp
</p></blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># /etc/puppet/manifests/site.pp</span>
&nbsp;
import <span style="color:#996600;">&quot;classes/*&quot;</span>
&nbsp;
node default <span style="color:#006600; font-weight:bold;">&#123;</span>
    <span style="color:#9966CC; font-weight:bold;">include</span> sudo
 <span style="color:#006600; font-weight:bold;">&#125;</span></pre></td></tr></table></div>

<p>Step 2: Next create the sudo.pp class in /etc/puppet/manifests/classes/ with the following content:</p>
<blockquote><p>
# vi /etc/puppet/manifests/classes/sudo.pp
</p></blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># /etc/puppet/manifests/classes/sudo.pp</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> sudo <span style="color:#006600; font-weight:bold;">&#123;</span>
    file <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;/etc/sudoers&quot;</span>:
        owner <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;root&quot;</span>,
        group <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;root&quot;</span>,
        mode  <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">440</span>,
    <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></td></tr></table></div>

<p>This class which will ensure that the owner, group, and mode of the /etc/sudoers file will be set consistently across all systems that belong to that class.</p>
<p>Step 3: Start the Puppet Master service and enable startup on boot </p>
<blockquote><p>
# service puppetmaster start<br />
# chkconfig puppetmaster on
</p></blockquote>
<h3>Configuring Puppet</h3>
<p>Configure the puppet client to connect to the server and enable logging. Edit the file /etc/sysconfig/puppet and uncomment the PUPPET_LOG and PUPPET_SERVER line specifying the servers address.</p>
<blockquote><p>
# vi /etc/sysconfig/puppet
</p></blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;"># The puppetmaster server
PUPPET_SERVER=PuppetMaster
&nbsp;
# If you wish to specify the port to connect to do so here
#PUPPET_PORT=8140
&nbsp;
# Where to log to. Specify syslog to send log messages to the system log.
PUPPET_LOG=/var/log/puppet/puppet.log
&nbsp;
# You may specify other parameters to the puppet client here
#PUPPET_EXTRA_OPTS=--waitforcert=500</pre></td></tr></table></div>

<p>The client will automatically pull configuration from the server every 30 minutes, start it as a service and enable startup on boot</p>
<blockquote><p>
# service puppet start<br />
# chkconfig puppet on
</p></blockquote>
<h3>Sign the SSL key request from the Puppet Client</h3>
<p>In order for the two systems to communicate securely we need to create signed SSL certificates. You should be logged into both the <em>Puppet Master</em> and <em>Puppet</em> machines for this next step. </p>
<blockquote><p>
# puppetca &#45;&#45;list<br />
server2.example.co.za
</p></blockquote>
<blockquote><p>
# puppetca &#45;&#45;sign server2.example.co.za<br />
Signed server2.example.co.za
</p></blockquote>
<p><a href="https://plus.google.com/u/1/112343473763635198843/about?rel=author">+George Rushby</a></p>
<p><a href="http://www.how2centos.com/centos-6-puppet-install/">CentOS 6 Puppet Install</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/ZUGTBfrkfdE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/centos-6-puppet-install/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Install Percona XtraDB Cluster on CentOS 6.2</title>
		<link>http://www.how2centos.com/install-percona-xtradb-cluster-on-centos-6-2/</link>
		<comments>http://www.how2centos.com/install-percona-xtradb-cluster-on-centos-6-2/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 19:04:44 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 5.6 Tutorials]]></category>
		<category><![CDATA[CentOS 6.0 Tutorials]]></category>
		<category><![CDATA[CentOS 6.2 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2442</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>Percona XtraDB Cluster is a new high availability and high scalability solution for MySQL users. XtraDB Cluster integrates Percona Server with the Galera library of high availability solutions in a single product package. Percona XtraDB is an enhanced version of the InnoDB storage engine for MySQL and MariaDB. It has much faster performance than InnoDB [...]</p></p><p><a href="http://www.how2centos.com/install-percona-xtradb-cluster-on-centos-6-2/">Install Percona XtraDB Cluster on CentOS 6.2</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p><a href="http://www.percona.com/software/percona-xtradb-cluster/" target="_blank">Percona XtraDB Cluster</a> is a new high availability and high scalability solution for MySQL users. XtraDB Cluster integrates <a href="http://www.percona.com/software/percona-xtradb-cluster/" target="_blank">Percona </a>Server with the Galera library of high availability solutions in a single product package. Percona XtraDB is an enhanced version of the InnoDB storage engine for MySQL and MariaDB. It has much faster performance than InnoDB and better scalability on modern hardware.<br />
<span id="more-2442"></span><br />
This tutorial is how to setup a 3-node XtraDB cluster, assuming you are running CentOS Linux 6.2 64-bit.</p>
<h3>Install Percona’s CentOS 6 repositories:</h3>
<blockquote><p>
# rpm -Uhv http://repo.percona.com/testing/centos/6/os/noarch/percona-testing-0.0-1.noarch.rpm<br />
# rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm
</p></blockquote>
<h3>Install Percona XtraDB Cluster packages:</h3>
<blockquote><p>
# yum install Percona-XtraDB-Cluster-server Percona-XtraDB-Cluster-client
</p></blockquote>
<p>XtraDB Cluster requires a couple of TCP ports to operate. Easiest way:</p>
<blockquote><p>
# service iptables stop
</p></blockquote>
<p>If you want to open only specific ports, you need to open 3306, 4444, 4567, 4568 ports. </p>
<p>For example for 4567 port (substitute 10.0.0.1 by your IP):</p>
<blockquote><p>
# iptables -A INPUT -i eth0 -p tcp -m tcp &#8211;source 10.0.0.1/24 &#8211;dport 4567 -j ACCEPT
</p></blockquote>
<p>Now repeat on all XtraDB cluster nodes</p>
<h3>Create /etc/my.cnf files</h3>
<p>On the first XtraDB Cluster node (assume IP 10.0.0.10):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>mysqld<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">datadir</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>data
<span style="color: #007800;">user</span>=mysql
&nbsp;
<span style="color: #007800;">binlog_format</span>=ROW
&nbsp;
<span style="color: #007800;">wsrep_provider</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libgalera_smm.so
&nbsp;
<span style="color: #007800;">wsrep_cluster_address</span>=gcomm:<span style="color: #000000; font-weight: bold;">//</span>
&nbsp;
<span style="color: #007800;">wsrep_slave_threads</span>=<span style="color: #000000;">2</span>
<span style="color: #007800;">wsrep_cluster_name</span>=trimethylxanthine
<span style="color: #007800;">wsrep_sst_method</span>=rsync
<span style="color: #007800;">wsrep_node_name</span>=node1
&nbsp;
<span style="color: #007800;">innodb_locks_unsafe_for_binlog</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">innodb_autoinc_lock_mode</span>=<span style="color: #000000;">2</span></pre></td></tr></table></div>

<p>On the second XtraDB Cluster node:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>mysqld<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">datadir</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>data
<span style="color: #007800;">user</span>=mysql
&nbsp;
<span style="color: #007800;">binlog_format</span>=ROW
&nbsp;
<span style="color: #007800;">wsrep_provider</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libgalera_smm.so
&nbsp;
<span style="color: #007800;">wsrep_cluster_address</span>=gcomm:<span style="color: #000000; font-weight: bold;">//</span>10.0.0.10
&nbsp;
<span style="color: #007800;">wsrep_slave_threads</span>=<span style="color: #000000;">2</span>
<span style="color: #007800;">wsrep_cluster_name</span>=trimethylxanthine
<span style="color: #007800;">wsrep_sst_method</span>=rsync
<span style="color: #007800;">wsrep_node_name</span>=node2
&nbsp;
<span style="color: #007800;">innodb_locks_unsafe_for_binlog</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">innodb_autoinc_lock_mode</span>=<span style="color: #000000;">2</span></pre></td></tr></table></div>

<p>On the third XtraDB Cluster node:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>mysqld<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">datadir</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>data
<span style="color: #007800;">user</span>=mysql
&nbsp;
<span style="color: #007800;">binlog_format</span>=ROW
&nbsp;
<span style="color: #007800;">wsrep_provider</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libgalera_smm.so
&nbsp;
<span style="color: #007800;">wsrep_cluster_address</span>=gcomm:<span style="color: #000000; font-weight: bold;">//</span>10.0.0.10
&nbsp;
<span style="color: #007800;">wsrep_slave_threads</span>=<span style="color: #000000;">2</span>
<span style="color: #007800;">wsrep_cluster_name</span>=trimethylxanthine
<span style="color: #007800;">wsrep_sst_method</span>=rsync
<span style="color: #007800;">wsrep_node_name</span>=node3
&nbsp;
<span style="color: #007800;">innodb_locks_unsafe_for_binlog</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">innodb_autoinc_lock_mode</span>=<span style="color: #000000;">2</span></pre></td></tr></table></div>

<p>Start mysqld on the first node:</p>
<blockquote><p>
# service mysql start
</p></blockquote>
<p>When all nodes are in SYNCED stage your cluster is ready!</p>
<p>Connect to database on any node and create database:</p>
<blockquote><p>
# mysql<br />
> CREATE DATABASE how2centos_test;
</p></blockquote>
<p>The new database will be propagated to all nodes.</p>
<p><a href="http://www.how2centos.com/install-percona-xtradb-cluster-on-centos-6-2/">Install Percona XtraDB Cluster on CentOS 6.2</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/MpURrzLqloY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/install-percona-xtradb-cluster-on-centos-6-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download CentOS 6.2 iso</title>
		<link>http://www.how2centos.com/download-centos-6-2-iso/</link>
		<comments>http://www.how2centos.com/download-centos-6-2-iso/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 17:10:19 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 6.2 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2427</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>CentOS 6.2 Downloads You can download CentOS 6.2 via the web/ftp server or via BitTorrent (recommended) client. CentOS 6.2 DVD ISO downloads Download CentOS 6.2 32 bit DVD ISO CentOS-6.2-i386-bin-DVD1.iso and CentOS-6.2-i386-bin-DVD2.iso Download CentOS 6.2 64 bit DVD ISO CentOS-6.2-x86_64-bin-DVD1.iso and CentOS-6.2-x86_64-bin-DVD2.iso CentOS 6.2 DVD ISO Torrents Torrent files for the DVD&#8217;s are available at [...]</p></p><p><a href="http://www.how2centos.com/download-centos-6-2-iso/">Download CentOS 6.2 iso</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><h3>CentOS 6.2 Downloads</h3>
<p>You can download CentOS 6.2 via the web/ftp server or via BitTorrent (recommended) client.</p>
<h3>CentOS 6.2 DVD ISO downloads</h3>
<ul>
<li>Download CentOS 6.2 32 bit DVD ISO CentOS-6.2-i386-bin-DVD1.iso and CentOS-6.2-i386-bin-DVD2.iso</li>
<li>Download CentOS 6.2 64 bit DVD ISO CentOS-6.2-x86_64-bin-DVD1.iso and CentOS-6.2-x86_64-bin-DVD2.iso</li>
</ul>
<h3>CentOS 6.2 DVD ISO Torrents</h3>
<p>Torrent files for the DVD&#8217;s are available at the following location:</p>
<ul>
<li>Download CentOS 64 i386 torrent file</li>
<li>Download CentOS 64 x86_64 torrent file</li>
</ul>
<p><a href="http://www.how2centos.com/download-centos-6-2-iso/">Download CentOS 6.2 iso</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/5RM4z0RxBE4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/download-centos-6-2-iso/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CentOS Warning: RPMDB altered outside of yum</title>
		<link>http://www.how2centos.com/centos-warning-rpmdb-altered-outside-of-yum/</link>
		<comments>http://www.how2centos.com/centos-warning-rpmdb-altered-outside-of-yum/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 12:07:47 +0000</pubDate>
		<dc:creator>George Rushby</dc:creator>
				<category><![CDATA[CentOS 5.5 Tutorials]]></category>
		<category><![CDATA[CentOS 5.6 Tutorials]]></category>
		<category><![CDATA[CentOS 5.7 Tutorials]]></category>
		<category><![CDATA[CentOS 6.0 Tutorials]]></category>

		<guid isPermaLink="false">http://www.how2centos.com/?p=2312</guid>
		<description><![CDATA[<p><p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>Yum is an automatic updater and package installer/remover for rpm-based systems. It automatically computes dependencies and figures out what things should occur in order to safely install, remove, and update rpm packages. Yum also efficiently and easily retrieves information on any package installed or available in a repository to the installer. When trying to update [...]</p></p><p><a href="http://www.how2centos.com/centos-warning-rpmdb-altered-outside-of-yum/">CentOS Warning: RPMDB altered outside of yum</a></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.how2centos.com">[ How2CentOS ]</a></p><p>Yum is an automatic updater and package installer/remover for rpm-based systems. It automatically computes dependencies and figures out what things should occur in order to safely install, remove, and update rpm packages. Yum also efficiently and easily retrieves information on any package installed or available in a repository to the installer.</p>
<p>When trying to update your server via the yum command you might see the following error / warning message:</p>
<p>Warning: RPMDB altered outside of yum.</p>
<blockquote><p>
# yum install nethogs<br />
Loaded plugins: fastestmirror<br />
Loading mirror speeds from cached hostfile<br />
 * base: mirror.cogentco.com<br />
 * epel: mirror.cogentco.com<br />
 * extras: mirror.vcu.edu<br />
 * ius: mirror.rackspace.com<br />
 * updates: centos.aol.com<br />
Setting up Install Process<br />
Resolving Dependencies<br />
&#8211;> Running transaction check<br />
&#8212;> Package nethogs.x86_64 0:0.8.0-1.el6 set to be updated<br />
&#8211;> Finished Dependency Resolution</p>
<p>Dependencies Resolved</p>
<pre>
====================================================================
 Package       Arch            Version          Repository     Size
====================================================================
Installing:
 nethogs      x86_64           0.8.0-1.el6      epel          28 k

Transaction Summary
====================================================================
Install       1 Package(s)
Upgrade       0 Package(s)
</pre>
<p>Total download size: 28 k<br />
Installed size: 53 k<br />
Is this ok [y/N]: y<br />
Downloading Packages:<br />
nethogs-0.8.0-1.el6.x86_64.rpm                                   |  28 kB     00:00<br />
Running rpm_check_debug<br />
Running Transaction Test<br />
Transaction Test Succeeded<br />
Running Transaction</p>
<h4>Warning: RPMDB altered outside of yum.</h4>
<p>  Installing     : nethogs-0.8.0-1.el6.x86_64                                       1/1</p>
<p>Installed:<br />
  nethogs.x86_64 0:0.8.0-1.el6</p>
<p>Complete!
</p></blockquote>
<h3>How do you fix this problem?</h3>
<blockquote><p>
# yum clean all
</p></blockquote>
<p><a href="https://plus.google.com/112343473763635198843/about?rel=author">+George Rushby</a></p>
<p><a href="http://www.how2centos.com/centos-warning-rpmdb-altered-outside-of-yum/">CentOS Warning: RPMDB altered outside of yum</a></p><img src="http://feeds.feedburner.com/~r/how2centos/~4/o5fDQ7YzaBI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how2centos.com/centos-warning-rpmdb-altered-outside-of-yum/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
