Learn How To Install Microweber on Fedora 28

March 29, 2019

Table of Contents

If you are using a different system, please check our other tutorials.

Microweber is an open source drag and drop CMS and online shop. Microweber source code is hosted on GitHub. This guide will show you how to install Microweber on a fresh Fedora 28 IT Web Services instance.

Requirements

Server Requirements:

  • PHP version 5.6 or higher with the following extensions:
    • gd
    • mcrypt
    • lib-xml must be enabled (with DOM support)
  • Nginx
  • MariaDB
  • Composer

Before you begin

Check the Fedora version.

cat /etc/fedora-release
# Fedora release 28 (Twenty Eight)

Create a new non-root user account with sudo access and switch to it.

useradd -c "John Doe" johndoe && passwd johndoe
usermod -aG wheel johndoe
su - johndoe

NOTE: Replace johndoe with your username.

Ensure that your system is up to date.

sudo dnf check-upgrade || sudo dnf upgrade -y

Set up the timezone.

timedatectl list-timezones
sudo timedatectl set-timezone 'Region/City'

Install necessary packages.

sudo dnf install -y curl git wget vim unzip bash-completion mcrypt

For simplicity, disable SELinux and Firewall.

sudo setenforce 0 ; sudo systemctl stop firewalld ; sudo systemctl disable firewalld

Install PHP

Install PHP and the required PHP extensions.

sudo dnf install -y php-cli php-fpm php-common php-gd php-mbstring php-xml php-mysqlnd php-pgsql php-sqlite3 php-zip php-soap php-xmlrpc php-json php-pdo

Check the version.

php --version

Start and enable PHP-FPM.

sudo systemctl start php-fpm.service
sudo systemctl enable php-fpm.service

Install MariaDB

Install MariaDB.

sudo dnf install -y mariadb-server

Check the version.

mysql --version
# mysql  Ver 15.1 Distrib 10.2.16-MariaDB, for Linux (x86_64) using readline 5.1

Start and enable MariaDB.

sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Run the mysql_secure_installation script to improve the security of your MariaDB installation.

sudo mysql_secure_installation

Log in to MariaDB as the root user.

mysql -u root -p
# Enter password:

Create a new MariaDB database and user, and remember the credentials.

CREATE DATABASE dbname;
GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit

Install Nginx

Install Nginx.

sudo dnf install -y nginx

Check the version.

nginx -v

Start and enable Nginx.

sudo systemctl start nginx.service
sudo systemctl enable nginx.service

Configure Nginx. Run sudo vim /etc/nginx/conf.d/microweber.conf and populate the file with the following.

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 unix:/run/php-fpm/www.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}

Test the configuration.

sudo nginx -t

Reload Nginx.

sudo systemctl reload nginx.service

Install Microweber

Create a document root directory.

sudo mkdir -p /var/www/microweber

Change ownership of the /var/www/microweber directory to johndoe.

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

Download the latest release of Microweber CMS and unzip it.

cd /var/www/microweber
wget https://download.microweberapi.com/ready/core/microweber-latest.zip
unzip microweber-latest.zip
rm microweber-latest.zip

Change ownership of the /var/www/microweber directory to nginx.

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

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

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

Restart PHP-FPM.

sudo systemctl restart php-fpm.service

Open your domain name (http://example.com/) in your web browser and follow the instructions. After the installation, your admin panel URL will be at http://example.com/admin.

Need help?

Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!