How to Install Microweber on Debian 9

In this tutorial, we will show you how to install Microweber on a Debian 9 VPS.

Microweber is a feature-rich open-source content management system and website builder. It is based on the PHP programming language and the robust Laravel Java framework. Microweber’s drag-and-drop technology and real-time writing and text editing functionality provides a quick and easy way to create your content, helping turn your website into a rich environment for you to express your thoughts. It also comes with built-in storefront features, allowing you to create an e-commerce site from which you can sell your products on the Internet. Let’s begin with the installation.

Prerequisites:

  • For the purposes of this tutorial, we will be using a Debian VPS.
  • You will also need a working LAMP or LEMP (Linux, Apache/Nginx, MySQL, PHP) stack.
  • Full SSH root user access or a user with sudo privileges is also required.

Step 1: Connect to Your Server and Update

Before we begin, you will need to connect to your server via SSH as the root user or as any other user that has sudo privileges.

To connect to your server as the root user, use the following command:

ssh root@IP_ADDRESS -p PORT_NUMBER

Make sure to replace IP_ADDRESS and PORT_NUMBER with your actual server IP address and SSH port number.

Once logged in, make sure that your server is up-to-date by running the following commands:

sudo apt-get update
sudo apt-get upgrade

Step 2: Install Nginx

We will be using a LEMP stack for our Microweber website, so the first step will be to install the Nginx web server.

To install Nginx on your Debian 9 server, run the following command:

sudo apt-get install nginx

Once the installation is complete, enable the Nginx service to start automatically upon system boot. You can do that with the following command:

sudo systemctl enable nginx

To verify that Apache is running, execute the following command:

sudo systemctl status nginx

The output should look something like this:

● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-05-01 04:23:11 EDT; 6s ago
     Docs: man:nginx(8)
  Process: 20249 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 20246 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
 Main PID: 20250 (nginx)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/nginx.service
           ├─20250 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
           ├─20251 nginx: worker process
           └─20252 nginx: worker process

Also, you can verify that Nginx is running by opening a web browser and visiting your server IP address (http://your-server-ip). You should get the Nginx welcome page. If everything shows up alright, then we can move onto the next step.

Step 3: Install MariaDB

The next step is to install the MariaDB database server, an open-source variant of MySQL that is functionally identical.

To install MariaDB on your system, type the following command and enter the character ‘Y’ when prompted:

sudo apt-get install mariadb-server

During the installation, you will be asked to enter a password for the MariaDB root user. Make sure to enter a strong password.

To further improve the security of our MariaDB installation as well as set up a password for our MariaDB root user, we need to run the mysql_secure_installation script and follow the on-screen instructions. Run the command below to configure your system:

sudo mysql_secure_installation

If the program asks you to enter your current MariaDB root password, just press your [Enter] key once, as no password is set by default when installing MariaDB. If you however did set a password during install, just enter the password you entered earlier.

A few more questions will be displayed on-screen – it is recommended that you answer yes to all of them by entering the character ‘Y’:

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y

Again, we can enable MariaDB to start on boot with the following command:

sudo systemctl enable mariadb

That’s it – MariaDB has been installed and made more secure.

Step 4: Install PHP 7.2

The last step of our LEMP stack setup is to install PHP. Debian 9 comes with PHP 7.0 by default, but we will show you how to install PHP 7.2 instead.

We will also include some additional modules in order to help PHP to connect with our Nginx and MariaDB servers.  Additionally, we will install modules that are required by our Microweber site.

First, execute the following commands in order to enable the PPA and install the required packages which are required for the PHP 7.2 installation. Then, import the package signing key in order to configure a PPA for the PHP packages on your Debian 9 system.

apt install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
apt update

We can now install PHP 7.2 and all the required modules with just one line:

sudo apt-get install php7.2 php7.2-fpm php7.2-common php7.2-mysql php7.2-cli php7.2-opcache php7.2-gd php7.2-curl php7.2-cli php7.2-imap php7.2-mbstring php7.2-soap 7.2-xmlrpc php7.2-xml php7.2-zip

Use the next command to check the PHP version currently installed on your server:

php -v

You should receive the following text as the output:

PHP 7.2.17-1+0~20190412071344.20+stretch~1.gbp23a36d (cli) (built: Apr 12 2019 07:13:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.17-1+0~20190412071344.20+stretch~1.gbp23a36d, Copyright (c) 1999-2018, by Zend Technologies

Step 5: Install Microweber

We can now start with our Microweber installation and configuration.

First, we need to create a new database. To do this, log in to your MariaDB database server as the root user by typing the following command:

sudo mariadb -u root -p

To create a new database and user, run the following commands on the MariaDB shell:

CREATE DATABASE microweber;
CREATE USER microweber@localhost IDENTIFIED BY 'strong-password';
GRANT ALL PRIVILEGES ON microweber.* TO microweber@localhost;
FLUSH PRIVILEGES;

Make sure to replace strong-password with an actual strong password.

To exit the MariaDB database server command line, type:

exit

Next, let’s create a new directory for our Microweber site:

sudo mkdir /var/www/microweber

We can now download the latest Microweber version from the official site. You can do this with the following command:

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

To extract the file in our Microweber directory, execute the following command:

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

The owner of the files needs to be the user of the web server running on your system. In our example, we are using the Nginx web server and Apache runs under the “www-data” user on Debian 9.  To change the owner of the files, you can then run the following command:

sudo chown -R www-data:www-data /var/www/microweber/

Step 6: Configure Nginx

In this step, we will show you how to create a virtual host file for Nginx – this is so you can access your Microweber installation using your domain name instead of an IP address.

Create the virtual host file by executing the following command. We’re using nano as our text editor, but you can use a different one if you prefer:

nano /etc/nginx/sites-available/microweber.conf

Once the file is open, enter the following information:

server {
    listen 80;
    server_name mydomain.com; root /var/www/microweber; index index.php index.html index.htm; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; } location ~ /\.ht { deny all; }

Make sure to replace mydomain.com with your actual domain name. This requires that you already have a registered domain name that’s already set up and pointing to your server’s IP address.

To enable the new Microweber virtual host, run the following command:

ln -s /etc/nginx/sites-available/microweber.conf /etc/nginx/sites-enabled/microweber.conf

Now, check the configuration files to make sure that there are no syntax errors. Any errors could crash the web server on restart.

nginx -t

Output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

If there are no errors, you can reload the Nginx config.

systemctl reload nginx

Step 7: Accessing Microweber

You can now open your preferred web browser and access your Microweber installation at http://mydomain.com (of course, make sure to replace mydomain.com with the actual domain name you used when creating the Nginx virtual server block).

This will take you to the initial setup page for Microweber.

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS

You will first need to enter your Database Server information, including the MySQL username, the password for the user, and the database name that we created for our Microweber website:

Entering the Database Details

You can also choose a template for your website:

Choosing a Template

The last step is to create an Admin user:

Creating an Admin User

After you are finished entering all of the required information, click the “Install” button. After a few seconds, the Microweber installation will be completed, and you can access your admin panel and start building your website.

The Microweber Dashboard

That’s it! Microweber has been successfully installed on your Debian 9 server.


Of course, you don’t have to install Microweber on Debian 9 if you have a Managed Debian Server with us. You can simply ask our support team to install Microweber on Debian 9 for you. They are available 24/7 and will be able to help you with the installation.

PS. If you enjoyed reading this blog post on how to install Microweber on Debian 9, feel free to share it on social networks using the shortcuts below, or simply leave a comment in the comments section. Thanks.

Leave a Comment