Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install WHMCS on CentOS 7

Rumi, May 25, 2020May 25, 2020

As you may know, WHMCS is the leading web hosting management and billing software that automates all aspects of your business from billing, provisioning, domain reselling and etc. In this article, we are going to install WHMCS 7.7.1 on CentOS 7.6.

We assume you have a valid WHMCS license and have downloaded its package from WHMCS download area.

Here are our environment OS and software versions:

  • OS: Centos 7.6 on VMware
  • WHMCS: 7.7.1
  • PHP: 7.2
  • Database: Mariadb 10.3
  • Web server: httpd 2.4

Here we start from a fresh minimal CentOS 7.6 installation.

1- Initial CentOS setup
Set correct time and date. here we use “Asia/Dhaka”:

# timedatectl set-timezone America/New_York

Change default root password:

# passwd

Set SELinux to permissive mode by editing /etc/selinux/config:

# vim /etc/selinux/config
SELINUX=permissive

Also to apply it immediately run:

# setenforce 0

Install EPEL repository:

# yum install epel-release

Update OS:

# yum update

2- Install PHP 7 and Apache
Install remi repository for PHP 7 installation:

# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Install yum-utils:

# yum install yum-utils

Enable remi repository:

# yum-config-manager --enable remi-php72

then install PHP 7:

# yum install php php-mbstring php-pear php72-php-pdo.x86_64 php-pdo.x86_64 php-mysql.x86_64 php-ioncube-loader.x86_64 php-curl curl php-soap.x86_64 php72-php-soap.x86_64 php-gd.x86_64 php72-php-gd.x86_64

Edit php.ini and set options like the following:

# vim /etc/php.ini
date.timezone = "Asia/Dhaka"
memory_limit = 1024M
extension=pdo.so
extension=pdo_mysql.so

Install apache and start it:

# yum install httpd
# systemctl enable httpd
# systemctl start httpd

3- Install Mariadb 10.3 and setup database
Install MariaDb. refere to Database replication with mariadb on centos 7 linux.

Login to mariadb and create required user and database:

# mysql –u root –p
# CREATE USER 'your user'@'localhost' IDENTIFIED BY 'your password';
# GRANT ALL PRIVILEGES ON *.* TO 'your user'@'localhost';
# Create database 'your database name';

4- Install WHMCS 7.7.1
Extract whmcs installation files to /var/www/html and change owner of files to apache:

chown -r apache:apache /var/www/html/*

Create new configuration.php file and change permission to 777:

# mv /var/www/html/configuration.php.new /var/www/html/configuration.php
# chmod 777 /var/www/html/configuration.php

In Google Chrome or Firefox navigate to your server IP address and install WHMCS. follow the instruction and filll required fiels. after installation, delete install folder from /var/www/html/

# rm -rf /var/www/html/install/

To improve security, move downloads, template_c and attachments directory from /var/www/html/ to /var/www/ :

# mv /var/www/html/attachments/ /var/www/attachments/
# mv /var/www/html/downloads/ /var/www/downloads/
# mv /var/www/html/templates_c/ /var/www/templates_c/

Change owner and permission of above directory:

# chmod 777 /var/www/attachments/ /var/www/downloads/ /var/www/templates_c/
# chown apache:apache /var/www/attachments/ /var/www/downloads/ /var/www/templates_c/

add the following lines to /var/www/html/configuration.php

$mysql_charset = "utf8";
$display_errors="off";
$templates_compiledir = "/var/www/templates_c/";
$attachments_dir = "/var/www/attachments/";
$downloads_dir = "/var/www/downloads/";

add the following line to /etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
*/5 * * * * root /usr/bin/php -q /var/www/html/crons/cron.php

change /var/www/html/configuration permission to 600:

chmod 600 /var/www/html/configuration

Src: https://www.tuxtips.net/how-to-install-whmcs-7-7-1-on-centos-7-linux/
Administrations Configurations (Linux) CentOSCentOS 7WHMCS

Post navigation

Previous post
Next post

Comment

  1. Pingback: Upgrading PHP 7.2 to 7.4 for WHMCS on CentOS 7 | Bots!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes