Microweber is a free and open-source drag & drop CMS website builder written in the PHP programming language and the Laravel 5 framework. With Microweber, you can easily create content and manage multiple displays. Microweber offers an integrated online store feature that allows you to sell your products online. Microweber offers features such as Live Edit, Online Shop, Statistics, Templates, Drag & Drop, WYSIWYG HTML Editor, and many more.

In this tutorial, we explain how to install Microweber with the LEMP stack on a CentOS server.

Requirements

  • A server with the CentOS 8 distribution.
  • A non-root user with sudo rights.

First steps

Before you start, you need to update your system to the latest version. You can do this by running the following command:

sudo yum update

Once your system is updated, reboot the system to apply the changes.

Install LEMP server

First, you need to install the Nginx web server, MariaDB server, PHP, and other PHP modules on your system. You can install them all by running the following command:

sudo yum install nginx mariadb-server php php-fpm php-common php-mbstring php-xmlrpc php-soap php-mysql php-gd php-xml php-cli php-zip unzip wget -y

Once all the packages are installed, you need to edit the php.ini file and make some changes, such as the memory limit, maximum file size when uploading, maximum execution time, and time zone:

sudo vim /etc/php.ini

Make the following changes:

memory_limit = 256M
upload_max_filesize = 150M
max_execution_time = 360
date.timezone = Europe/Berlin

Save and close the file.

Next, start the Nginx and MariaDB services and activate them with the following command so that they are started at boot time:

sudo systemctl restart nginx mariadb php-fpm
sudo systemctl enable nginx mariadb php-fpm

Configure MariaDB

MariaDB is not backed up by default. You must therefore back it up first. You can back it up with the following command:

sudo mysql_secure_installation

This command sets a root password, removes the anonymous user, disallows remote root login, removes the test database, and reloads the permissions, as shown below:

Enter current password for root (enter for none): ENTER
Set root password? [Y/n]: N
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]:  Y
Reload privilege tables now? [Y/n]:  Y

Once MariaDB is secured, log into the MariaDB shell:

mysql -u root -p

Enter your root password. Then create a database and a user for Microweber (replace theword “password” with your own secure password):

MariaDB [(none)]> CREATE DATABASE microweberdb;
MariaDB [(none)]> CREATE USER 'microweber'@'localhost' IDENTIFIED BY 'password';

Again, replace the word “password” with your own secure password. Next, grant the user microweber all rights with the following command:

MariaDB [(none)]> GRANT ALL ON microweberdb.* TO 'microweber'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

Delete the permissions and exit the MariaDB shell:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Install Microweber

First, download the latest version of Microweber from the official website to the /tmp directory using the following command:

cd /tmp
wget https://microweber.com/download.php -O microweber-latest.zip

Once the download is complete, unzip the downloaded file with the following command:

sudo mkdir /var/www/html/microweber
sudo unzip microweber-latest.zip -d /var/www/microweber

Next, give the Microweber directory the correct permissions with the following command:

sudo chown -R nginx:nginx /var/www/microweber/
sudo chmod -R 755 /var/www/microweber/

Run sudo vim /etc/php-fpm.d/www.conf and set the user and group to nginx. Initially, they are set to the user and group apache.

sudo vim /etc/php-fpm.d/www.conf
# user = nginx
# group = nginx

Restart the PHP-FPM service.

sudo systemctl restart php-fpm.service

Configure Nginx for Microweber

Next, you need to create a virtual Nginx server file for Microweber. You can create it with the following command:

sudo vim /etc/nginx/conf.d/microweber.conf

Add the following lines:

server {

  listen 80;
  server_name example.com;

  root /var/www/microweber;
  index index.php;

  client_max_body_size 100M;

  location / {
    try_files $uri $uri/ /index.php$is_args$args;
  }

  location ~ .php$ {
    try_files $uri =404;
    include fastcgi_params;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}

Replace example.com in the above configuration with your own domain name. Save and close the file.

Finally, restart the Nginx web service to apply all changes:

sudo systemctl restart nginx

You can also check the status of the Nginx service with the following command:

sudo systemctl status nginx

If everything is OK, you should see the following output:

? nginx.service - The Nginx HTTP Server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/nginx.service.d
           ??nginx-systemd.conf
   Active: active (running) since Tue 2018-12-11 15:06:45 UTC; 11min ago
 Main PID: 1170 (nginx)
    Tasks: 6 (limit: 1114)
   CGroup: /system.slice/nginx.service

Dec 11 15:06:33 ubuntu1804 systemd[1]: Starting The Nginx HTTP Server...
Dec 11 15:06:45 ubuntu1804 systemd[1]: Started The Nginx HTTP Server.

Access to Microweber

Microweber is now installed and configured. Now it’s time to access the Microweber web interface.

Open your web browser and enter the URL http://example.com. You will then be redirected to the following page:

How to Install Microweber CMS on CentOS and Rocky Linux centos linux Rocky Linux

How to Install Microweber CMS on CentOS and Rocky Linux centos linux Rocky Linux

How to Install Microweber CMS on CentOS and Rocky Linux centos linux Rocky Linux

Here you enter all the details, such as the database name, the username and password for the database, the username and password for the administrator. Then click on the Install button. Once the installation is complete, you will be redirected to the Microweber Dashboard on the following page:

How to Install Microweber CMS on CentOS and Rocky Linux centos linux Rocky Linux

Conclusion

Congratulations! You have successfully installed Microweber on the CentOS 8 server. You can now easily create your own website with Microweber.