<?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>The cPanel Admin &#187; automation</title>
	<atom:link href="http://www.thecpaneladmin.com/tag/automation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thecpaneladmin.com</link>
	<description>We know stuff about cPanel.</description>
	<lastBuildDate>Mon, 21 Nov 2011 19:50:55 +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>Skipping the WHM Setup Wizard on New Servers</title>
		<link>http://www.thecpaneladmin.com/skipping-whm-setup-wizard/</link>
		<comments>http://www.thecpaneladmin.com/skipping-whm-setup-wizard/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 14:26:43 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[whm]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=600</guid>
		<description><![CDATA[If you have a fully automated cPanel/WHM setup method used to deploy a large number of servers, you&#8217;ve probably found it to be annoying that upon loading WHM for the first time, you&#8217;re greeted with a setup wizard that you have to click through.  To skip this wizard, all you need to do is touch [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/assign-ip-multiple-cpanel-accounts/' rel='bookmark' title='How to Assign an IP To Multiple cPanel Accounts'>How to Assign an IP To Multiple cPanel Accounts</a></li>
<li><a href='http://www.thecpaneladmin.com/rebuild-cpanel-bandwidth-graphs/' rel='bookmark' title='How to Rebuild cPanel Bandwidth Graphs'>How to Rebuild cPanel Bandwidth Graphs</a></li>
<li><a href='http://www.thecpaneladmin.com/quota-errors-in-exims-panic-log/' rel='bookmark' title='Quota Errors in Exim&#8217;s Panic Log'>Quota Errors in Exim&#8217;s Panic Log</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you have a fully automated cPanel/WHM setup method used to deploy a large number of servers, you&#8217;ve probably found it to be annoying that upon loading WHM for the first time, you&#8217;re greeted with a setup wizard that you have to click through.  To skip this wizard, all you need to do is touch a file:</p>
<blockquote><p>touch /etc/.whostmgrft</p></blockquote>
<p>This will tell WHM to skip the setup wizard altogether. However, if you haven&#8217;t already, you&#8217;ll want to add the following pieces to your automation which are usually configured in the setup wizard:</p>
<ul>
<li>IMAP &#8211; /scripts/setupmailserver (courier | dovecot  | disabled)</li>
<li>DNS &#8211; /scripts/setupnameserver (bind | nsd | disabled)</li>
<li>FTP &#8211; /scripts/setupftpserver (pure-ftpd | proftpd | disabled)</li>
</ul>
<p>You should also create the <strong>/etc/wwwacct.conf </strong>file, with the following contents:</p>
<p><code>ADDR 123.456.789.123<br />
CONTACTEMAIL your@emailaddress<br />
CONTACTPAGER<br />
DEFMOD x3<br />
ETHDEV eth0<br />
FTPTYPE pureftp<br />
HOMEDIR /home<br />
HOMEMATCH home<br />
HOST server.domain.com<br />
LOGSTYLE combined<br />
MINUID<br />
NS ns1.yourdomain.com<br />
NS2 ns2.yourdomain.com<br />
NS3<br />
NS4<br />
NSTTL 86400<br />
SCRIPTALIAS y<br />
TTL 14400</code></p>
<p>Derived from : <a href="http://www.cpanel.net/blog/integration/2010/05/skipping-the-whm-getting-started-wizard.html" target="_blank">http://www.cpanel.net/blog/integration/2010/05/skipping-the-whm-getting-started-wizard.html</a></p>
<p><map name='google_ad_map_600_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/600?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_600_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=600&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fskipping-whm-setup-wizard%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=600&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/assign-ip-multiple-cpanel-accounts/' rel='bookmark' title='How to Assign an IP To Multiple cPanel Accounts'>How to Assign an IP To Multiple cPanel Accounts</a></li>
<li><a href='http://www.thecpaneladmin.com/rebuild-cpanel-bandwidth-graphs/' rel='bookmark' title='How to Rebuild cPanel Bandwidth Graphs'>How to Rebuild cPanel Bandwidth Graphs</a></li>
<li><a href='http://www.thecpaneladmin.com/quota-errors-in-exims-panic-log/' rel='bookmark' title='Quota Errors in Exim&#8217;s Panic Log'>Quota Errors in Exim&#8217;s Panic Log</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/skipping-whm-setup-wizard/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Changing The Default Web Templates for cPanel</title>
		<link>http://www.thecpaneladmin.com/default-web-templates-cpanel/</link>
		<comments>http://www.thecpaneladmin.com/default-web-templates-cpanel/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 17:00:35 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=422</guid>
		<description><![CDATA[cPanel currently has four templates that are visible to your users: Default website: Appears to visitors who navigate to a site that points to the server but isn&#8217;t configured in Apache Account move: Appears to visitors who navigate to a site that has moved Connection selection: Appears to visitors who navigate to a site that [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/installing-and-configuring-dovecot/' rel='bookmark' title='Installing and Configuring Dovecot'>Installing and Configuring Dovecot</a></li>
<li><a href='http://www.thecpaneladmin.com/changing-sites-ip-address/' rel='bookmark' title='Changing a Site&#8217;s IP Address'>Changing a Site&#8217;s IP Address</a></li>
<li><a href='http://www.thecpaneladmin.com/resolving-domain-park-wrapper-errors/' rel='bookmark' title='Resolving Domain Park Wrapper Errors'>Resolving Domain Park Wrapper Errors</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>cPanel currently has four templates that are visible to your users:</p>
<p><strong>Default website:</strong> Appears to visitors who navigate to a site that points to the server but isn&#8217;t configured in Apache<br />
<strong>Account move:</strong> Appears to visitors who navigate to a site that has moved<br />
<strong>Connection selection:</strong> Appears to visitors who navigate to a site that is experiencing a connection or firewall problem<br />
<strong>Account suspended: </strong>Appears to visitors who navigate to a site that has been suspended</p>
<p>You can modify the templates in <strong>WHM</strong> &gt; <strong>Web Template Editor</strong>, but what if you have multiple servers you need to update templates for?</p>
<p>The templates are stored in a simple location:</p>
<blockquote><p>/var/cpanel/webtemplates/$user/$language/$templatename.tmpl</p></blockquote>
<p><strong>$user :</strong> The reseller user (all accounts under this reseller will use its templates)</p>
<p><strong>$language: </strong>The language in use for cPanel</p>
<p><strong>$templatename:</strong> The name of the template, with .tmpl appended:</p>
<blockquote><p>Default website: <em>default.tmpl</em><br />
Account move:<em> moving.tmpl</em><br />
Connection selection:<em> redirect.tmpl</em><br />
Account suspended: <em>suspended.tmpl</em></p></blockquote>
<p>This way, if you wanted to (for example) change all the suspended pages for accounts owned by root, simply drop your html code into the following file:</p>
<blockquote><p>/var/cpanel/webtemplates/root/english/suspended.tmpl</p></blockquote>
<p>The way cPanel works in regards to these templates, is to redirect all sites matching relevant situations (such as suspended websites) to a compiled CGI file in /usr/local/cpanel/cgi-sys:</p>
<blockquote><p>movingpage.cgi<br />
defaultwebpage.cgi<br />
suspendedpage.cgi<br />
redirect.cgi</p></blockquote>
<p>The files load up the template and serve them to the visitor reaching the website or cPanel for the account in question.</p>
<p><map name='google_ad_map_422_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/422?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_422_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=422&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fdefault-web-templates-cpanel%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=422&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/installing-and-configuring-dovecot/' rel='bookmark' title='Installing and Configuring Dovecot'>Installing and Configuring Dovecot</a></li>
<li><a href='http://www.thecpaneladmin.com/changing-sites-ip-address/' rel='bookmark' title='Changing a Site&#8217;s IP Address'>Changing a Site&#8217;s IP Address</a></li>
<li><a href='http://www.thecpaneladmin.com/resolving-domain-park-wrapper-errors/' rel='bookmark' title='Resolving Domain Park Wrapper Errors'>Resolving Domain Park Wrapper Errors</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/default-web-templates-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command Line PureFTP Configuration on cPanel</title>
		<link>http://www.thecpaneladmin.com/configuring-pureftp/</link>
		<comments>http://www.thecpaneladmin.com/configuring-pureftp/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 00:42:27 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[ftp]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=508</guid>
		<description><![CDATA[Ftp is easy to configure on a cPanel server using WHM or the pureFTP configuration file.  The FTP service configuration in WHM is a no-brainer, but for those looking to set up FTP from command line (such as for automation purposes), you can use cPanel&#8217;s built-in template system to apply configuration options that will not [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/cpanel-command-line-dns-cluster-management/' rel='bookmark' title='cPanel Command Line DNS and Cluster Management'>cPanel Command Line DNS and Cluster Management</a></li>
<li><a href='http://www.thecpaneladmin.com/installing-and-configuring-dovecot/' rel='bookmark' title='Installing and Configuring Dovecot'>Installing and Configuring Dovecot</a></li>
<li><a href='http://www.thecpaneladmin.com/changing-ftp-user-path/' rel='bookmark' title='Changing an FTP User&#8217;s Path'>Changing an FTP User&#8217;s Path</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Ftp is easy to configure on a cPanel server using WHM or the pureFTP configuration file.  The FTP service configuration in WHM is a no-brainer, but for those looking to set up FTP from command line (such as for automation purposes), you can use cPanel&#8217;s built-in template system to apply configuration options that will not be overwritten during cPanel updates.</p>
<p>The pureFTP template is located in <strong>/var/cpanel/conf/pureftpd/main</strong>, and is set up YAML style similar to most of cPanel&#8217;s internal configuration files. The settings in the template correlate directly to the same options in /etc/pure-ftpd.conf, but it&#8217;s better to edit the template since cPanel tends to prefer template-based configuration to regenerate (overwrite) config files.</p>
<p>So let&#8217;s change an option in the FTP configuration. I&#8217;m going to change the LimitRecursion value from 2000 to 10000, which will allow the FTP server to display more than 2000 files in a single folder. To do this, I&#8217;ll edit the value in the template file mentioned previously, and then apply the changes using one of the WHM binaries invoked from command line:</p>
<blockquote><p>/usr/local/cpanel/whostmgr/bin/whostmgr2 doftpconfiguration</p></blockquote>
<p>What if I wanted to specify an option that isn&#8217;t in the template? Well, you can do this one of two ways:</p>
<p><strong>1. Add the option to the template</strong></p>
<p>If you do this, note the syntax in the other FTP options &#8211; yes and no are enclosed in single quotes, everything else is not. You also need to envoke doftpconfiguration via the whostmgr2 command as shown above.</p>
<p><strong>2. Change the option to pure-ftp.conf</strong></p>
<p>You can change an option in the FTP configuration file and run<strong> /scripts/ftpup &#8211;force,</strong> and the template will add the changed values to the template as long as they don&#8217;t already exist. If they do, the template will change the specified option in pure-ftpd.conf to match its own value.</p>
<p>Generally this would com in use if you&#8217;re automating server setups.  You can create a standard template for pureFTP, and download it to your server upon setup and update the configuration. This prevents you from having to modify anything manually, which can be a pain when deploying a large number of servers:</p>
<blockquote><p>wget -O /var/cpanel/conf/pureftp/main http://yourrepo/pureftp/main</p>
<p>/usr/local/cpanel/whostmgr/bin/whostmgr2 doftpconfiguration</p></blockquote>
<p><strong>Additional Resources:</strong></p>
<p><a href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/FtpConfig" target="_blank">cPanel Documenation: FTP Configuration</a></p>
<p><map name='google_ad_map_508_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/508?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_508_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=508&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fconfiguring-pureftp%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=508&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/cpanel-command-line-dns-cluster-management/' rel='bookmark' title='cPanel Command Line DNS and Cluster Management'>cPanel Command Line DNS and Cluster Management</a></li>
<li><a href='http://www.thecpaneladmin.com/installing-and-configuring-dovecot/' rel='bookmark' title='Installing and Configuring Dovecot'>Installing and Configuring Dovecot</a></li>
<li><a href='http://www.thecpaneladmin.com/changing-ftp-user-path/' rel='bookmark' title='Changing an FTP User&#8217;s Path'>Changing an FTP User&#8217;s Path</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/configuring-pureftp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automating Apache and PHP Updates</title>
		<link>http://www.thecpaneladmin.com/automating-apache-php-updates/</link>
		<comments>http://www.thecpaneladmin.com/automating-apache-php-updates/#comments</comments>
		<pubDate>Wed, 19 May 2010 14:58:58 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[easyapache]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=416</guid>
		<description><![CDATA[A lot of hosts that deploy a large number of servers are automating updates instead of running them manually. While cPanel updates can be automated as well, it&#8217;s become a common question of how to automate Apache and PHP updates across a large number of servers without having to manually run EasyApache on each server, [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/cpanel-installing-mod_python-apache-2/' rel='bookmark' title='cPanel: Installing Mod_Python on Apache 2'>cPanel: Installing Mod_Python on Apache 2</a></li>
<li><a href='http://www.thecpaneladmin.com/configuring-pureftp/' rel='bookmark' title='Command Line PureFTP Configuration on cPanel'>Command Line PureFTP Configuration on cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/cpanel-updates-redhat-9-break-stuff/' rel='bookmark' title='cPanel Updates on Redhat 9 Can Break Stuff'>cPanel Updates on Redhat 9 Can Break Stuff</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A lot of hosts that deploy a large number of servers are automating updates instead of running them manually. While cPanel updates can be automated as well, it&#8217;s become a common question of how to automate Apache and PHP updates across a large number of servers without having to manually run EasyApache on each server, which can be a very time-consuming process. If Apache and PHP were built via RPM, you could simply run a yum update. However, since they are built with EasyApache it&#8217;s not quite as simple as updating an RPM, but it&#8217;s still very easy to automate.</p>
<p>A few things I want to mention before you consider automating Apache and PHP updates:</p>
<ul>
<li>You shouldn&#8217;t do this unless you have cPanel updates running automatically as well, for stable and release builds only. This reduces the chance of something going wrong and leaving you with broken builds across a ton of servers</li>
<li>Always test your build first on one server before deploying</li>
</ul>
<p><strong>Scenario:<br />
</strong></p>
<p><em>You have a large number of servers that are set up almost identically, and you want to schedule monthly updates to make sure PHP and Apache are always up to date, but still similar to provide consistency.</em></p>
<p>The easiest way to set this up is as follows:</p>
<p>1) Run EasyApache on one of the servers, configure your build as you wish, then save the profile. I would also recommend running the build to make sure that it works properly before you deploy it.</p>
<p>2) Go into <strong>/var/cpanel/easy/apache/profile</strong> and look for a file called <strong>_last_success.yaml</strong>. This will be the one you just saved, unless you updated a template that was already named, or you know for a fact that it&#8217;s named something else. Rename this template to something you would recognize, like latest.yaml. Edit the yaml file and change these fields:</p>
<blockquote><p>name: Shared server build<br />
note: &#8220;Default build for all shared servers&#8221;</p></blockquote>
<p>The name and note will identify the build in your EasyApache interface.</p>
<p>3) Move this script to the &#8216;custom&#8217; folder (<strong>/var/cpanel/easy/apache/profile/custom</strong>)</p>
<p>From here, what I recommend doing is uploading the build template to a repository so it can be easily &#8220;grabbed&#8221;. That way each time you update the build, you would update the template in the repository and automate the command that downloads it and builds Apache.  Since I named my yaml file latest.yaml, this is the command I&#8217;d run via cron on all my servers:</p>
<blockquote><p>wget -O /var/cpanel/easy/apache/custom/latest.yaml http://repo.mydomain.com/ea/latest.yaml &amp;&amp; /scripts/easyapache &#8211;profile=latest.yaml &#8211;build</p></blockquote>
<p>The following command builds the profile automtically:</p>
<blockquote><p>/scripts/easyapache &#8211;profile=latest.yaml &#8211;build</p></blockquote>
<p>The <strong>latest.yaml</strong> file is the file name of the template I&#8217;m using, and <strong>&#8211;build</strong> indicates that the build should be started immediately instead of loading the EA configuration screen.</p>
<p>Here are a couple other options you might want to pass to /scripts/easyapache:</p>
<ul>
<li>&#8211;do_not_revert_on_conf_failure : Use if you want to fix httpd.conf problems manually after the build. NOT recommended for automated EA updates</li>
<li>&#8211;skip-cpanel-version-check: Use if you don&#8217;t run automated cPanel updates and don&#8217;t want EasyApache to prompt for an update</li>
<li>&#8211;always_do_the_latest_phps : Always use the latest PHP version, keeping in mind that &#8220;latest version&#8221; refers to the latest version available in EA</li>
<li>&#8211;always_do_the_oldest_phps : Always use the oldest PHP version available in EA</li>
</ul>
<p>You may also want to consider using hooks to automate post-build tests, and report any issues that may arise. Hooks are events/commands that run before or after a specific action. You can read more about hooks below:</p>
<p><a href="http://etwiki.cpanel.net/twiki/bin/view/EasyApache3/EasyApacheHooks" target="_blank">http://etwiki.cpanel.net/twiki/bin/view/EasyApache3/EasyApacheHooks</a></p>
<p><map name='google_ad_map_416_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/416?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_416_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=416&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fautomating-apache-php-updates%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=416&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/cpanel-installing-mod_python-apache-2/' rel='bookmark' title='cPanel: Installing Mod_Python on Apache 2'>cPanel: Installing Mod_Python on Apache 2</a></li>
<li><a href='http://www.thecpaneladmin.com/configuring-pureftp/' rel='bookmark' title='Command Line PureFTP Configuration on cPanel'>Command Line PureFTP Configuration on cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/cpanel-updates-redhat-9-break-stuff/' rel='bookmark' title='cPanel Updates on Redhat 9 Can Break Stuff'>cPanel Updates on Redhat 9 Can Break Stuff</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/automating-apache-php-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

