Saturday 27 December 2014

DNS clustering is part of setting up a server environment. cPanel has built-in support for DNS clustering to make it easy to deploy centralized nameservers, or have multiple nameservers receive DNS zone updates from one server. This article will help you understand setting up and managing a DNS cluster from command line.

cPanel Command Line DNS and Cluster Management

Setting up a Cluster

From the remote nameserver:

You generally don't need to do anything other than enable clustering in WHM. You want the client servers to sync TO this server, not from it. Most of the time, the remote server will be your primary nameserver running cPanel DNSONLY.

From the client:

There are a few files involved in setting up a DNS cluster. Keep in mind that novice users may prefer to use WHM  > Configure Cluster, but this article is focused on the command line.

⚫ /var/cpanel/cluster/root/config/xxx.xxx.xxx.xxx : The file (named after the IP of the remote nameserver) containing the user, hostname, and remote hash

⚫ /var/cpanel/cluster/root/config/xxx.xxx.xxx.xxx-dnsrole : The file containing the sync action to the remote nameserver (standalone or sync)

⚫ /etc/wwwacct.conf : File containing the delegated nameservers for new zones created

⚫ /var/cpanel/resellers-nameservers : list of nameservers for resellers (overrides /etc/wwwacct.conf for zones created by accounts for that reseller)

⚫ /var/cpanel/useclusteringdns : Blank file indicating that DNS clustering is enabled (presence of file indicates yes, absence indicates no)
If the server is also going to be a nameserver itself, you will need to enable named in WHM > Service Manager (/etc/chkserv.d/chkservd.conf, set named to '1').

1)  Create a file in /var/cpanel/cluster/root/config as the IP of the remote server. Get the remote access hash for the remote nameserver (/root/.accesshash, located on the remote server) and add it to the file under the cluster user (assuming 'root') and its hostname. In this case, the remote server's IP is 6.7.8.9, so I'm going to create a file called /var/cpanel/cluster/root/config/6.7.8.9 and have it contain:

root
ns1.mynameserver.com
1429r23c1fdec38012a574be14382fd5
14f24bc86f86af9273575677c53aff83
4dc0d2d24cc8b1a7fe275acdb18e8ae8
71298146e796566a0a9fa0ea92644f11
aeceeb5f6eb489f2bb477b783a5a97c0
b24644193bb58b682c28113aa1e0e79f
59b190962fca3fcb2efb13d58d103374
3b68072ffe65a2a58cfa285fa69edeae
aff9e1922e0664acb86698c2c2884191
6cd9bd139252ec83833d07337117b898
ac071d28446cae6531e4dbeebdbe1aa2
511a689a4e2b24c7880a113694618920
a690f5b6bca11863fbc0d5b0d9a0a110
2b75426ca67984898afb71fc86c3ad75
c4a435525fc0f393ec317adbcbf4b99a
ce4b64d04c2f23766ecfb1ca4c9d09ac
36f66070c2ed55362338a1d26315c37a
91af3d1723149727d2e1756233340a57
4d1432bbfa61356b8a4b656abe817cb5
80d40d86c23cc3f4f86e74766c6d1cd6
66d2a4f89773beb02e6f856c9ae13e29
ca3e12219298e51d92f7ee9e7c645b27
dc70e2c151be6d4949d38379f6897d84
1fa9afec98cd6965300a058d77fd792b
5f47b6b791c8739ac4a18064a4420455
cc4bdf1ccf0e91d30fa7fa23b0efd168
2546f63b55f385bab0910711476ddc3e
8ec406c3e388a5639d1f71fd3f47ae8f
b2ebc449921c906602963ed802ca20e1

*Keep in mind that if you're a user other than root, you'd substitute 'root' in the path name for the actual user setting up the cluster.

All of this can also be done via WHM > Configure Cluster as well.

Managing DNS Zones

Synchronize a zone:

You generally want to synchronize a zone if changes were made and you want to push it out to your nameserver cluster. This is essentially the same as going into WHM > Synchronize DNS Records:

/scripts/dnscluster

Running this command by itself will give you a list of options for synchronizing, just as you get in WHM:

⚫ syncall : sync all zones with all cluster servers. This will find the zone with the largest serial and copy it to all nameservers in the cluster

⚫ syncalllocal : Finds the zone in the cluster with the highest serial number and copies it to the local server only (instead of to all servers in the cluster) – /scripts/dnscluster syncalllocal –full

⚫ synczone : Syncs one zone to all servers in the cluster, using the zone with the highest serial number throughout the cluster

⚫ synczonelocal – Syncs one zone locally, using the zone with the highest serial number throughout the cluster
So for instance, if you have a zone for mydomain.com on your hosting server and you want to synchronize it to all the nameservers in your cluster, you'd run:

/scripts/dnscluster synczone domain.com

Edit a DNS Zone:

To edit a zone, open /var/named/domainname.com.db in a text editor and make your changes. Remember to increment the serial number up by one, so that the correct zone it sync'ed to the nameserver cluster. The serial looks like this:

; cPanel 11.24.4-STABLE_36281
; Zone file for domainnmame.com
$TTL 14400
@      86400 IN      SOA     ns.mynameserver.com. me.mynameserver.com. (
2009082500 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds
Then use /scripts/dnscluster to copy the zone up to your nameserver cluster. (see above examples)

Removing a DNS zone:

/scripts/killdns domainname.com

Adding a DNS zone:

/scripts/adddns –domain domainname.com

You can also use the  –ip and –reseller flags to indicate what IP and nameservers to use. For usage, just run /scripts/adddns and the help will display.

Friday 15 August 2014

cPanel Conference 2014 is less than two months away and it is already shaping up to be our best conference yet. After last year’s exciting detour in New Orleans, we’re thrilled to be back home in Houston, Texas and we’re injecting our vibrant city’s flavor into this year’s experience.

Hands On Houston: cPanel Conference 2014

If you’ve attended a previous cPanel Conference, you already know the reasons why you shouldn’t miss this event, but if you’ve never attended, here are just a few reasons why you should make the trip to Houston September 29 – October 1.

Exclusive Sessions


This is your chance to hear, firsthand, from the geniuses that develop cPanel & WHM as well as the team that leads them. From the always popular “What’s New with cPanel & WHM” to business development sessions, three tracks will provide in-depth content that you can’t find anywhere else.

Unbeatable Networking Opportunities


You’ll get a chance to meet almost every member of the cPanel team, along with hundreds of developers and executives from some of cPanel’s top integrators and partners. If you have a question that you want to ask about our product, this is your chance to do it in person.

Not only will you be able to meet and mingle with web hosting industry leaders, you’ll also receive the opportunity to be selected for a private dinner with cPanel’s CEO, Nick Koston. How cool is that?

Everything is Planned for You


There will be more than enough to keep you busy during the day and we’ll even make sure that you don’t have to worry about what to do at night. We want you to enjoy our beautiful city and we’ve planned three amazing events that will allow you to do just that. Whether you’re listening to a Beastie Boys cover band in Houston’s oldest concert venue or playing old-school video games downtown, we’ve got you covered from sun up to sun down.

Mad Science


OK, so it’s not really science, but we’re bringing back cPanel Labs again this year. When sessions aren’t enough, cPanel experts will be on hand to give you a more hands-on approach to learning everything you could ever want to know about how to use or market cPanel for your business.

Get Certified


With on-site cPanel University testing, cPanel Conference is the perfect time to gauge your cPanel & WHM skills and a convenient venue for you and your staff to become cPanel-certified.

Tuesday 17 June 2014

A wildcard ssl basically allows you to use unlimited subdomains on a given domain name with one SSL certificate. A user will need to purchase a wildcard SSL from a vendor that supplies them.

Similar to having multiple certificates installed on a server, each subdomain containing the certificate needs its own IP as well. Wildcard SSL’s do not work like Wildcard DNS – you really do have to specifically install the certificate on each subdomain. Here are two methods to setting up Wildcard certificates for a domain.

Installing A Wildcard SSL Certificate

Multiple Accounts

In this scenario, you’d have each subdomain hosted as a separate cPanel account, and each of those cPanel accounts will have its own IP address.

➠ Generate the Certificate Signing Request (CSR) in WHM, using *.domain.com
➠ How to assign each account its own IP address

Go to WHM > Change site’s IP Address , select the account, then select the IP

Via Command Line:

/usr/local/cpanel/bin/setsiteip -u $user $ip

Manually:

(This is also useful for changing the IP address of a single domain in an account, without affecting other domains on that account)

1) Edit /var/named/domain.com.db, change the domain’s A records, increment the serial number, and sync the zone out. For help in changing DNS, see this post.  To sync a zone:

/scripts/dnscluster synczone $domain

Obviously, you do this on whatever server acts as a nameserver for the domain in question.

2) Replace instances of the old IP with the new IP in /var/cpanel/userdata and /var/cpanel/users

replace 123.123.123.123 222.222.222.222 — /var/cpanel/userdata/user/*

replace 123.123.123.123 222.222.222.222 — /var/cpanel/users/user

3) If the new IP is shared, remove the user’s main domain entry from /etc/domainips. If it’s a dedicated IP, add/change the IP in /etc/domainips and /etc/ssldomains (if the site has an SSL)

4) Run /scripts/rebuildhttpconf and /scripts/rebuildippool, and restart Apache

➠ When you’re obtained the certificate,go to WHM > Install a SSL Certificate and Setup the Domain and paste in the CRT and CA Bundle for *.domain.com
➠ The fields should auto-populate, in which case you need to make sure the IP is correct, then change the SSL hostname from *.domain.com to the target subdomain
➠ Click install to install the certificate

One Account

This method may be best for users that are not resellers or that are on shared hosting servers, where having multiple cpanel accounts may not be ideal. In this case, you’d have one cPanel account and assign multiple IPs to its subdomains.

➠ Generate the Certificate Signing Request (CSR) in WHM, using *.domain.co
➠ How to assign dedicated IPs to multiple subdomains on the same account

1. Edit /var/cpanel/userdata/$user/$subdomain.$maindomain for each subdomain (for addon domains you’ll usually edit the file for the subdomain associated with the addondomain) and change the ip value to a ‘dedicated’ ip.

2. Delete the associated .cache file for the file you just edited

3. Run /scripts/rebuildhttpdconf

4. Edit the dns zone for the subdomain (which will likely be attached to the parent domain) and update the a-record to point to that IP as well. Then syncronize the zone out to the DNS cluster, if one exists:

/scripts/dnscluster synczone <parentdomain>

5. Edit /etc/domainips and add an entry for that sudomain to point to the IP and run /scripts/rebuildippool to make sure the IP is marked as taken.

➠ When you’re obtained the certificate,go to WHM > Install a SSL Certificate and Setup the Domain and paste in the CRT and CA Bundle for *.domain.com
➠ The fields should auto-populate, in which case you need to make sure the IP is correct, then change the SSL hostname from *.domain.com to the target subdomain
➠ Click install to install the certificate

Friday 23 May 2014

How to Choose an eCommerce Platform  – Comparison of Prestashop, AgoraCart and TomatoCart

How to Choose an eCommerce Platform

When you are deciding on an ecommerce platform there are several things you need to consider. For a start it should have the features that you need – inventory control, the right payment methods, and the right shipping options. If you do not have a lot of technical skills (or money to hire them) you will need a platform that is easy to set up. And regardless of your technical capabilities you will need a platform that is easy for your team to use. So to help you make your decision easier, here is a comparison of three of the top ecommerce platforms: Prestashop vs Agoracart vs TomatoCart. 

These names sound like some weird ancient Roman gladiatorial food fight where slightly drunk combatants enter a pit to throw vegetables and baked goods at each other until they can’t take it anymore. But the reality is that all three of these ecommerce platforms are powerful solutions for online stores.

1. Prestashop 


Of the three platforms Prestashop is the biggest with over 3.5 million downloads. The main reasons for its popularity are:

There are a lot of features included in the basic set
The basic setup – and therefore all of those features – is free
It is easy to set up, learn and use
It is easily expanded with modules

Let's go through each one of these in a bit more detail. First, the features included in the basic Prestashop set up are impressive. Calling it a basic set up does not do it justice because of this. In fact the majority of users will need nothing more than the free Prestashop software.

To start with you can have as many or as few products and categories as you want. This means Prestashop works on big ecommerce sites and on sites with just a handful of products. You choose how to display your products and you can implement handy marketing tools like cross-selling and product comparisons. Stock management is also easy with Prestashop.

This is all free but if you need specific functionality you can purchase add-on modules. Here is an example: Prestashop has a cool and time saving feature that allows you to export your products to Ebay with a few clicks. It comes as standard but you might also want to export your products to Amazon or Google. That is possible providing you buy an additional module.

Finally Prestashop is easy to use. You do not even need web development experience in order to get up and running. Plus managing it and showing your team how to use it is straightforward.

2. AgoraCart 


AgoraCart is another powerful and popular ecommerce platform that is packed full of features and functionality. This includes unlimited products, unlimited categories, customizable design and a variety of payment options as standard. And just like Prestashop it is free.

There is one main difference which some people will regard as a positive while others will see as a negative. It is possible to extensively customize AgoraCart in order to make your shop look exactly the way you want it to and perform the way you want it to. This is ideal for developers. But the downside is AgoraCart is a bit harder to set up than Prestashop and it is not as user friendly. You gain in flexibility but you lose in ease of use.

There are shop templates designed to overcome this and get you set up quickly but Prestashop does this better. AgoraCart, on the other hand, is one to consider if you plan to get into the code.

3. TomatoCart


TomatoCart is another free ecommerce platform. And just like Prestashop and AgoraCart it also comes packed with loads of features as standard. It has unlimited categories and can handle all sort of items including downloads and other virtual products. It is also easily customizable and comes with several payment methods and shipping options. And it is easy to use so on first look it appears just as good as Prestashop and Agoracart.

But this only applies if you are happy with the standard features. If you want more you might encounter a problem because there is a downside with TomatoCart – it has fewer add-on modules available than some of its rivals. This is not a problem for the majority of users but it is a limiting factor for others.

So the summary is Prestashop is the best all-round ecommerce platform available. Some people complain about the cost of some of the modules but that is fair given how much is included for free. AgoraCart and TomatoCart are also good which is why they are also popular. But Prestashop remains a couple of steps ahead.

Facebook

Popular Posts

Blog Archive

Total Pageviews