How to Install WonderCMS on Fedora 30
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 recordsdata. All recordsdata might be simply moved, backed up and restored by copy/pasting all recordsdata to a different location. Shifting them to a different host doesn’t require any re-configuration. WonderCMS additionally would not require a standard/relational database like MySQL. The flat file know-how permits WonderCMS to avoid wasting all knowledge to a textual content file (flat file) referred to as database.js which is structured in JSON format. On this tutorial, we’ll undergo the WonderCMS set up and setup on Fedora 30 system by utilizing Nginx as an internet server, and optionally you may safe the transport layer by utilizing Acme.sh shopper 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 larger with the curl, mbstring and zip extensions.
  • Web server (Apache with mod_rewrite module enabled, Nginx, IIS).

Conditions

  • Fedora 30 working system.
  • A non-root consumer with sudo privileges.

Preliminary steps

Test your Fedora model:

cat /and so on/fedora-release
# Fedora launch 30 (Thirty)

Arrange the timezone:

timedatectl list-timezones
sudo timedatectl set-timezone 'Area/Metropolis'

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

sudo dnf replace -y

Set up some important packages which might be needed for fundamental administration of the Fedora working system:

sudo dnf set up -y curl wget vim git unzip socat bash-completion

Step 1 – Set up PHP and needed PHP extensions

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

sudo dnf set up -y php-cli php-fpm php-common php-curl php-zip php-mbstring php-json

To point out PHP compiled in modules, you may run:

php -m

ctype
curl
exif
fileinfo
. . .
. . .

Test the PHP model:

php --version

# PHP 7.3.6 (cli) (constructed: Might 28 2019 09:32:59) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.3.6, Copyright (c) 1998-2018 Zend Applied sciences

Begin and allow PHP-FPM service:

sudo systemctl begin php-fpm.service
sudo systemctl allow php-fpm.service

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

Securing your discussion board with HTTPS will not be needed, however it’s a good observe to safe your web site visitors. With the intention to get hold of a TLS certificates from Let’s Encrypt we’ll use acme.sh shopper. 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.2

Get hold of RSA and ECC/ECDSA certificates in 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

If you’d like faux certificates for testing you may add --staging flag to the above instructions.

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

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

To listing your issued certs you may run:

acme.sh --list

Create a listing to retailer your certs. We’ll use /and so on/letsencrypt listing.

mkdir -p /and so on/letsecnrypt/instance.com
sudo mkdir -p /and so on/letsencrypt/instance.com_ecc

Set up/copy certificates to /and so on/letsencrypt listing.

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

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

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

exit

Step 3 – Set up and configure NGINX

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

Set up NGINX:

sudo dnf set up -y nginx

Test the NGINX model:

nginx -v
# nginx model: nginx/1.16.0

Begin and allow NGINX service:

sudo systemctl begin nginx.service
sudo systemctl allow nginx.service

Subsequent, configure NGINX for WonderCMS. Run sudo vim /and so on/nginx/conf.d/wondercms.conf and add the next configuration:

server {
   
   hear 80;
hear 443 ssl;

ssl_certificate /and so on/letsencrypt/instance.com/fullchain.pem;
ssl_certificate_key /and so on/letsencrypt/instance.com/personal.key;
ssl_certificate /and so on/letsencrypt/instance.com_ecc/fullchain.pem;
ssl_certificate_key /and so on/letsencrypt/instance.com_ecc/personal.key; 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(/|$) { embrace default.d/php.conf; fastcgi_pass unix:/run/php-fpm/www.sock; } }

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 [your_username]:

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

Change [your_username] with the username that you're logged into the server.

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 recordsdata to doc root listing.

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

Change possession of the /var/www/wondercms listing to nginx:

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

Run sudo vim /and so on/php-fpm.d/www.conf and set consumer and group to nginx. Initially, it is set to consumer and group apache:

sudo vim /and so on/php-fpm.d/www.conf
# consumer = nginx
# group = nginx

Create /var/lib/php/session/ listing and alter possession to nginx:

sudo mkdir -p /var/lib/php/session/ && sudo chown -R nginx:nginx /var/lib/php/session/

Restart the PHP-FPM service.

sudo systemctl restart php-fpm.service

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

WonderCMS with Nginx on Fedora

Hyperlinks

Official Galaxy Word 10 photographs leak, showcase the massive, boxy physique

Previous article

OurPact returns to App Retailer, reviving debates about Apple’s impartiality

Next article

You may also like

Comments

Leave a Reply

More in Apache