网普科技
网普管理员
网普科技人民公仆
积分 3080
发贴 2863
注册 2004-6-26 来自 网普科技
状态 离线
|
#1 Setting up Private Nameservers in Cpanel
This guide will show you the ropes in how to setup cpanel nameservers and configure them properly so you can run ns1 and ns2.yoursite.com. Once your nameservers are setup clients can then use your own private nameservers for their domains.
1. Regiser your domain
Register the domain name you would like to use, you can register a domain here if you need one.This domain will be used as your nameservers - eg ns1.yourdomain.com and ns2.yourdomain.com
2. Additional IPs
Have 2 available IP addresses for your server that aren't in use.You will need to contact you provider to obtain these IP addreses.
3. Registering the Nameservers
Now login to your domain management page for the domain you registered and register ns1.newdomain.com and ns2.newdomain.com as nameservers (registries normally have a special facility for doing that). The registry may also have a facility to propogate these nameservers around the foreign registries - if so, you should use this facility.
These registrations may take a few days to propagate (often as many as 3 days).
4. Reverse DNS
You may also need to get your data centre to enter a reverse DNS pointer for your nameservers. You'll need to let them know each nameserver and its IP address. Sometimes you can suffer non-delivery of mail if you don't so this. Reverse DNS pointers can take a while to propagate.
Setup a reverse on the IP address for your domain
5. Broken NDC/BIND
My version of WHM/CPanel came with a broken NDC. To fix this:
SSH into your box as root.
(a) Type: cd /scripts
(b) Type: ./updatenow
(c) Type: ./fixndc
Go back into WHM, go to the Restart Services section in the left menu and click DNS/Nameserver (BIND).
You will need to do this if you start getting 'ndc' errors when you are doing anything DNS related in WHM.
6. Setup Nameservers In WHM
Go into WHM (Web Host Manager) and select Edit Setup from the Server Setup menu on the left. Enter ns1.newdomain.com in the Primary Nameserver field. Hit 'Assign IP Address', then hit 'Add an A Entry for this nameserver'.
Repeat this process for the Secondary Nameserver field.
7. Tidy Up Junk Nameservers
Go into WHM (Web Host Manager) and select Manage Nameserver IPs from the Server Setup menu on the left. Remove any nameservers you don't recognise. This is just a tidy up exercise in case anyone's set anything up on the box before you.
8. Initial Nameserver Setup
Go into WHM (Web Host Manager) and select Initial NameServer Setup from the Server Setup menu on the left. Run this.
9. Restart BIND
Restart BIND (step 7 restarts BIND, but we've known it to need a proper stop and start for it to work) from SSH with:
service named stop
service named start
10. Manual Checks
I don't know what it is about this process, but it doesn't always work, so there are some things you can check manually via SSH.
/etc/wwwacct.conf
Check that the nameservers are correctly specified on NS, NS2 etc.
EG: scroll to the name servers section.....
NS ns1.yournameserver.com
NS2 ns2.yournameserver.com
/etc/resolv.conf
Check that there are nameserver entries for each IP. There may also be one for 127.0.0.1 - this is okay. I'm led to believe (by the 'man' entry for resolv.conf) that this isn't a particularly important file, but I changed mine to read:
domain mybox.com
search mybox.com
nameserver 127.0.0.1
nameserver 111.111.111.111
nameserver 222.222.222.222
Where 'mybox.com' is the main domain of my server, and '111.111.111.111' and '222.222.222.222' are the IP addresses of my primary and secondary nameservers.
resolv.conf is used to lookup names that are not in FQDN format.
/etc/nameserverips
Check that there are entries for each IP acting as a nameserver.
EG:
IPHERE=ns1.yournameserver.com
IPHERE=ns2.yournameserver.com
|
天理路上甚宽,稍游心,胸中便觉广大宏朗;
人欲路上甚窄,才寄迹,眼前俱是荆棘泥涂。
网普科技,优质美国主机服务!
美国Linux主机,美国虚拟主机
支持PHP+MYSQL+cPanel+EMAIL
为用户负责,拒绝反动、赌博及色情内容! QQ:126818
发送QQ消息 |
|
2004-10-13 12:22 PM |
|
网普科技
网普管理员
网普科技人民公仆
积分 3080
发贴 2863
注册 2004-6-26 来自 网普科技
状态 离线
|
#2 Another article
dnsstuff.com checkdns.net dnsreport.com dnscheck.com
A Beginner's Guide to Name Servers Part-1 (Setting up nameservers in WHM/Cpanel)
Setting up nameservers in WHM/Cpanel
1. Log into WHM
2. Goto Server Setup =>> Edit Setup
Make sure your primary IP is correct under Main Shared Virtual Host IP
Make sure your Hostname is correct under Hostname (server1.xyz.com)
Under Primary Nameserver enter your primary nameserver (ns1.xyz.com), click on Assign Ip Address, then click on Add A entry
for this nameserver
Under Secondary Nameserver enter your secondary nameserver (ns2.xyz.com), click on Assign Ip Address, then click on Add A
entry for this nameserver
Note: You can add a third and fourth name server if you wish, however this is not necessary. All name servers will be
automatically assigned to any accounts you setup later. You will have to manually disable extra nameservers from each
account.
Scroll to the bottom and click Save.
Goto DNS Functions =>> Edit a DNS Zone
Choose the primary domain for the server and click Edit
The beginning of your Zone File should look something like this:
-------------------------------------------
; Zone File for ip-2-ip.net
$TTL 14400
@ 14440 IN SOA ns1.xyz.com. admin.xyz.com
-------------------------------------------
In SOA add your primary ns (ns1.xyz.com.) and contact email (admin.xyz.com.). Put a period at the end of your nameserver, and
use a period in place of @ in your contact email and add a period at the end too.)
In most cases you should have the following Record Types:
-------------------------------------------
xyz.com. 14440 IN NS ns1.xyz.com.
xyz.com. 14440 IN NS ns2.xyz.com.
xyz.com. 14440 IN A 123.123.123.12 (primary IP Address)
localhost.xyz.com. 14440 IN A 127.0.0.1
xyz.com. 14440 IN MX 0 xyz.com.
mail 14440 IN CNAME xyz.com.
www 14440 IN CNAME xyz.com.
ftp 14440 IN A 123.123.123.13
ns1 14440 IN A 123.123.123.12
ns2 14440 IN A 123.123.123.13
server1 14440 IN A 123.123.123.12 (primary IP Address)
-------------------------------------------
If you do not have A records for your Nameservers add them now. If you use Managed DNS for your domain name, also add A
records to your domain name with your DNS.
If you made changes to your zone file, scroll down to the bottom and click on Save
Goto DNS Functions =>> Perform a DNS Cleanup
Now log out of WHM and SSH to your server and login as root.
Note: You can download Putty by Clicking Here. It's a clean running application that will not require installation on
Windows-boxes.
Once logged in...
At command prompt type: pico /etc/nameserverips
Make sure all of your nameservers are listed
123.123.123.12=ns1.xyz.com
123.123.123.13=ns2.xyz.com
123.123.123.14=0
123.123.123.15=0
123.123.123.16=0
Remove any nameservers that do not belong.
If you make changes to the file, then press the following keys on your keyboard Ctrl o and then Enter to save the file, then
Ctrl x to exit.
At command prompt type: pico /etc/resolv.conf
There should only be three records in the resolv.conf file... localhost, primary nameserver, secondary nameserver.
nameserver 127.0.0.1
nameserver 123.123.123.12
nameserver 123.123.123.13
Remove anything else and then save and exit.
At the prompt type: pico /etc/wwwacct.conf
Make sure all of the information is correct. Remove anything that does not belong, save, then exit.
ADDR 123.123.123.12
CONTACTEMAIL admin@xyz.com
CONTACTPAGER
DEFMOD x
ETHDEV
FTPTYPE proftpd
HOMEDIR /home
HOMEMATCH home
HOST server1.xyz.com
LOGSTYLE combined
MINUID
NS ns1.xyz.com
NS2 ns2.xyz.com
ns3
SCRIPTALIAS y
ns4
At the prompt type: pico /etc/named.conf
Scroll down to the bottom of the file to the zone records.
-------------------------------------------
zone "xyz.com" {
type master;
file "/var/named/xyz.com.db";
};
-------------------------------------------
Make sure all domain zone records are correct. Remove any zone records that are old or do not belong there. If you make any
changes, save and then exit.
At the prompt type: pico /etc/host.conf[B]
This file should look like this:
[B]order hosts,bind
At the prompt type: pico /etc/host
This file should look like this:
-------------------------------------------
# Do not remove the following line, or various programs
# that require network functionality will fail.
123.123.123.12 server1.xyz.com server1
127.0.0.1 localhost
-------------------------------------------
Now your done and your nameservers will work like a pro.
|
天理路上甚宽,稍游心,胸中便觉广大宏朗;
人欲路上甚窄,才寄迹,眼前俱是荆棘泥涂。
网普科技,优质美国主机服务!
美国Linux主机,美国虚拟主机
支持PHP+MYSQL+cPanel+EMAIL
为用户负责,拒绝反动、赌博及色情内容! QQ:126818
发送QQ消息 |
|
2004-10-22 10:29 AM |
|
茱莉娅
THE BODY SHOP美容顾问
茱莉娅美体小铺
积分 3080
发贴 2863
注册 2009-5-21
来自 茱莉娅美体小铺
状态 离线
|
|
2004-10-22 10:29 AM |
|
|