Problem installing cpanel/whm via putty

Executivehost

Member
Aug 12, 2012
9
0
1
cPanel Access Level
Website Owner
I recently transferred to a nice new KVM VPS. I am starting off with a trial license of Cpanel/WHM. Well I first installed it but didn't realize my main IP on my vps was the wrong one. My vps has 3 ip's but only one of them was eligable for the trial. The first time I installed it, it all went smooth. Now that I am trying to install it to the new IP on my cpanel account I'm having troubles. I get through a bit of it and then I get this:

2012-08-12 20:04:12 260 (FATAL): yum failed 6 times. Cannot continue!
Removing /root/installer.lock


Any idea how to get passed this?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Can you provide the following:

Code:
cat /etc/hosts
cat /etc/resolv.conf
Also, please run yum update to see what happens:

Code:
yum update
 

Executivehost

Member
Aug 12, 2012
9
0
1
cPanel Access Level
Website Owner
[root@109 home]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6


[root@109 home]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 8.8.8.8
nameserver 8.8.4.4
search 163.229.30.reserved.domain.com
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Have you not setup the hostname for the machine? /etc/hosts typically has your hostname in it.

Code:
hostname -f
If you don't have a hostname set, cPanel won't install.

Also, did you run the yum command?
 

Executivehost

Member
Aug 12, 2012
9
0
1
cPanel Access Level
Website Owner
I have it setup on my cpanel, but damn that is my problem, It says unknown host. I may have entered it wrong during registration on cpanel ? And yes I did.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
If cPanel isn't installed, you'd have to set it in command line. If cPanel is installed, simply log into WHM and select "Change Hostname" to set up the hostname there.

In command line, you'd do:

Code:
hostname server.domain.com
Where server.domain.com is the hostname you are setting.

After that, log out and back into the machine. If /etc/hosts isn't populated with the new information, edit it to put the IP number and hostname at the bottom as:

Code:
IP#  server.domain.com server
This represents IP# where it is your main IP, server.domain.com for the full hostname and server for the first part of the hostname.

Also, check if /etc/sysconfig/network file has the hostname listed.
 

Executivehost

Member
Aug 12, 2012
9
0
1
cPanel Access Level
Website Owner
[root@ro home]# 109.163.229.30 ro.domain.net
-bash: 109.163.229.30: command not found
[root@ro home]# /etc/sysconfig/network file
-bash: /etc/sysconfig/network: Permission denied

:S Not sure whats going on, It must be recognizing my hostname now though as its now root@ro instead of root@the ip
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
[root@ro home]# 109.163.229.30 ro.domain.net
-bash: 109.163.229.30: command not found
[root@ro home]# /etc/sysconfig/network file
-bash: /etc/sysconfig/network: Permission denied

:S Not sure whats going on, It must be recognizing my hostname now though as its now root@ro instead of root@the ip
Those are not actual commands. The first command you intended to run should be:

Code:
# vi /etc/hosts
This allows you to edit the file and make sure the entry that Tristan listed is there. The second command should be:

Code:
# cat /etc/sysconfig/network
The "cat" command allows you to view the file.

Thank you.
 

Executivehost

Member
Aug 12, 2012
9
0
1
cPanel Access Level
Website Owner
I ran some commands for yum, then tried installing cpanel again. All went good, I got to the very last lines, I forget what it said now :S but it was just staying on them. Then my laptop died -.- It's still not loading though so I dont know what happend :(
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Do you have a firewall on the machine?

Code:
/sbin/iptables -n -L
You likely have the cPanel, WHM and webmail ports blocked in the firewall. You'd either need to add the right ports or else take down / flush the firewall. Here's a list of the ports needed for cPanel to function:

Getting the most out of your system's firewall. | cPanel, Inc.

Of note, when you install cPanel, I'd advise next time to do it in screen. screen lets you get back into a server when when your SSH session dies and resume watching whatever occurred.

You can also see if the install completed by looking at the end of /var/log/cpanel-install.log:

Code:
tail -50 /var/log/cpanel-install.log
Thanks!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Nope, it should work right off. Open up a ticket. It's a lot easier than trying to diagnose here, especially when you aren't familiar with SSH commands due to just learning the system. You can submit a ticket using the link in my signature.
 

Executivehost

Member
Aug 12, 2012
9
0
1
cPanel Access Level
Website Owner
I am having this exact problem again. I edited the /etc/hosts file and my hostname is set now. My provider can even see its set. I am just coming back to this server so I have to re-install everything. Anyways I did that and I get the same error as before.

Was going to open a ticket but I cant run the command to get my support id because cpanel wont install.