WHM/cPanel – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Tue, 07 Jun 2022 03:20:53 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 How to Install Redis on cPanel https://tecadmin.net/install-redis-cpanel/ https://tecadmin.net/install-redis-cpanel/#comments Wed, 21 Mar 2018 15:45:01 +0000 https://tecadmin.net/?p=15521 Redis is an in-memory data structure store, used as database server, cache and message broker. It also provides PHP module for communication between PHP script with Redis server. This guide will help you for the installation of Redis server and binding with PHP using Redis PHP extensions on a cPanel server. Step 1 – Prerequisites [...]

The post How to Install Redis on cPanel appeared first on TecAdmin.

]]>
Redis is an in-memory data structure store, used as database server, cache and message broker. It also provides PHP module for communication between PHP script with Redis server.

This guide will help you for the installation of Redis server and binding with PHP using Redis PHP extensions on a cPanel server.

Step 1 – Prerequisites

In order to use this tutorial, you must have root shell access of your WHM/cPanel server. Login to your server shell access using root account.

ssh root@remote.cpanel

Redis packages are not available under default yum repositories. You need to enable EPEL yum repository on your server first. Execute below command to enable:

### CentOS/RHEL 7 
yum install epel-release

### CentOS/RHEL 6 
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Step 2 – Install Redis Server

Now, You can use yum package manage to install Redis server packages by executing below command

yum install redis

After successfully installation start Redis service and enable to auto-start on system reboot.

### CentOS/RHEL 7 
systemctl enable redis
systemctl start redis

### CentOS/RHEL 6 
chkconfig redis on
service redis restart

Redis server is up and running on your system. Go to next step to enable Redis PHP extension on your cPanel server.

Step 3 – Install Redis PHP extension

In this step there are two option available based in the EasyApache version on your cPanel server. Follow one of below step:

cPanel with EasyApache 4

You can install Redis PHP extension for all installed PHP version on your system or install for the active version only. We recommend to install for all versions.

PHP 5.6

/opt/cpanel/ea-php56/root/usr/bin/pecl install igbinary igbinary-devel redis 
/opt/cpanel/ea-php56/root/usr/bin/php -m | grep redis

PHP 7.0

/opt/cpanel/ea-php70/root/usr/bin/pecl install igbinary igbinary-devel redis 
/opt/cpanel/ea-php70/root/usr/bin/php -m | grep redis

PHP 7.1

/opt/cpanel/ea-php71/root/usr/bin/pecl install igbinary igbinary-devel redis 
/opt/cpanel/ea-php71/root/usr/bin/php -m | grep redis

cPanel with EasyApache 3

If the cPanel is still running with EasyApache 3, Execute below commands to install Redis PHP extension on your system. Also check Redis module is enabled for PHP.

pecl install igbinary igbinary-devel redis
php -m | grep redis

All done. Redis has been installed on your system along with the PHP extension.

The post How to Install Redis on cPanel appeared first on TecAdmin.

]]>
https://tecadmin.net/install-redis-cpanel/feed/ 6
How to Install cPanel & WHM on CentOS/RHEL and CloudLinux https://tecadmin.net/install-cpanel-on-linux/ https://tecadmin.net/install-cpanel-on-linux/#comments Thu, 28 May 2015 12:58:38 +0000 https://tecadmin.net/?p=7872 WHM/cPanel is the most popular web hosting control panel for Linux operating systems. Using WHM/cPanel we can easily manage our web hosting environment without having more technical skills. If you have basic knowledge of hosting with networking you can manage any web hosting server using WHM/cPanel. WHM/cPanel is basically divided into two parts WHM and [...]

The post How to Install cPanel & WHM on CentOS/RHEL and CloudLinux appeared first on TecAdmin.

]]>
WHM/cPanel is the most popular web hosting control panel for Linux operating systems. Using WHM/cPanel we can easily manage our web hosting environment without having more technical skills. If you have basic knowledge of hosting with networking you can manage any web hosting server using WHM/cPanel.

WHM/cPanel is basically divided into two parts WHM and cPanel. WHM section is used for managing your system, hosting accounts and maintenance of system where cPanel is known as single hosting account. This article will help you to install cPanel and WHM on CentOS/RHEL and CloudLinux operating systems.

1. Minimum System Requirements

Before installing cPanel and WHM on your system make sure to fulfill following requirements

  • Minimum of 1GB RAM
  • 20 GB Harddisk
  • Perl must be installed
  • CentOS 7/6/5 or RHEL 6/5 or CloudLinux 6/5

For more details visit WHM/cPanel system requirements url.

2. Setup Proper Hostname

Before installing WHM/cPanel on your system, make sure to set a proper fully qualified hostname for your system.

# hostname  webhost.example.com

Now edit /etc/sysconfig/network to set hostname permanently and update hostname entry like below

HOSTNAME=webhost.example.com

Now edit /etc/hosts to point hostname to local system ip. For example local system ip is 192.168.1.100, Do the following entry in /etc/hosts file.

192.168.1.100 webhost.example.com

3. Disable SELinux

Now make sure to disable selinux on your system before starting cPanel and WHM installation. To disable selinux execute following command.

# setenforce 0

Now edit /etc/sysconfig/selinux and update following entry for disabling SELinux permanently.

SELINUX=disabled

4. Install WHM/cPanel

Your installation preparation has been completed for WHM/cPanel. Now execute one by one following commands to install WHM/cPanel on your system.

# cd /home
# curl -o latest -L http://httpupdate.cpanel.net/latest
# sh latest

Installation processes will take more time (Approx 1 hour or more) as per your network speed and operating system speed. After completing installation your will get output like below.

2015-05-28 12:23:48  183 ( INFO): cPanel install finished in 66 minutes and 9 seconds!
2015-05-28 12:23:48  684 ( INFO): Congratulations! Your installation of cPanel & WHM 11.48 is now complete. The next step is to configure your server.
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087.
2015-05-28 12:23:48  684 ( INFO): On RHEL, CentOS, and CloudLinux systems, execute /scripts/configure_firewall_for_cpanel to accomplish this.
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server.
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): 1. Open your preferred browser
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): 2. Type https://192.168.1.100:2087 in the address bar
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): 3. Enter the word root in the Username text box
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): 4. Enter your root password in the Password text box
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): 5. Click the Login button
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): Visit http://go.cpanel.net/whminit for more information about first-time configuration of your server.
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): Visit http://support.cpanel.net or http://go.cpanel.net/whmfaq for additional support
2015-05-28 12:23:48  684 ( INFO):
2015-05-28 12:23:48  684 ( INFO): Thank you for installing cPanel & WHM 11.48!

5. Post Installation of cPanel & WHM

After completing WHM/cPanel installation on your system successfully you can access WHM on 2086 & 2087(with ssl) and cPanel accounts on 2082 & 2083(with ssl) ports. Now login to your WHM account and completed post installation instructions ans per your required configuration. You can access WHM using root account and their password at following urls.

https://webhost.exmaple.com:2087/

Login with your root account credentials and complete following six steps.

  • Accept Linux Agreement
  • Setup networking
  • Set Up IP Addresses
  • Select nameserver (default is bind)
  • Setup additional services like FTP, Mail
  • Enable or Disable disk quota

cpanel-installation-on-linux

6. Activate cPanel & WHM License

As the WHM/cPanel is available with commercial license, So you need to purchase a license (based on ip) from cPanel or its third-party sites.
When you purchased a commercial license for your cPanel server activate is using following command.

# /usr/local/cpanel/cpkeyclt

To verify your license visit cPanel license verification url and enter public ip your server.

The post How to Install cPanel & WHM on CentOS/RHEL and CloudLinux appeared first on TecAdmin.

]]>
https://tecadmin.net/install-cpanel-on-linux/feed/ 2
The login is invalid – WHM/cPanel https://tecadmin.net/the-login-is-invalid-whm-cpanel/ https://tecadmin.net/the-login-is-invalid-whm-cpanel/#respond Wed, 29 Apr 2015 17:00:48 +0000 https://tecadmin.net/?p=7709 Today I have installed new WHM/cPanel server on an AWS instance. Generally AWS servers are used key based login for ssh users and users don’t have root password. So I have manually reset root password through command line. After installation of cPanel when I tried to login to WHM using web browser I got The [...]

The post The login is invalid – WHM/cPanel appeared first on TecAdmin.

]]>
Today I have installed new WHM/cPanel server on an AWS instance. Generally AWS servers are used key based login for ssh users and users don’t have root password. So I have manually reset root password through command line. After installation of cPanel when I tried to login to WHM using web browser I got The login is invalid error even I was using correct login user and password. I tried the same thing by changing root password 3-4 times but still facing same issue.

Error: The login is invalid

whm-invalid-login

After that I google about this issue and found few solutions in which below solution work for me.

Solution:

This issue is creating due to my IP address was blocked by cphulkd. So I have added my ip to white list using following command. Make sure to change 11.22.33.44 with your actual public ip. To find your public ip visit here.

root@cpanel [~]# /scripts/cphulkdwhitelist 11.22.33.44 

11.22.33.44 has been whitelisted

After that I was able to login successfully using root account in WHM panel.

The post The login is invalid – WHM/cPanel appeared first on TecAdmin.

]]>
https://tecadmin.net/the-login-is-invalid-whm-cpanel/feed/ 0
List of Ports to Open for WHM & cPanel Server ? https://tecadmin.net/ports-to-open-for-whm-cpanel/ https://tecadmin.net/ports-to-open-for-whm-cpanel/#respond Mon, 09 Mar 2015 12:50:07 +0000 https://tecadmin.net/?p=7388 Generally WHM & cPanel servers are used for shared hosting environment where security is most important. So for best security practices, we should always block all unnecessary ports in firewall for unauthorized access. In this article you will find all ports used by WHM & cPanel server, so you can open correct ports in your [...]

The post List of Ports to Open for WHM & cPanel Server ? appeared first on TecAdmin.

]]>
Generally WHM & cPanel servers are used for shared hosting environment where security is most important. So for best security practices, we should always block all unnecessary ports in firewall for unauthorized access. In this article you will find all ports used by WHM & cPanel server, so you can open correct ports in your firewall.

Ports to Open for WHM & cPanel Server

Below is the list of all ports we need to Open for WHM & cPanel server in firewall. Open port for TCP or TCP/UDP protocols as per given below.

==================================================================================
PORT            PROTOCOL        SERVICE ON PORT
==================================================================================
20		TCP/UDP		FTP data
21		TCP/UDP		FTP command
22		TCP/UDP		SSH (Secure Shell)
25		TCP		SMTP (Simple Mail Transfer Protocol)
53		TCP/UDP		DNS (Domain Name System)
80		TCP/UDP		HTTP (Hypertext Transfer Protocol)
110		TCP		POP3 (Post Office Protocol v3)
143		TCP		IMAP (Internet Message Access Protocol)
443		TCP		HTTPS (Hypertext Transfer Protocol over SSL/TLS)
465		TCP		SMTP over SSL
993		TCP		IMAPS (Internet Message Access Protocol over SSL)
995		TCP		POP3S (Post Office Protocol 3 over TLS/SSL)
2077		TCP		Webdisk (cPanel Specific)
2078		TCP		Webdisk with SSL (cPanel Specific)
2082		TCP		CPanel default (cPanel Specific)
2083		TCP		CPanel default SSL (cPanel Specific)
2086		TCP		WHM (cPanel Specific)
2087		TCP		WHM with SSL (cPanel Specific)
2095		TCP		CPanel Web mail	(cPanel Specific)
2096		TCP		CPanel Web mail with SSL (cPanel Specific)
==================================================================================

The post List of Ports to Open for WHM & cPanel Server ? appeared first on TecAdmin.

]]>
https://tecadmin.net/ports-to-open-for-whm-cpanel/feed/ 0
Adding Custom Settings in Apache Virtual Host in cPanel https://tecadmin.net/add-custom-settings-in-whm-cpanel-apache-virtualhost/ https://tecadmin.net/add-custom-settings-in-whm-cpanel-apache-virtualhost/#comments Tue, 14 Oct 2014 10:57:40 +0000 https://tecadmin.net/?p=6100 While using WHM/cPanel, We can not make any changes directly in the Apache configuration file. This file is automatically created by cPanel templates and re-created on system reboot or WHM update. Any custom changes will be lost during the recreation of the Apache configuration file. But If we want to add our own custom configuration [...]

The post Adding Custom Settings in Apache Virtual Host in cPanel appeared first on TecAdmin.

]]>
While using WHM/cPanel, We can not make any changes directly in the Apache configuration file. This file is automatically created by cPanel templates and re-created on system reboot or WHM update. Any custom changes will be lost during the recreation of the Apache configuration file.

But If we want to add our own custom configuration in the Apache configuration of any website VirtualHost, We can do it by creating a configuration file at /usr/local/apache/conf/userdata/std/2_2/<username>/<sitename.com>/extra.conf.

In other versions, this location may change. So to find this location, check the website VirtualHost in the main configuration file, at the end of VirtualHost you will get a location like below

# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/ssl/2_2/myuser/mydomain.com/*.conf"

Adding Custom Settings in Apache cPanel

Now use the following commands to create a directory structure and configuration file. Change myuser with your actual cPanel username and change mydomain.com with actual domain name for which you want to add custom settings.

mkdir -p /usr/local/apache/conf/userdata/ssl/2_2/myuser/mydomain.com/ 
cd /usr/local/apache/conf/userdata/ssl/2_2/myuser/mydomain.com/ 

Now create configuration file with any name but with .conf extension

vim extra.conf 

Put your custom settings in extra.conf file and execute the following command from the shell. This command will uncomment the “Include “/usr/local/apache/conf/userdata/ssl/2_2/myuser/mydomain.com/*.conf” line in the VirtualHost of the main Apache configuration file.

/scripts/ensure_vhost_includes --all-users 

And all done. In this way, you will not lose any custom changes for your VirtualHost.

The post Adding Custom Settings in Apache Virtual Host in cPanel appeared first on TecAdmin.

]]>
https://tecadmin.net/add-custom-settings-in-whm-cpanel-apache-virtualhost/feed/ 2
How to Install XCache PHP Module in cPanel https://tecadmin.net/install-xcache-php-module-cpanel/ https://tecadmin.net/install-xcache-php-module-cpanel/#respond Wed, 23 Apr 2014 09:15:22 +0000 https://tecadmin.net/?p=4884 XCache is a fast, stable PHP opcode cacher. This relatively new opcode caching software has been developed by mOo. XCache optimizes performance caching the compiled state of PHP scripts into the RAM and uses the compiled version straight from the RAM. This may increase php execution 1-5 times faster than default installation. Read more about [...]

The post How to Install XCache PHP Module in cPanel appeared first on TecAdmin.

]]>
XCache is a fast, stable PHP opcode cacher. This relatively new opcode caching software has been developed by mOo. XCache optimizes performance caching the compiled state of PHP scripts into the RAM and uses the compiled version straight from the RAM. This may increase php execution 1-5 times faster than default installation. Read more about XCache.

Step 1: Install XCache PHP Module in cPanel

To install module in cPanel server, you must have root access using. Access your server using putty or other alternatives of putty with root user and run following command.

# /scripts/phpextensionmgr install xcache

[Sample Output on Finishing compilation]

...
...
Build complete.
Don't forget to run 'make test'.

Got ret value 0 from system( make )
Will now run system( make,install )
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20100525/
...
...
Got ret value 0 from system( make,clean )
Xcache extension activated

Step 2: Verify XCache PHP Module

As you have successfully installed and activated xcache php module in cPanel system. Let’s verify the xcache installation using following command.

# php -v 

PHP 5.4.22 (cli) (built: Dec 14 2013 03:20:46)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with XCache v3.0.3, Copyright (c) 2005-2013, by mOo
    with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd.
    with XCache Cacher v3.0.3, Copyright (c) 2005-2013, by mOo

Alternatively you can create an info.php on your server website document root using following text and access from web browser

<?php
  phpinfo();
?>

xcache-in-cpanel

The post How to Install XCache PHP Module in cPanel appeared first on TecAdmin.

]]>
https://tecadmin.net/install-xcache-php-module-cpanel/feed/ 0
How to Install Services SSL Certificates in WHM & cPanel https://tecadmin.net/install-services-ssl-certificates-in-whm-cpanel/ https://tecadmin.net/install-services-ssl-certificates-in-whm-cpanel/#comments Fri, 24 Jan 2014 12:40:16 +0000 https://tecadmin.net/?p=4033 This article is used helpful for installing SSL certificate signed by CA for our WHM services. By default all services used self signed certificate in WHM/cPanel and we always get an warning while using any secured service like WHM/cPanel access, webmail access etc. Using this article we will install trusted ssl certificate in our WHM/cPanel [...]

The post How to Install Services SSL Certificates in WHM & cPanel appeared first on TecAdmin.

]]>
This article is used helpful for installing SSL certificate signed by CA for our WHM services. By default all services used self signed certificate in WHM/cPanel and we always get an warning while using any secured service like WHM/cPanel access, webmail access etc.

Using this article we will install trusted ssl certificate in our WHM/cPanel server. Follow the below steps to do it.

Step 1: Check System Hostname

Check your current system hostname to generate csr by going to following location

      Home » Networking Setup » Change Hostname

whm-ssl-certificate-step-hostname

Or we can use linux command to find systems hostname

# hostname

server1.tecadmin.net

Step 2: Generate CSR (Certificate Signing Request )

In the next step we need to generate CSR with the hostname of our system found in step 1. Lets navigate to following location in WHM

      Home » SSL/TLS » Generate an SSL Certificate and Signing Request

whm-ssl-certificate-step-1

File all details for your CSR and click on Create button. This will generated self-signed certificate, the private key and the certificate signing request like below.

whm-ssl-certificate-step-2

Step 3: Install Certificate in WHM

Use certificate signing request created in step 2 and purchase a trusted certificate from any certificate authority like

When you recieve a valid certificate. Navigate to following location in your WHM to complete SSL installation.

      Home » Service Configuration » Manage Service SSL Certificates

Select all services to whome you need to install certificate, and paste the certificate in Certificate section and click Autofill by Certificate like below screenshot.

whm-ssl-certificate-step-4

WHM will automatically search for private key and Certificate Authority Bundle and show in boxes as above. Now click on Install button.
After finishing installation it will prompt for restart cPanel service, so just click on Proceed button.

whm-ssl-certificate-step-5

Step 4: Verify SSL Setup

At this stage you have successfully install a trusted ssl certificate in your WHM panel. To verify it navigate to below location and click on Certificate Details link in each service and view the details.

      Home » Service Configuration » Manage Service SSL Certificates

whm-ssl-certificate-step-6

Also you can try to access your WHM/cPanel using https like below urls

  • WHM: https://HOSTNAME:2087
  • cPanel: https://HOSTNAME:2083

The post How to Install Services SSL Certificates in WHM & cPanel appeared first on TecAdmin.

]]>
https://tecadmin.net/install-services-ssl-certificates-in-whm-cpanel/feed/ 1
How to Install ionCube Loader in cPanel https://tecadmin.net/install-ioncube-loaders-in-cpanel-server/ https://tecadmin.net/install-ioncube-loaders-in-cpanel-server/#comments Sun, 22 Dec 2013 08:43:21 +0000 https://tecadmin.net/?p=3576 IonCube are used as encryption/decryption utility for PHP applications by which we can keep safe our data. It also can restrict PHP application to execute unauthorized. It also assists in speeding up the pages that are served. IonCube loaders are used for decoding encoded files while running on a web server. read more details on [...]

The post How to Install ionCube Loader in cPanel appeared first on TecAdmin.

]]>
IonCube are used as encryption/decryption utility for PHP applications by which we can keep safe our data. It also can restrict PHP application to execute unauthorized. It also assists in speeding up the pages that are served. IonCube loaders are used for decoding encoded files while running on a web server. read more details on official site.

This tutorial will help you to install IonCube Loaders in cPanel server without recompiling Apache/PHP on cPanel server. If you are not running cPanel server, read article Install IonCube Loader in CentOS/RHEL (non cPanel Server).

Install IonCube Loaders in cPanel

To install ioncube first connect to your server using root access using ssh client (e.g. Putty ) and execute following command.

# /scripts/phpextensionmgr install IonCubeLoader

This script will install the ionCube loader and do all required settings. below is the sample output of above command

Updating md5sum list
Fetching http://httpupdate.cpanel.net/cpanelsync/easy/targz.yaml (connected:0).......(request attempt 1/12)...Using dns cache file /root/.HttpRequest/httpupdate.cpanel.net......searching for mirrors (mirror search attempt 1/3)......loaded mirror speeds from cache......mirror search success......connecting to 91.121.124.18...@91.121.124.18......connected......receiving...100%......request success......Done
Installing IonCubeLoader
Determining PHP version
Installing IonCube Loader binaries
Activating IonCube Loader extension in /usr/local/lib/php.ini
IonCube Loader extension activated

Verify IonCube Loader

After installing ionCube Loader, You can verify it by the Linux command line using below command

php -v

Sample Output
PHP 5.4.24 (cli) (built: Jan 26 2014 21:51:18)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd.

Or we can also create a small PHP script (info.php) in your web server document root using the following content and access on the webpage.

<?php
    phpinfo();
?>

Now access created PHP script in a web browser and you will find that the ionCube loader is enabled in your PHP install.

ioncube-in-cpanel

The post How to Install ionCube Loader in cPanel appeared first on TecAdmin.

]]> https://tecadmin.net/install-ioncube-loaders-in-cpanel-server/feed/ 1