How to Install WonderCMS on Ubuntu 18.04 LTS
0

WonderCMS is a free and open supply flat file CMS, aimed to be extraordinarily small, mild and easy. It is constructed with PHP, jQuery, HTML/CSS and developed since 2008. No preliminary configuration required. The set up course of is fairly simple – unzip and add 5 information. All information will be simply moved, backed up and restored by copy/pasting all information to a different location. Shifting them to a different host doesn’t require any re-configuration. WonderCMS additionally does not require a standard/relational database like MySQL. The flat file expertise permits WonderCMS to avoid wasting all information to a textual content file (flat file) referred to as database.js which is structured in JSON format. On this tutorial, we are going to undergo the WonderCMS set up and setup on Ubuntu 18.04 LTS system by utilizing Nginx as an online server, and optionally you’ll be able to safe transport layer by utilizing Acme.sh consumer and Let’s Encrypt certificates authority so as to add SSL help.

Necessities

Necessities for putting in and working WonderCMS are:

  • PHP model 7.1 or higher with the curl, mbstring and zip extensions.
  • Web server (Apache with mod_rewrite module enabled, Nginx, IIS).

Stipulations

  • An Ubuntu 18.04 LTS working system.
  • A non-root person with sudo privileges.

Preliminary steps

Test your Ubuntu model:

lsb_release -ds
# Ubuntu 18.04.2 LTS

Arrange the timezone:

sudo dpkg-reconfigure tzdata

Replace your working system packages (software program). This is a vital first step as a result of it ensures you’ve gotten the most recent updates and safety fixes to your working system’s default software program packages:

sudo apt replace && sudo apt improve -y

Set up some important packages which can be essential for primary administration of Ubuntu working system:

sudo apt set up -y curl wget vim git unzip socat bash-completion apt-transport-https

Step 1 – Set up PHP and essential PHP extensions

Set up PHP, in addition to the required PHP extensions:

sudo apt set up -y php7.2 php7.2-cli php7.2-fpm php7.2-common php7.2-curl php7.2-zip php7.2-mbstring

To indicate PHP compiled in modules, you’ll be able to run:

php -m

ctype
curl
exif
fileinfo
. . .
. . .

Test the PHP model:

php --version

# PHP 7.2.17-0ubuntu0.18.04.1 (cli) (constructed: Apr 18 2019 14:12:38) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Applied sciences
# with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Applied sciences

PHP-FPM service is robotically began and enabled on reboot on Ubuntu 18.04 system, so there is no such thing as a want to begin and allow it manually. We will transfer on to the following step, which is the SSL setup.

Step 2 – Set up acme.sh consumer and acquire Let’s Encrypt certificates ( optionally available )

Securing your discussion board with HTTPS shouldn’t be essential, however it’s a good apply to safe your web site site visitors. As a way to receive a TLS certificates from Let’s Encrypt we are going to use acme.sh consumer. Acme.sh is a pure UNIX shell software program for acquiring TLS certificates from Let’s Encrypt with zero dependencies.

Obtain and set up acme.sh:

sudo su - root
git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --install --accountemail [email protected]
supply ~/.bashrc
cd ~

Test acme.sh model:

acme.sh --version
# v2.8.0

Get hold of RSA and ECC/ECDSA certificates to your area/hostname:

# RSA 2048
acme.sh --issue --standalone -d instance.com --keylength 2048
# ECDSA
acme.sh --issue --standalone -d instance.com --keylength ec-256

In order for you pretend certificates for testing you’ll be able to add --staging flag to the above instructions.

After working the above instructions, your certificates and keys can be in:

  • For RSA: /dwelling/username/instance.com listing.
  • For ECC/ECDSA: /dwelling/username/instance.com_ecc listing.

To checklist your issued certs you’ll be able to run:

acme.sh --list

Create a listing to retailer your certs. We’ll use /and many others/letsencrypt listing.

mkdir -p /and many others/letsecnrypt/instance.com
sudo mkdir -p /and many others/letsencrypt/instance.com_ecc

Set up/copy certificates to /and many others/letsencrypt listing.

# RSA
acme.sh --install-cert -d instance.com --cert-file /and many others/letsencrypt/instance.com/cert.pem --key-file /and many others/letsencrypt/instance.com/personal.key --fullchain-file /and many others/letsencrypt/instance.com/fullchain.pem --reloadcmd "sudo systemctl reload nginx.service"
# ECC/ECDSA
acme.sh --install-cert -d instance.com --ecc --cert-file /and many others/letsencrypt/instance.com_ecc/cert.pem --key-file /and many others/letsencrypt/instance.com_ecc/personal.key --fullchain-file /and many others/letsencrypt/instance.com_ecc/fullchain.pem --reloadcmd "sudo systemctl reload nginx.service"

All of the certificates can be robotically renewed each 60 days.

After acquiring certs exit from root person and return again to regular sudo person:

exit

Step 3 – Set up and configure NGINX

WonderCMS can work positive with many fashionable internet server software program. On this tutorial, we chosen NGINX.

Set up NGINX:

sudo apt set up -y nginx

Test the NGINX model:

sudo nginx -v
# nginx model: nginx/1.14.0 (Ubuntu)

Subsequent, configure NGINX for WonderCMS. Run sudo vim /and many others/nginx/sites-available/wondercms.conf and add the next configuration:

server {
   
   pay attention 80;
 
   server_name instance.com;
   root /var/www/wondercms;
 
   index index.php;
 
 
   location / {
     if (!-e $request_filename) {
       rewrite ^/(.+)$ /index.php?web page=$1 final;
     }
   }
   location ~ database.js {
     return 403;
   }
 
   location ~ .php(/|$) {
     embody snippets/fastcgi-php.conf;
     fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
   }
 
 }

Activate the brand new wondercms.conf configuration by linking the file to the sites-enabled listing:

sudo ln -s /and many others/nginx/sites-available/wondercms.conf /and many others/nginx/sites-enabled/

Test NGINX configuration for syntax errors:

sudo nginx -t

Reload NGINX service:

sudo systemctl reload nginx.service

Step 4 – Set up WonderCMS

Create a doc root listing for WonderCMS.

sudo mkdir -p /var/www/wondercms

Change possession of the /var/www/wondercms listing to [jour_username]:

sudo chown -R [your_username]:[your_username] /var/www/wondercms

Navigate to the doc root listing:

cd /var/www/wondercms

Obtain and unzip WonderCMS supply:

wget https://github.com/robiso/wondercms/releases/download/2.7.0/WonderCMS-2.7.0.zip
unzip WonderCMS-2.7.0.zip
rm WonderCMS-2.7.0.zip

Transfer WonderCMS information to doc root listing.

mv wondercms/* . && mv wondercms/.*.
rmdir wondercms

Change possession of the /var/www/wondercms listing to www-data:

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

Open your web site in an online browser and log in with default password admin and alter the default password afterward.

WonderCMS on Ubuntu

Hyperlinks

Our first-look images of Apple’s new Mac Professional and the Professional Show XDR

Previous article

This week’s lifeless Google product is Google Journeys, might it relaxation in peace

Next article

You may also like

Comments

Leave a Reply

More in Apache