<?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>MERCUMAYA.NET Blog &#187; How to</title>
	<atom:link href="http://blog.mercumaya.net/category/how-to/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mercumaya.net</link>
	<description>Where Web All Begins!</description>
	<lastBuildDate>Thu, 24 Mar 2011 02:16:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Add SPF records to all domains in Plesk</title>
		<link>http://blog.mercumaya.net/add-spf-records-to-all-domains-in-plesk.html</link>
		<comments>http://blog.mercumaya.net/add-spf-records-to-all-domains-in-plesk.html#comments</comments>
		<pubDate>Sun, 22 Jun 2008 02:13:27 +0000</pubDate>
		<dc:creator>MERCUMAYA</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Plesk]]></category>

		<guid isPermaLink="false">http://blog.mercumaya.net/?p=11</guid>
		<description><![CDATA[If you find yourself in the situation where you need to bulk add SPF records to every domain in Plesk, you can use this huge one-liner: mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "select dns_zone_id,displayHost from dns_recs GROUP BY dns_zone_id ORDER BY dns_zone_id ASC;" &#124; awk '{print "INSERT INTO dns_recs (type,host,val,time_stamp,dns_zone_id,displayHost,displayVal) VALUES ('\''TXT'\'','\''"$2"'\'','\''v=spf1 a mx [...]]]></description>
			<content:encoded><![CDATA[<p>If you find yourself in the situation where you need to bulk add SPF records to every domain in Plesk, you can use this huge one-liner:</p>
<p><code>mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "select dns_zone_id,displayHost from dns_recs GROUP BY dns_zone_id ORDER BY dns_zone_id ASC;" | awk '{print "INSERT INTO dns_recs (type,host,val,time_stamp,dns_zone_id,displayHost,displayVal) VALUES ('\''TXT'\'','\''"$2"'\'','\''v=spf1 a mx ~all'\'',NOW(),"$1",'\''"$2"'\'','\''v=spf1 a mx ~all'\'');"}' | mysql -u admin -p`cat /etc/psa/.psa.shadow` psa</code></p>
<p>Then you’ll need to make Plesk write these changes to the zone files:</p>
<p><code># mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' | awk '{print "/usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh</code></p>
<p>You can check your work by viewing the new entries you made:</p>
<p><code>mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "SELECT * FROM dns_recs WHERE type='TXT';"</code></p>
<p>Credit : http://rackerhacker.com/2007/04/24/add-spf-records-to-all-domains-in-plesk/</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mercumaya.net/add-spf-records-to-all-domains-in-plesk.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading PostgreSQL on Cpanel 11 Server</title>
		<link>http://blog.mercumaya.net/upgrading-postgresql-on-cpanel-11-server.html</link>
		<comments>http://blog.mercumaya.net/upgrading-postgresql-on-cpanel-11-server.html#comments</comments>
		<pubDate>Wed, 20 Jun 2007 07:08:24 +0000</pubDate>
		<dc:creator>MERCUMAYA</dc:creator>
				<category><![CDATA[How to]]></category>

		<guid isPermaLink="false">http://blog.mercumaya.net/upgrading-postgresql-on-cpanel-11-server.html</guid>
		<description><![CDATA[Upgrading PostgreSQL 8.2 on Cpanel Server *ANY ACTIONS YOU TAKE, YOU TAKE THEM AT YOUR OWN RESPONSABILITY* Reason : PostgreSQL 8.2 offers a huge performance increase pretty much across the board and few other fixes Platforms: RHEL 3,4,Centos 3.x,4.x, Fedora Core 5,6 Make sure if you have postgresql installed. rpm -qa &#124; grep postgres &#124; [...]]]></description>
			<content:encoded><![CDATA[<h3>Upgrading PostgreSQL 8.2 on Cpanel Server</h3>
<h5><strong>*ANY ACTIONS YOU TAKE, YOU TAKE THEM AT YOUR OWN RESPONSABILITY*</strong></h5>
<h3>Reason :</h3>
<p>PostgreSQL 8.2 offers a huge performance increase pretty much across the board and few other fixes</p>
<h3>Platforms:</h3>
<p>RHEL 3,4,Centos 3.x,4.x, Fedora Core 5,6<br />
Make sure if you have postgresql installed.</p>
<pre>
rpm -qa | grep postgres | tee /root/rpm_pgsql</pre>
<p>The above will list all the installed postgresql rpm packages and store the output to /root/rpm_pgsql. You can use this list to remove all the postgresql related rpm later.</p>
<li> Backup all your databases
<pre>su postgres -

mkdir backups

pg_dumpall &gt; /var/lib/pgsql/backups/postgresql_backup

exit</pre>
<p>exit will logout from the postgres user</li>
<li> Now stop the postgrsql daemon using the following command
<pre>
/sbin/service postgresql stop</pre>
</li>
<li> Backup the whole database folder
<pre>
mv /var/lib/pgsql /var/lib/pgsql_old</pre>
</li>
<li>Remove the old rpms using rpm -e, you can use the previously stored /root/rpm_pgsql to remove the postgresql rpm and its depended, for example the perl-DBD-pg depends on it. So you will be removing the /root/rpm_pgsql list + perl-DBD-gpFor example, it might differ on your servers
<pre>
rpm -e rh-postgresql-server

rpm -e rh-postgresql

rpm -e rh-postgresql-devel

rpm -e rh-postgresql-python

rpm -e rh-postgresql-libs

rpm -e perl-DBD-Pg</pre>
</li>
<li> Download the new version of postgreSQL from the postgresql download site into/usr/local/src or any directory you prefer.</li>
<li> After you have download the postgreSQL rpms from <a href="http://www.postgresql.org/ftp/binary/v8.1.0/linux/rpms/">PostgreSQL download site</a>.<strong>Download the following rpms </strong>
<pre>
postgresql-8.2.4-1PGDG.i686.rpm
postgresql-contrib-8.2.4-1PGDG.i686.rpm
postgresql-devel-8.2.4-1PGDG.i686.rpm
postgresql-libs-8.2.4-1PGDG.i686.rpm
postgresql-plpython-8.2.4-1PGDG.i686.rpm
postgresql-server-8.2.4-1PGDG.i686.rpm</pre>
<p>To install</p>
<pre>
rpm -Uhv postgresql*.rpm</pre>
</li>
<li> After you have installed the new postgreSQL rpms login to WHM usinghttps://ip:2087under the SQL service Menu
<p>Postgres Config</p>
<p>Install new configuration and change the password</li>
<li> To restore the old databases
<pre>
psql template1 &lt; /var/lib/pgsql_old/postgresql_backup_file</pre>
<p>The above will restore the databases</p>
<h3> if you see any mistake please feel free to comment using comments</h3>
</li>
]]></content:encoded>
			<wfw:commentRss>http://blog.mercumaya.net/upgrading-postgresql-on-cpanel-11-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

