<?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>Malaya Digital Blog</title>
	<atom:link href="http://blog.malaya-digital.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.malaya-digital.org</link>
	<description>Freedom in Zeroes and Ones</description>
	<lastBuildDate>Mon, 07 May 2012 02:00:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Setup MediaWiki 1.18.2 in a minimal CentOS 6.2 64-bit and lighttpd installation</title>
		<link>http://blog.malaya-digital.org/setup-mediawiki-on-a-minimal-centos-6-2-64-bit-and-lighttpd/</link>
		<comments>http://blog.malaya-digital.org/setup-mediawiki-on-a-minimal-centos-6-2-64-bit-and-lighttpd/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 03:24:31 +0000</pubDate>
		<dc:creator>Michael Balcos</dc:creator>
				<category><![CDATA[CentOS / RHEL]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://blog.malaya-digital.org/?p=368</guid>
		<description><![CDATA[This guide will help you setup WikiMedia on http://&#60IP or hostname&#62/wiki . 1] Setup CentOS 6 64-bit as in guide (http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/). 2] "yum update" 3] "vi /etc/sysconfig/selinux" and set "SELINUX=disabled". 4] "setenforce 0" 5] "shutdown -r now" 6] "rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm" 7] "yum install lighttpd lighttpd-fastcgi php-cgi pcre php-mysql php-pear php-pecl-apc mysql-server ImageMagick sendmail php-intl [...]]]></description>
			<content:encoded><![CDATA[<p>This guide will help you setup WikiMedia on http://&#60IP or hostname&#62/wiki .<br />
1] Setup CentOS 6 64-bit as in guide (http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/).<br />
2] "yum update"<br />
3] "vi /etc/sysconfig/selinux" and set "SELINUX=disabled".<br />
4] "setenforce 0"<br />
<span id="more-368"></span>5] "shutdown -r now"<br />
6] "rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm"<br />
7] "yum install lighttpd lighttpd-fastcgi php-cgi pcre php-mysql php-pear php-pecl-apc mysql-server ImageMagick sendmail php-intl wget system-config-firewall-tui"<br />
8] "service mysqld start"<br />
9] "/usr/bin/mysql_secure_installation"<br />
10] "mysql -u root -p" # Don't forget to substitute your own password for the GiveAPasswordHere text below.</p>
<p>    create database wikidb;<br />
    grant index, create, select, insert, update, delete, alter, lock tables on wikidb.* to 'mediawiki'@'localhost' identified by 'GiveAPasswordHere';<br />
    exit </p>
<p>11] "cd /var/www/lighttpd"<br />
12] "wget http://download.wikimedia.org/mediawiki/1.18/mediawiki-1.18.2.tar.gz"<br />
13] "tar xzpf mediawiki-1.18.2.tar.gz"<br />
14] "mv mediawiki-1.18.2 wiki"<br />
15] "chown -R lighttpd:lighttpd wiki"<br />
16] "vi /etc/lighttpd/lighttpd.conf", and set:<br />
server.use-ipv6 = "disable"<br />
server.bind = "(the installation's IP address or hostname)"<br />
server.max-connections = 512<br />
17] "vi /etc/lighttpd/modules.conf", and uncomment:<br />
include "conf.d/fastcgi.conf"<br />
18] "vi /etc/lighttpd/conf.d/fastcgi.conf", and append:<br />
fastcgi.server  = ( ".php" =><br />
                    ( "localhost" =><br />
                      (<br />
                        "socket" => "/var/run/lighttpd/php-fastcgi.socket",<br />
                        "bin-path" => "/usr/bin/php-cgi",<br />
                        "max-procs" => 5,<br />
                        "bin-environment" => (<br />
                           "PHP_FCGI_CHILDREN" => "16",<br />
                           "PHP_FCGI_MAX_REQUESTS" => "10000" ),<br />
                        "broken-scriptfilename" => "enable"<br />
                      )<br />
                    )<br />
                  )<br />
19] "mkdir /var/lib/php/session"<br />
20] "chmod 770 /var/lib/php/session"<br />
21] "chown root:lighttpd /var/lib/php/session"<br />
22] "chown root:lighttpd /var/lib/php"<br />
23] "chmod 775 /var/www/lighttpd/wiki/images"<br />
24] "vi /etc/php.ini"</p>
<p>    post_max_size = 128M<br />
    upload_max_filesize = 128M<br />
    cgi.fix_pathinfo=1</p>
<p>25] Open ports 80. You may use "system-config-firewall-tui".<br />
26] "service lighttpd restart"<br />
27] Setup MediaWiki by visiting in a browser: http://(IP or hostname of MediaWiki installation)/wiki . I used "wikidb" for the database name, and "mediawiki" for the database username. Please use the password you substituted above. You may also use "PHP object caching" when the option shows up.<br />
28] Save your "LocalSettings.php" file when it becomes available for download. And then put it in your /var/www/lighttpd/wiki MediaWiki installation.<br />
29] To enable file uploads (Warning: Your default directory for uploads /var/www/lighttpd/wiki/images/ is vulnerable to arbitrary scripts execution.):<br />
"vi /var/www/lighttpd/wiki/LocalSettings.php"</p>
<p>    $wgEnableUploads = true; # Set this to true<br />
    # Append the following:<br />
    $wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx', 'xlsx', 'pptx','ps','odt','ods','odp','odg','exe');<br />
    $wgFileBlacklist = array_diff( $wgFileBlacklist, array ('exe') ); </p>
<p>30] "chkconfig lighttpd on"<br />
31] "chkconfig mysqld on"<br />
32] "chkconfig sendmail on"<br />
33] "service sendmail start"<br />
34] Congratulations, you've setup MediaWiki. Test to verify.<br />
Note: Logo is in (Lighttpd server root)/wiki/skins/common/images/wiki.png</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.malaya-digital.org/setup-mediawiki-on-a-minimal-centos-6-2-64-bit-and-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup MediaWiki 1.18.2 in a minimal CentOS 6.2 64-bit installation</title>
		<link>http://blog.malaya-digital.org/setup-mediawiki-1-18-2-in-a-minimal-centos-6-2-64-bit-installation/</link>
		<comments>http://blog.malaya-digital.org/setup-mediawiki-1-18-2-in-a-minimal-centos-6-2-64-bit-installation/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 09:55:11 +0000</pubDate>
		<dc:creator>Michael Balcos</dc:creator>
				<category><![CDATA[CentOS / RHEL]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://blog.malaya-digital.org/?p=346</guid>
		<description><![CDATA[1] Do everything below as root. If you need help to setup networking in a minimal CentOS 6.2 installation, please visit http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nfs-server/ 2] Make sure selinux is disabled. 3] "yum install httpd php pcre php-mysql php-pear php-pecl-apc mysql-server ImageMagick sendmail php-intl wget system-config-firewall-tui" 4] "service mysqld start" 5] "/usr/bin/mysql_secure_installation" 6] "mysql -u root -p" # [...]]]></description>
			<content:encoded><![CDATA[<p>1] Do everything below as root. If you need help to setup networking in a minimal CentOS 6.2 installation, please visit <a href="http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nfs-server/" title="http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nfs-server/">http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nfs-server/</a><br />
2] Make sure selinux is disabled.<br />
3] "yum install httpd php pcre php-mysql php-pear php-pecl-apc mysql-server ImageMagick sendmail php-intl wget system-config-firewall-tui"<br />
4] "service mysqld start"<br />
5] "/usr/bin/mysql_secure_installation"<br />
<span id="more-346"></span>6] "mysql -u root -p" # Don't forget to substitute your own password for the GiveAPasswordHere text below.</p>
<blockquote><p>
 create database wikidb;<br />
 grant index, create, select, insert, update, delete, alter, lock tables on wikidb.* to 'mediawiki'@'localhost' identified by 'GiveAPasswordHere';<br />
 exit
</p></blockquote>
<p>7] "cd /var/www/html"<br />
8] "wget http://download.wikimedia.org/mediawiki/1.18/mediawiki-1.18.2.tar.gz"<br />
9] "tar xzpf mediawiki-1.18.2.tar.gz"<br />
10] "mv mediawiki-1.18.2 wiki"<br />
11] "chown -R apache:apache wiki"<br />
12] "vi /etc/httpd/conf/httpd.conf", and append the following:</p>
<blockquote><p>
&#60Directory "/var/www/html/wiki/images"&#62<br />
   Options -Indexes<br />
   # Ignore .htaccess files<br />
   AllowOverride None</p>
<p>   # Serve HTML as plaintext, don't execute SHTML<br />
   AddType text/plain .html .htm .shtml .php</p>
<p>   # Don't run arbitrary PHP code.<br />
   php_admin_flag engine off</p>
<p>   # If you've other scripting languages, disable them too.<br />
&#60/Directory&#62
</p></blockquote>
<p>13] Also, you may need to set "ServerName" in /etc/httpd/conf/httpd.conf .<br />
14] "chmod 775 /var/www/html/wiki/images"<br />
15] "vi /etc/php.ini"</p>
<blockquote><p>
post_max_size = 128M<br />
upload_max_filesize = 128M
</p></blockquote>
<p>16] Open ports 80 and 443. You may use "system-config-firewall-tui".<br />
17] "service httpd restart"<br />
18] Setup MediaWiki by visiting in a browser: http://(IP or hostname of your installation)/wiki . I used "wikidb" for the database name, and "mediawiki" for the database username.  Please use the password you substituted above. You may also use "PHP object caching" when the option shows up.<br />
19] Save your "LocalSettings.php" file when it becomes available for download. And then put it in your /var/www/html/wiki MediaWiki installation.<br />
20] "vi /var/www/html/wiki/LocalSettings.php"</p>
<blockquote><p>
$wgEnableUploads = true; # Set this to true<br />
# Append the following:<br />
$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx', 'xlsx', 'pptx','ps','odt','ods','odp','odg','exe');<br />
$wgFileBlacklist = array_diff( $wgFileBlacklist, array ('exe') );
</p></blockquote>
<p>21] "chkconfig httpd on"<br />
22] "chkconfig mysqld on"<br />
23] "chkconfig sendmail on"<br />
24] Congratulations, you've setup MediaWiki. Test to verify. <img src='http://blog.malaya-digital.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.malaya-digital.org/setup-mediawiki-1-18-2-in-a-minimal-centos-6-2-64-bit-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup ssmtp in CentOS 6 64-bit</title>
		<link>http://blog.malaya-digital.org/setup-ssmtp-in-centos-6-64-bit/</link>
		<comments>http://blog.malaya-digital.org/setup-ssmtp-in-centos-6-64-bit/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 03:42:58 +0000</pubDate>
		<dc:creator>Michael Balcos</dc:creator>
				<category><![CDATA[CentOS / RHEL]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://blog.malaya-digital.org/?p=335</guid>
		<description><![CDATA[1] rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm 2] yum install ssmtp 3] cd /etc/ssmtp 4] mv ssmtp.conf ssmtp.conf.orig 5] vi /etc/ssmtp.conf AuthUser=&#60your Google username&#62@gmail.com AuthPass=&#60your password&#62 FromLineOverride=YES mailhub=smtp.gmail.com:587 UseSTARTTLS=YES 6]To test: echo "Testing" &#124; mail -s "Test Email" (your e-mail address)]]></description>
			<content:encoded><![CDATA[<p>1] rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm<br />
2] yum install ssmtp<br />
3] cd /etc/ssmtp<br />
4] mv ssmtp.conf ssmtp.conf.orig<br />
5] vi /etc/ssmtp.conf</p>
<blockquote><p>AuthUser=&#60your Google username&#62@gmail.com<br />
AuthPass=&#60your password&#62<br />
FromLineOverride=YES<br />
mailhub=smtp.gmail.com:587<br />
UseSTARTTLS=YES</p></blockquote>
<p>6]To test: echo "Testing" | mail -s "Test Email" (your e-mail address)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.malaya-digital.org/setup-ssmtp-in-centos-6-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup Nagios to notify via GoogleTalk / XMPP under CentOS 6 64-bit</title>
		<link>http://blog.malaya-digital.org/setup-nagios-to-notify-via-googletalk-xmpp-under-centos-6-64-bit/</link>
		<comments>http://blog.malaya-digital.org/setup-nagios-to-notify-via-googletalk-xmpp-under-centos-6-64-bit/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 02:59:27 +0000</pubDate>
		<dc:creator>Michael Balcos</dc:creator>
				<category><![CDATA[CentOS / RHEL]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://blog.malaya-digital.org/?p=324</guid>
		<description><![CDATA[NOTE: I tried this on my Nagios setup as described here: http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nagios-server-configure-a-centos-6-64-bit-nagios-nrpe-client/ . 1] Login as root. 2] "yum install perl-Net-XMPP" 3] Download notify_via_jabber , and save it to /usr/lib64/nagios/plugins . 4] "vi /usr/lib64/nagios/plugins/notify_via_jabber", look for the following 2 lines, and adjust properly. my $username = "your.google.username"; my $password = "your.google.password"; 5] "chmod 755 /usr/lib64/nagios/plugins/notify_via_jabber" [...]]]></description>
			<content:encoded><![CDATA[<p>NOTE: I tried this on my Nagios setup as described here: <a href="http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nagios-server-configure-a-centos-6-64-bit-nagios-nrpe-client/" title="http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nagios-server-configure-a-centos-6-64-bit-nagios-nrpe-client/">http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nagios-server-configure-a-centos-6-64-bit-nagios-nrpe-client/</a> .</p>
<p>1] Login as root.<br />
2] "yum install perl-Net-XMPP"<br />
3] Download <a href="http://blog.malaya-digital.org/notify_via_jabber" title="notify_via_jabber">notify_via_jabber</a> , and save it to /usr/lib64/nagios/plugins .<br />
4] "vi /usr/lib64/nagios/plugins/notify_via_jabber", look for the following 2 lines, and adjust properly.</p>
<blockquote><p>my $username = "your.google.username";<br />
my $password = "your.google.password";</p></blockquote>
<p><span id="more-324"></span>5] "chmod 755 /usr/lib64/nagios/plugins/notify_via_jabber"<br />
6] To test: "/usr/lib64/nagios/plugins/notify_via_jabber (Google username of intended recipent) test". If you get a "Cannot resolve (your server's hostname):  at /usr/share/perl5/XML/Stream.pm line 406.", add your server's hostname to 127.0.0.1 in /etc/hosts. Then test again.<br />
7] "vi /etc/nagios/objects/commands.cfg", and put in the following:</p>
<blockquote><p>define command{<br />
 command_name host-notify-by-jabber<br />
 command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$ \nState: $HOSTSTATE$\n Address: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/lib64/nagios/plugins/notify_via_jabber $CONTACTPAGER$ "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **"<br />
}</p>
<p>define command{<br />
 command_name notify-by-jabber<br />
 command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$ \nState: $HOSTSTATE$\n Address: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/lib64/nagios/plugins/notify_via_jabber $CONTACTPAGER$ "** $NOTIFICATIONTYPE$ Service Alert: $SERVICEDESC$ on $HOSTNAME$ State: $SERVICESTATE$ Additional Info: $SERVICEOUTPUT$ **"<br />
}</p></blockquote>
<p>8] "vi /etc/nagios/objects/templates.cfg" and add the following contact template:</p>
<blockquote><p>define contact{<br />
        name                            jabber-contact            ; The name of this contact template<br />
        service_notification_period     24x7                    ; service notifications can be sent anytime<br />
        host_notification_period        24x7                    ; host notifications can be sent anytime<br />
        service_notification_options    w,u,c,r,f,s             ; send notifications for all service states, flapping events, and scheduled downtime events<br />
        host_notification_options       d,u,r,f,s               ; send notifications for all host states, flapping events, and scheduled downtime events<br />
        service_notification_commands   notify-by-jabber          ; send service notifications via email<br />
        host_notification_commands      host-notify-by-jabber     ; send host notifications via email<br />
        register                        0                       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!<br />
        }</p></blockquote>
<p>9] "vi /etc/nagios/objects/contacts.cfg" and insert the following (adjust appropriately):</p>
<blockquote><p>define contact {<br />
        contact_name    michael-jabber<br />
        use             jabber-contact<br />
        alias           Michael Balcos - Google Talk<br />
        email           (your Google username)@gmail.com<br />
        pager           (your Google username)<br />
}</p></blockquote>
<p>10] Add your contact name in the "admins" contact group in the /etc/nagios/objects/contacts.cfg file. EG:</p>
<blockquote><p>define contactgroup{<br />
        contactgroup_name       admins<br />
        alias                   Nagios Administrators<br />
        members                 nagiosadmin,michael-jabber<br />
        }</p></blockquote>
<p>11] "nagios -v /etc/nagios/nagios.cfg" to check configuration.<br />
12] "service nagios restart"</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.malaya-digital.org/setup-nagios-to-notify-via-googletalk-xmpp-under-centos-6-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup OpenVZ in a minimal CentOS 6.2 64-bit installation</title>
		<link>http://blog.malaya-digital.org/setup-openvz-in-centos-6-2-64-bit/</link>
		<comments>http://blog.malaya-digital.org/setup-openvz-in-centos-6-2-64-bit/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 02:39:26 +0000</pubDate>
		<dc:creator>Michael Balcos</dc:creator>
				<category><![CDATA[CentOS / RHEL]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://blog.malaya-digital.org/?p=309</guid>
		<description><![CDATA[1] Setup a minimal CentOS 6.2 64-bit. 2] Setup networking. I used the "192.168.1.0/24" network. Here's my guide for setting up networking: http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/ 3] Login as root. 4] Turn off selinux by issuing in a shell as root: # setenforce 0 ... and then editing /etc/sysconfig/selinux to set: SELINUX=disabled 5] yum -y update 6] yum [...]]]></description>
			<content:encoded><![CDATA[<p>1] Setup a minimal CentOS 6.2 64-bit.</p>
<p>2] Setup networking. I used the "192.168.1.0/24" network. Here's my guide for setting up networking: <a href="http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/" title="http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/">http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/</a></p>
<p>3] Login as root.</p>
<p>4] Turn off selinux by issuing in a shell as root:<br />
# setenforce 0<br />
... and then editing /etc/sysconfig/selinux to set:<br />
SELINUX=disabled</p>
<p><span id="more-309"></span>5] yum -y update</p>
<p>6] yum -y install wget</p>
<p>7] cd /root</p>
<p>8] wget http://mirror.nus.edu.sg/fedora/epel/6/x86_64/epel-release-6-5.noarch.rpm</p>
<p>9] rpm -Uvh epel-release-6-5.noarch.rpm</p>
<p>10] rpm --import  http://download.openvz.org/RPM-GPG-Key-OpenVZ</p>
<p>11] cd /etc/yum.repos.d</p>
<p>12] wget http://download.openvz.org/openvz.repo</p>
<p>13] To see kernels to choose: yum search vzkernel</p>
<p>14] I chose: yum install vzkernel.x86_64 vzkernel-headers.x86_64 vzkernel-devel.x86_64 vzkernel-firmware.noarch</p>
<p>15] vi /etc/yum.conf</p>
<p>... and make sure you have a "exclude=kernel*" line under the [main] section.</p>
<p>16] vi /boot/grub/menu.lst # check if you'll be booting the OpenVZ kernel. You can "rpm -ql vzkernel.x86_64 | grep \/boot\/vmlinuz" for more information on the OpenVZ kernel package.</p>
<p>17] yum install vzctl vzquota # packages may have been installed already, but do this just to make sure.</p>
<p>18] vi /etc/sysctl.conf</p>
<p>Make sure you have the following settings:</p>
<p>net.ipv4.ip_forward = 1<br />
net.ipv4.conf.default.proxy_arp = 0<br />
net.ipv4.conf.all.rp_filter = 1<br />
kernel.sysrq = 1<br />
net.ipv4.conf.default.send_redirects = 1<br />
net.ipv4.conf.all.send_redirects = 0<br />
net.ipv4.icmp_echo_ignore_broadcasts = 1<br />
net.ipv4.conf.default.forwarding = 1<br />
net.ipv6.conf.default.forwarding = 1<br />
net.ipv6.conf.all.forwarding = 1</p>
<p>19] shutdown -r now</p>
<p>20] "vi /etc/vz/vz.conf" and set:</p>
<p>NEIGHBOUR_DEVS=all</p>
<p>21] service iptables stop</p>
<p>22] chkconfig iptables off</p>
<p>23] shutdown -r now</p>
<p>24] To create a container:</p>
<p>cd /vz/template/cache<br />
wget http://download.openvz.org/template/precreated/centos-6-x86.tar.gz<br />
vzctl create 101 --ostemplate centos-6-x86<br />
vzctl set 101 --ipadd 192.168.1.215 --save<br />
vzctl set 101 --nameserver 208.67.222.222 --nameserver 208.67.220.220 --save<br />
vzctl set 101 --hostname "my.new.container.com" --save<br />
vzctl set 101 --onboot yes --save<br />
vzctl start 101</p>
<p>25] To set time zone to Singapore for both host and container:</p>
<p>rm -rf /etc/localtime 2>/dev/null; unlink /etc/localtime 2>/dev/null<br />
ln -s /usr/share/zoneinfo/Asia/Singapore /etc/localtime<br />
vzctl exec 101 rm -rf /etc/localtime 2>/dev/null<br />
vzctl exec 101 unlink /etc/localtime 2>/dev/null<br />
vzctl exec 101 ln -s /usr/share/zoneinfo/Asia/Singapore /etc/localtime</p>
<p>26] To enter container:</p>
<p>vzctl enter 101</p>
<p>Some usefull stuff(stop your container before doing these):</p>
<p>	Adjust disk space:</p>
<p>		vzctl set 101 --diskspace 4096000 --save</p>
<p>	Adjust memory(Guaranteed 512MB and 1024MB Burstable):</p>
<p>		vzctl set 101 --vmguarpages 512M --save<br />
		vzctl set 101 --oomguarpages 512M --save<br />
		vzctl set 101 --privvmpages 512M:1024M --save</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.malaya-digital.org/setup-openvz-in-centos-6-2-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup a minimal CentOS 6 64-bit Nagios server + Configure a CentOS 6 64-bit Nagios NRPE client</title>
		<link>http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nagios-server-configure-a-centos-6-64-bit-nagios-nrpe-client/</link>
		<comments>http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nagios-server-configure-a-centos-6-64-bit-nagios-nrpe-client/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 21:05:08 +0000</pubDate>
		<dc:creator>Michael Balcos</dc:creator>
				<category><![CDATA[CentOS / RHEL]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://blog.malaya-digital.org/?p=293</guid>
		<description><![CDATA[To setup a minimal CentOS 6 64-bit Nagios server: 1] Setup CentOS 6 64-bit as in guide (http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/). 2] "yum update" 3] "vi /etc/sysconfig/selinux" and set "SELINUX=disabled". 4] "setenforce 0" 5] "shutdown -r now" 6] "rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm" 7] "yum install nagios nagios-plugins nagios-plugins-all nagios-plugins-nrpe php php-pear mod_ssl net-snmp net-snmp-utils sendmail" 8] To create the [...]]]></description>
			<content:encoded><![CDATA[<p>To setup a minimal CentOS 6 64-bit Nagios server:<br />
1] Setup CentOS 6 64-bit as in guide (<a href="http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/">http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/</a>).<br />
2] "yum update"<br />
3] "vi /etc/sysconfig/selinux" and set "SELINUX=disabled".<br />
4] "setenforce 0"<br />
5] "shutdown -r now"<br />
6] "rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm"<br />
7] "yum install nagios nagios-plugins nagios-plugins-all nagios-plugins-nrpe php php-pear mod_ssl net-snmp net-snmp-utils sendmail"<br />
<span id="more-293"></span>8] To create the default Nagios user and assign a password to it:</p>
<blockquote><p>htpasswd /etc/nagios/passwd nagiosadmin</p></blockquote>
<p>9] To check Nagios configuration file for errors:</p>
<blockquote><p>nagios -v /etc/nagios/nagios.cfg</p></blockquote>
<p>10] Open port 443 for secure web access.<br />
11] "usermod -a -G nagios apache"<br />
12] "chkconfig nagios on"<br />
13] "chkconfig httpd on"<br />
14] "chkconfig sendmail on"<br />
15] "service sendmail restart"<br />
16] Edit /etc/httpd/conf/httpd.conf, and appropriately configure "ServerName". Also, edit /etc/httpd/conf.d/nagios.conf , and uncomment all "SSLRequireSSL" lines.<br />
17] "service httpd restart"<br />
18] Edit /etc/nagios/nagios.cfg, and uncomment "cfg_dir=/etc/nagios/servers".<br />
19] Append to /etc/nagios/objects/commands.cfg:</p>
<blockquote><p>define command{<br />
command_name check_nrpe<br />
command_line /usr/lib64/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$<br />
}</p></blockquote>
<p>20] "mkdir /etc/nagios/servers"<br />
21] "chown root:nagios /etc/nagios/servers"<br />
22] "service nagios restart"<br />
23] Open https://(IP or hostname of Nagios server)/nagios . Enter the credentials for the nagiosadmin user.</p>
<p>To configure a CentOS 6 64-bit Nagios NRPE client:<br />
1] "yum update"<br />
2] "vi /etc/sysconfig/selinux" and set "SELINUX=disabled".<br />
3] "setenforce 0"<br />
4] "shutdown -r now"<br />
5] "rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm"<br />
6] "yum install nagios-plugins-nrpe nagios-plugins-all nagios-nrpe openssl"<br />
7] Edit /etc/yum.conf and append this to the "[main]" section:</p>
<blockquote><p>exclude=nagios*</p></blockquote>
<p>8] Edit /etc/nagios/nrpe.cfg . Look for:</p>
<blockquote><p>allowed_hosts=127.0.0.1</p></blockquote>
<p>Add the IP of your Nagios server. And add the IP of the Nagios client. Eg:</p>
<blockquote><p>allowed_hosts=127.0.0.1,10.1.34.53,10.1.34.32</p></blockquote>
<p>Also look for:</p>
<blockquote><p>server_address=127.0.0.1</p></blockquote>
<p>Assign the IP of your Nagios client. Eg:</p>
<blockquote><p>server_address=10.1.34.32</p></blockquote>
<p>9] "chown nrpe:nrpe /etc/nagios/nrpe.cfg"<br />
10] Add to /etc/services :</p>
<blockquote><p>nrpe      5666/tcp    # NRPE</p></blockquote>
<p>11] "chkconfig nrpe on"<br />
12] "service nrpe restart"<br />
13] open port 5666/tcp<br />
14] To check if NRPE is working on the Nagios client(substitute the IP of the Nagios client; this command is to be executed on the client):</p>
<blockquote><p>/usr/lib64/nagios/plugins/check_nrpe -H 10.1.34.32</p></blockquote>
<p>15] You can also check NRPE daemon from the Nagios server(substitute the IP of the Nagios client; this command is to be executed on the server):</p>
<blockquote><p>/usr/lib64/nagios/plugins/check_nrpe -H 10.1.34.32</p></blockquote>
<p>16] Make sure the "COMMAND DEFINITIONS" in the /etc/nagios/nrpe.cfg file in the client are in order. They can be found near the end of the file.<br />
17] "service nrpe restart"<br />
18] Edit /etc/nagios/objects/templates.cfg in the Nagios server, and add the following(you may need to make adjustments in order to reconcile the settings described in this step to the /etc/nagios/nrpe.cfg settings in the client):</p>
<blockquote><p>define host{<br />
name linux-box ; Name of this template<br />
use generic-host ; Inherit default values<br />
check_period 24x7<br />
check_interval 5<br />
retry_interval 1<br />
max_check_attempts 10<br />
check_command check-host-alive<br />
notification_period 24x7<br />
notification_interval 30<br />
notification_options d,r<br />
contact_groups admins<br />
register 0 ; DONT REGISTER THIS - ITS A TEMPLATE<br />
}</p></blockquote>
<p>19] Add a file to /etc/nagios/servers in the Nagios server(eg: "/etc/nagios/servers/linux-nagios-client.cfg" ; you can use any filename you like, just make sure it has a ".cfg" extension). It should look like this (substitute appropriate values for host_name, alias, and address)</p>
<blockquote><p>define host{<br />
use linux-box<br />
host_name linux-nagios-client<br />
alias CentOS 6<br />
address 10.1.34.32<br />
}</p>
<p>define service{<br />
use generic-service<br />
host_name linux-nagios-client<br />
service_description Current Load<br />
check_command check_nrpe!check_load<br />
}</p>
<p>define service{<br />
use generic-service<br />
host_name linux-nagios-client<br />
service_description /dev/hda1 Current users<br />
check_command check_nrpe!check_users<br />
}</p>
<p>define service{<br />
use generic-service<br />
host_name linux-nagios-client<br />
service_description Root Partition<br />
check_command check_nrpe!check_hda1<br />
}</p>
<p>define service{<br />
use generic-service<br />
host_name linux-nagios-client<br />
service_description Total Processes<br />
check_command check_nrpe!check_total_procs<br />
}</p>
<p>define service{<br />
use generic-service<br />
host_name linux-nagios-client<br />
service_description Zombie Processes<br />
check_command check_nrpe!check_zombie_procs<br />
}</p>
<p>define service{<br />
use generic-service<br />
host_name linux-nagios-client<br />
service_description SSH<br />
check_command check_nrpe!check_ssh<br />
}</p>
<p>define service{<br />
use generic-service<br />
host_name linux-nagios-client<br />
service_description Swap Usage<br />
check_command check_nrpe!check_swap<br />
}</p>
<p>define service{<br />
use generic-service<br />
host_name linux-nagios-client<br />
service_description Ping<br />
check_command                   check_ping!100.0,20%!500.0,60%<br />
}</p></blockquote>
<p>20] Restart Nagios on the Nagios server:</p>
<blockquote><p>service nagios restart</p></blockquote>
<p>21] Open http://(IP or hostname of Nagios server)/nagios . Enter the credentials for the nagiosadmin user.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nagios-server-configure-a-centos-6-64-bit-nagios-nrpe-client/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setup a minimal CentOS 6 64-bit NFS server</title>
		<link>http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nfs-server/</link>
		<comments>http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nfs-server/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 21:07:51 +0000</pubDate>
		<dc:creator>Michael Balcos</dc:creator>
				<category><![CDATA[CentOS / RHEL]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://blog.malaya-digital.org/?p=274</guid>
		<description><![CDATA[To setup the server: 1] Setup CentOS 6 64-bit as in guide (http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/). 2] "yum update" 3] "shutdown -r now" 4] "yum install nfs-utils rpcbind system-config-firewall-tui" 5] "vi /etc/sysconfig/selinux" and set "SELINUX=disabled". 6] "setenforce 0" 7] Make a folder to be shared. eg: mkdir /nfs-share 8] Do the following: chkconfig nfs on chkconfig nfslock on [...]]]></description>
			<content:encoded><![CDATA[<p><strong>To setup the server:</strong><br />
1] Setup CentOS 6 64-bit as in guide (<a href="http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/">http://blog.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/</a>).<br />
2] "yum update"<br />
3] "shutdown -r now"<br />
4] "yum install nfs-utils rpcbind system-config-firewall-tui"<br />
5] "vi /etc/sysconfig/selinux" and set "SELINUX=disabled".<br />
6] "setenforce 0"<br />
<span id="more-274"></span>7] Make a folder to be shared. eg:</p>
<blockquote><p>mkdir /nfs-share</p></blockquote>
<p>8] Do the following:</p>
<blockquote><p>chkconfig nfs on<br />
chkconfig nfslock on<br />
chkconfig rpcbind on</p></blockquote>
<p>9] "system-config-firewall-tui"<br />
... and include "NFS4" in trusted services.<br />
10] Make a "/etc/exports" text file with something like this inside (substitute network settings when appropriate):</p>
<blockquote><p>/nfs-share    10.0.0.0/255.0.0.0(rw,sync,no_root_squash)</p></blockquote>
<p>11] Append to "/etc/hosts.allow":</p>
<blockquote><p>mountd: 10.0.0.0/255.0.0.0</p></blockquote>
<p>12] Append to "/etc/hosts.deny":</p>
<blockquote><p>portmap:ALL<br />
lockd:ALL<br />
mountd:ALL<br />
rquotad:ALL<br />
statd:ALL</p></blockquote>
<p>13] Do the following:</p>
<blockquote><p>service rpcbind restart<br />
service nfs restart<br />
service nfslock restart</p></blockquote>
<p><strong>To configure a CentOS 6 64-bit client:</strong><br />
1] "yum update"<br />
2] "shutdown -r now"<br />
3] "yum install nfs-utils rpcbind"<br />
4] "vi /etc/sysconfig/selinux" and set "SELINUX=disabled".<br />
5] "setenforce 0"<br />
6] Make a folder to be the mount point. eg:</p>
<blockquote><p>mkdir /nfs-share</p></blockquote>
<p>7] Do the following:</p>
<blockquote><p>chkconfig nfs on<br />
chkconfig nfslock on<br />
chkconfig rpcbind on</p></blockquote>
<p>8] Do the following:</p>
<blockquote><p>service rpcbind restart<br />
service nfs restart<br />
service nfslock restart</p></blockquote>
<p>9] To mount(do this as root):</p>
<blockquote><p>mount -t nfs4 10.1.34.24:/nfs-share /nfs-share</p></blockquote>
<p>10] To automatically do the mount during startup, append something like this to "/etc/fstab"(make necessary adjustments for your requirements):</p>
<blockquote><p>10.1.34.24:/nfs-share /nfs-share nfs4 defaults 1 1</p></blockquote>
<p><strong>To mount the NFS share from an Ubuntu 10.04.3 client(do this as root):</strong><br />
"mount -t nfs4 10.1.34.24:/nfs-share /nfs-share"<br />
NOTE: substitute the IP of your NFS server for the "10.1.34.24" IP above. Also, the trailing "/nfs-share" will be the mount point of the NFS folder on the client.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nfs-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

