웹사이트 검색

Centos 6을 실행하는 가상 서버에 cPanel을 설치하는 방법


상태: 더 이상 사용되지 않음

이 문서에서는 더 이상 지원되지 않는 CentOS 버전에 대해 설명합니다. 현재 CentOS 6을 실행하는 서버를 운영 중인 경우 지원되는 CentOS 버전으로 업그레이드하거나 마이그레이션하는 것이 좋습니다.

이유:

대신 참조:

cPanel 정보

cPanel은 사용자가 기존 명령줄 대신 GUI 인터페이스를 통해 서버를 관리할 수 있는 편리한 응용 프로그램입니다. cPanel 설치는 비교적 간단하지만 스크립트를 실행하는 데 몇 시간이 걸립니다.

노트

  • Once cPanel is installed, it cannot be removed from the server without a complete server restore. cPanel does not offer an uninstaller
  • Additionally, cPanel is subject to a licensing fee which may come out to be around $200 a year. DigitalOcean does not cover the cost of cPanel. You can find out more about cPanel pricing here

Setup

Before installing cPanel on our droplet, we need to take two additional steps.

First we need to make sure that Perl is installed on the server

sudo yum install perl

After installing perl we need to take one more preliminary step. cPanel is very picky about making sure that server that it is installed on has a Fully Qualified Domain Name. To that effect, we need to provide it with a valid hostname. Skipping this step will inevitably get you the following, very common, error.

2012-11-01 16:00:54  461 (ERROR): Your hostname () is not set properly. Please
2012-11-01 16:00:54  462 (ERROR): change your hostname to a fully qualified domain name,
2012-11-01 16:00:54  463 (ERROR): and re-run this installer.

Luckily this error has a very easy solution. If you have a FQDN, you can type it in with the command:

hostname your FQDN

Otherwise, if you want to proceed with the cPanel installation but do still lack the hostname, you can input a temporary one. Once cPanel is installed, you will be able to change the hostname to the correct one on one of the first setup pages.

hostname  host.example.com

Install cPanel

Although the cPanel installation only has several steps, the installation does take a long time. Although using program "screen" is not necessary in order to install cPanel, it can be a very helpful addition to the installation process. It can be especially useful if you know that you may have issues with intermittent internet or that you will need to pause the lengthy install process.

To start off, go ahead and install screen and wget:

sudo yum install screen wget

Once screen is installed, start a new session running:

screen

After opening screen, you can proceed to install cPanel with WHM or a DNS only version of cPanel.

  • Use this this command to install cPanel with WHM:
    wget -N http://httpupdate.cPanel.net/latest
  • Use this command to install the DNS only version of cPanel:
    wget -N http://httpupdate.cPanel.net/latest-dnsonly

요청된 패키지가 다운로드되면 스크립트 실행을 시작할 수 있습니다.

sh latest

그런 다음 화면을 닫습니다. 완료하는 데 1~2시간이 걸릴 수 있는 스크립트는 서버를 종료하더라도 백그라운드에서 계속 실행됩니다.

화면 유형을 분리하려면: Cntrl-a-d

화면에 다시 연결하려면 다음 명령을 사용할 수 있습니다.

screen -r

cPanel이 최종 설치되면 IP 주소:2087(예: 12.34.45.678:2087l) 또는 도메인(example.com:2087)으로 이동하여 로그인에 액세스할 수 있습니다.

귀하의 로그인은 다음과 같습니다.

username: your_server_user
password: your_password

여기에서 cpanel 사용자를 만들고 마지막으로 ipaddress/cpanel 또는 domain/cpanel에 로그인할 수 있습니다.