CWP Basics Archives - CloudMinister

How to install and configure Linux Malware Detect (LMD) on Centos Web Panel(CWP) 7 with alert?

Linux Malware Detect(LMD) is a malware detector and scanner for Linux, designed for shared hosting environments. LMD is released under GNU GPLV2 license, it can be installed on cPanel, WHM and Linux environments with together other detection tools such as ClamAV. 

CWP doesn’t provide LMD service in it’s free version, it asks to take CWP pro for LMD service. You can install it from the terminal and scan for malware present in your server.



Terminal access

Root user (If not use sudo)


Install Linux Malware Detect (LMD)

Linux Malware Detect is not available in CentOS or Epel repository, you need to install it manually from source, by using the following command:

First go inside tmp directory,

# cd /tmp

Now download and extract it from the source with the help of wget command:

# wget

# tar -xzvf maldetect-current.tar.gz

After downloaded go inside the maldetect directory and run the install script with the following command:

# cd maldetect-*

# ./

Now make a symlink of the maldet command in the /bin/maldet

# ln -s /usr/local/maldetect/maldet /bin/maldet

# hash -r

Configure Linux Malware Detect (LMD)

LMD has been installed into the /usr/local/maldet/ directory. Open the directory and edit the configuration file conf.maldet with vi editor:

# cd /usr/local/maldetect/

# vi conf.maldet

In this file, edit the following lines to enable various feature and alerts
Enable email alert by changing the value to 1 :

Type your email address :

We will use the ClamAV clamscan binary as default scan engine because it provides a high-performance scan on large file sets. Change value to 1:
Next, enable quarantining to move malware to the quarantine automatically during the scan process. Chang value to 1:
Change value to 1, to enable clean based malware injections.

Save and exit, you can also change other values based on your requirement.

Testing Linux Malware Detect(LMD)

For testing LMD manual scan with the maldet command, you will use the maldet command to scan the web directory ‘/var/www/html’.
Download some malware file with the help of following commands in web root directory:
# cd /var/www/html
# wget
# wget

Next, scan the web root directory with the maldet command:

# maldet -a /var/www/html

Check the scan report with the following command:

# maldet –report 18882——-*

Other LMD Command

To ensure Maldet is up-to-date, run the command below:

# maldet -u

You can see the details of the option available by running the following command:

# maldet -h

Perform a scan for specific file extension only:

# maldet -a /var/www/html*.php

Get a list of all reports:

# maldet -e list

Restore files from the quarantine directory.

# maldet -s SCANID

Enable monitoring of a directory.
# maldet -m /var/www/html


The above configuration will show how to configure Linux Malware Detect in CWP and scan for malware data in your server.

How to install a free SSL certificate on domain via CWP panel?

Secure Domain Name with help of Let’s Encrypt in CWP, it provides an SSL certificate for 3 months and after we can easily update the SSL certificate for free with Let’s Encrypt in CWP.  This blog helps you to implement an SSL certificate on domains in CWP panel.


Secure Socket Layer

It is a protocol used for transmitting private documents via the internet,  it uses a cryptographic system that uses two keys to encrypt data: a public key known to everyone and a private or secret key known only to the recipient of the message.


1. CWP installed on centos(VPS)

2. Domain Name

Configure SSL

Firstly open the CWP on the browser with the help of the following URL:

https://domain_name:2038 and click on accept the risk and go ahead.

Now give credentials of the root user.

After this dashboard will be open and search for webServer settings in the left pane.

Select SSL Certificate option and after then select Auto SSL [Free] option.

Now select the appropriate User and Domain-based on your requirement.

After then click on Install SSL, apart from installing new you can also install manually or from the server.

After the domain attach successfully you can go test it with the various SSL checker

Now check your domain by typing in browser URL i.e

Redirect Traffic

You can also redirect traffic of HTTP to HTTPS by putting the following text in the domain_name.conf file and in CWP it is found under cd /usr/local/apache/conf.d/vhosts

Here found your conf file open it with vi editor and write the following code.

Redirect Permanent / https://domain_name.

CONCLUSION: After the above configuration, you will be able to use Free SSL certificate and also renew it from CWP.

How to configure hostname SSL with Let’s Encrypt in CWP?

Let’s Encrypt provides Free SSL certificate with the help of this you can secure your hostname easily.

Configure Hostname

Before configure SSL check the hostname and set it with the following command.

# hostname

You can also change the hostname from the CWP panel that is found under server settings, open it and give the hostname then save changes.

Also remember to create entry of particular hosts in the domain registrar with the A record and resolve it with IP_address.

Name            Type             TTL            Target 

Host_name          A            300            IP_address

Configure Letsencrypt SSL

To configure SSL certificate open CWP panel and search SSL certificates under WebServer settings and open it.

Now click on Install from server option and select certificate: hostname.cert and User: user_name after then click on install.

You can also test it with the help test button in the certificate panel.

These certificate files are used for cwp ports like:

Admin panel – (2030,2086-no SSL),(2031,2087-with SSL)

user panel – (2082-no SSL),(2083-with SSL)

Roundcube- (2095-no SSL),(2096-with SSL) 

CONCLUSION- From the above configuration, you will be able to configure the CWP admin panel and other services along with the certificate.



WordPress is one of the most popular and widely used content management systems, blogging platforms in the world. It is popularly used as a Blog, Portfolio Website,  etc.
In this tutorial, you are going to learn how to install WordPress with LEMP (Linux, Nginx, MySQL and PHP)  on CentOS 7 VPS.


Table of Content


1)  Prerequisites

2) Install MySQL 5.7

3) Configure Database in MySQL

4) Install & Configure PHP 7.2

5) Install Nginx

6) Configure Firewall

7) Configure Nginx File

8) Install WordPress File

9) Test WordPress

1) Prerequisites –

Before you start the installation of WordPress with (LEMP) stack on Centos 7 VPS, you must have one Centos 7 VPS with root privileges on it or you can use sudo for non-root user.

 You should also run basis command on server to check the following things-:

(i) # df -h  (To check the disk space on the system)

(ii) # cat /etc/os-release  (To verify the version of the VPS)


(iii) # yum -y update  (To update all the packages of the VPS)


2) Install MySQL 5.7 –

WordPress uses a MySQL database for storage, MySQL is used in stack for storing user details in database.

 For installing MySQL on Centos 7 first you need to enable MySQL repository and then you can install MySQL.

# yum localinstall -y

The command used for installing MySQL in CentOS 7 VPS is as follows:

# yum install mysql-server -y

 Then check the MySQL version by typing following command:

 # mysql -V(‘V’ is in uppercase)

 After the installation is completed MySQL will start automatically and you can check it’s status by typing:

# systemctl status mysqld

 If MySQL is not start automatically you can write the following command:

 # systemctl start mysqld

 Before going for the next step you should generate a temporary password to access MySQL root user with the following command:

 # grep ‘temporary password’ /var/log/mysqld.log

Now configure the MySQL secure installation to improve the security by typing the following commands.

# mysql_secure_installation

 Login with the temporary password and assign new password, after that in this configuration it ask several questions you can give Y or N according to your requirement.

i) Change the password for root ? N

ii) Remove anonymous users? Y

iii) Disallow root login remotely? Y

iv) Remove test database and access to it? Y

v)  Reload privilege tables now? Y

3) Configure Database in MySQL –

Now create database for WordPress in MySQL for that first login with MySQL server by using the following command:

 # mysql -u root -p

 And give its password, after that create database in it with the command:

mysql> CREATE DATABASE wordpress;

You can also check that database is created or not with the command:


 Now create user and assign him password by using command:

mysql> CREATE USER ‘wordpress’@’localhost’ IDENTIFIED 

 BY ‘Password’;

 After that grant all privileges to the user created under that database with the command:

 mysql> GRANT ALL ON  wordpress.* TO ‘wordpress’@’localhost’;   

 Then flush all privileges on MySQL server with the command:


 Now exit from the MySQL server you can use commands:

  mysql> exit;

  mysql> q;

Note-: In MySQL you must end each command with a semicolon(;).

 4) Install & Configure PHP 7.2 –

 PHP is used by WordPress to do various functions done by PHP like calling plugin, calling theme, validating user permissions, checking option, grab from database, etc.

In this Blog we are using PHP 7.2 versionand install it with epel-release with remi repository.

 Firstly, install yum-utils packages using the following command:

# yum -y install yum-utils

 After that, install epel-release package by using command:

# yum -y install epel-release

 Then import remi repository from the command:

 # yum -y install remi-release-7.rpm

Enable the remi repository by typing:

# yum-config-manager –enable remi-php72 

 After that install PHP and all required modules by using command:

 # yum -y install php-fpm php-mysql php-mbstring php-xml      php-gd php-cli php-json php-opcache php-curl

Now after the installation completed you can check the PHP version with the command:

# php -v (‘v’ is in smallcase)


5) Install Nginx

Nginx, pronounced as “Engine X” and is a very fast and lightweight web server, that can be used to support static files, used as a reverse proxy and also for load balancing. It is one of the best Linux VPS Server as compared to Apache. It can handle higher load of HTTP request.

Firstly, update all the software packages by typing the following command:

# yum -y update

After that install EPEL repository that is required for Nginx packages by using command:

# yum -y install epel-release 

Now install  Nginx by typing the command:

 # yum -y install nginx

After the installation is completed you must Enable and Start Nginx server by typing command:

# systemctl start nginx

And enable it with the command:

# systemctl enable nginx

Also check its status with

# systemctl status nginx

6) Configure Firewall

After completed with installation part, configure the firewall settings with the following command:

Open HTTP port by typing command with:

# firewall-cmd –permanent –zone=public –add-service=http

If firewall package is not available then you can install it with command

 # yum -y install firewalld

And start firewalld service with command:

 # systemctl start firewalld

Now reload firewall configuration file by typing:

 # firewall-cmd –reload

Now verify your installation of Nginx by visiting the following URL on any browser you like with http://ip_address

7) Configure Nginx File

An Nginx server configuration file plays an important role, So you should be more careful when setting up this file.

For configuring Nginx file go inside the following path with the following command:

# cd /etc/nginx/conf.d

# vi default.conf

And write the following code in the above file i.e. default.conf.

Also change your domain in place of   ip_address   

server {

        listen       80;


root /usr/share/nginx/html/wordpress;

        index index.php index.html index.htm;

location / {

          try_files $uri $uri/ =404;


       error_page 404 /404.html;

            location = /40x.html {

        root /usr/share/nginx/html/wordpress;


        error_page 500 502 503 504 /50x.html;

            location = /50x.html {

        root /usr/share/nginx/html/wordpress;


        location ~* .php$ {

        try_files $uri =404;

        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;

        fastcgi_index index.php;

        include fastcgi_params;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;



And save it with :wq command, after that edit the configuration file of php-fpm with the following command:

 # vi /etc/php-fpm.d/www.conf

Open the file with above command and edit the following lines i.e.

user = nginx

group = nginx

Add new listen under listen  =

listen = /var/run/php-fpm/php-fpm.sock

And also add

listen.owner = nginx = nginx

Remove comment (;) from the above two lines and save it with :wq.

8) Install WordPress File

You can easily download WordPress archive file from the link I provided in this blog.
First go inside /tmp directory by typing below command:

# cd /tmp

Download the latest WordPress setup by using wget command

# wget

And if wget command not work then you can download it with the following command

# yum -y install wget

Now extract the downloaded file using below command:

# tar xzvf latest.tar.gz

After that move wordpress directory in /var/www/html directory by using command:

# mv wordpress /usr/share/nginx/html

Also change the ownership of /var/www/html directory by using the following command

# sudo chown -R nginx: /usr/share/nginx/html

# chmod -R 755 /usr/share/nginx/html


9) Test WordPress

Now for testing the server of WordPress you should restart the server for that follow the command:

# nginx -t

(If the command shows ‘successfully’ message then the changes in file are correct and else the changes are wrong in the nginx configuration file.)

# systemctl restart php-fpm

# systemctl restart nginx

Then open any browser and type inside URL i.e http://ip_address/

After then configuration page i.e. http://ip_address/wp-admin/ is open and select language.

How to install WordPress with LEMP stack on CentOS 7 VPS.

CONCLUSION– After this installation, you will be able to create or manage blog in WordPress CMS.

In this we will tell you how to apply NAT setting in CWP panel

NAT is short for Network Address Translation

Why the NAT is important?

NAT is a very important aspect of firewall security. It conserves the number of public addresses used within an organisation, and it allows for stricter control of access to resources on both sides of the firewall

Like in AWS there is public and private network, so nating is enabled by default

Prerequisites: – Centos 7, user with root privileges

Step 1:- Login in CWP panel.

How to apply NAT setting in cwp panel

Step 2:- Go to CWP setting and click on Edit setting.

How to apply NAT setting in cwp panel

Step 3:- Scroll down and click on activate NAT-ed network configuration.

How to apply NAT setting in cwp panel

Step 4:- Click on save changes.

How to apply NAT setting in cwp panel

Step 5:- Go to dashboard and restart CWP services and apace service.

 How to apply NAT setting in cwp panel

Conclusion: Finally you will learn to apply NAT setting on CWP panel.

CWP is a World Leading advanced Free and PRO web hosting panel that gives you all the flexibility to effectively and efficiently manage your server and clients.

Step 1:- First login on CWP panel.

How to change Host name in CWP Panel

Step 2:- Click on server setting and choose change host name option.

How to change Host name in CWP Panel

Step 3:- In the left hand side show your old host name and write new host name.

How to change Host name in CWP Panel

Step 4:- Click on change host name option.

How to change Host name in CWP Panel

Conclusion : Finally you can easily change host name in CWP panel.

CWP is a World Leading advanced Free and PRO web hosting panel that gives you all the flexibility to effectively and efficiently manage your server and clients.

1. Login in the Linux vps hosting cwp panel with root user credentials.


2. In the left hand side navigation bar choose the php setting.







3. First check your php version choose PHP info option.


4. Choose PHP version switcher  option and select your php version



5. Click save & rebuild option and wait some minutes to new PHP version
6. You can check logs of php installation using “tail -f /var/log/php-rebuild.log”

Note:- if you want use multi php in Linux VPS Server on CWP panel you require pro version


Conclusion:- In this blog you learn how to change the PHP settings in Linux server management service on CWP panel.

CentOS Web Panel

 A Free Web Hosting control panel designed for quick and easy management of Linux Dedicated & Linux VPS Server offers a huge number of options and features for remote server management services in its control panel package.


Please follow this link to see the CWP feature.


Installation CWP steps

Pre Requirements

– CWP supports static IP addresses. We do not support dynamic, sticky, or internal IP addresses.

– CWP does not provide an uninstaller. After you install CWP, you must reinstall the Linux VPS server to remove it.

– Only install CWP on a freshly installed operating system without any configuration changes.

System Requirement 

1. Setup Hostname

     # hostnamectl set-hostname

2. Setup Server IP addresses

    -Setup fix ip to cwp server

3. Hardware Requirement
-32 bit operating systems require a minimum of 512 MB RAM
-64 bit operating systems require a minimum of 1024 MB RAM (recommended)
-Recommended System: 4 GB+ RAM so you would have the full functionality such as Anti-virus scan of emails.

4. Preparing server install some require packages like:-
# yum -y install wget vim
# yum -y update

5. Download cwp script file

     # wget

6. Run cwp script

    # sh cwp-el7-latest

How to install centos web panel on CentOS 7

Note: wait for 5 to 10 min to complete the script and after copy all cwp details

7. After installation set root password to login in cwp panel using

     # passwd root

8. Open cwp panel in the browser using https://SERVER_IP:2031

How to install centos web panel on centos 7


you can manage your all domain & website using remote server management in cwp panel with all security features.

Get started with CloudMinister Today