Knowledgebase

Aveti intrebari? Sunteti in locul potrivit!

Cum instalati WonderCMS pe Ubuntu 18.04 LTS

Verificati versiunea Ubuntu

lsb_release -ds
# Ubuntu 18.04.1 LTS

Creati un utilizator cu drepturi  non-root cu acces  sudo si autentificati-va cu acest user.

adduser testhostx --gecos "Test"
usermod -aG sudo testhostx
su - testhostx

NOTE: inlocuiti testhostx cu numele de utilizator dorit

Setati timezone-ul

sudo dpkg-reconfigure tzdata

Asigurati-va ca aveti ultimele actualizari:

sudo apt update && sudo apt upgrade -y

Instalati pachetele necesare

sudo apt install -y zip unzip curl wget git

Instalarea PHP

Instalati PHP, si extensiile necesare.

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

Verficati versiunea

php --version
# PHP 7.2.15-0ubuntu0.18.04.1 (cli) (built: Feb  8 2019 14:54:22) ( NTS )

Instalati Nginx

Instalarea  Nginx.

sudo apt install -y nginx

Verificati versiunea:

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

rulati sudo vim /etc/nginx/sites-available/wondercms.conf si configurati Nginx pentru WonderCMS.

server {

  listen 80;

  server_name example.com;
  root /var/www/wondercms;

  index index.php;


  location / {
    if (!-e $request_filename) {
      rewrite ^/(.+)$ /index.php?page=$1 last;
    }
  }
  location ~ database.js {
    return 403;
  }

  location ~ .php(/|$) {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  }

}

Salvati fisierul si iesiti din editor.

Activati noul config pentru  wondercms.conf configurati astfel incat sa fie accesibil la sites-enabled .

sudo ln -s /etc/nginx/sites-available/wondercms.conf /etc/nginx/sites-enabled/

Testati configuratia

sudo nginx -t

Reincarcati Nginx.

sudo systemctl reload nginx.service

Instalarea  WonderCMS

Creati un director in root

sudo mkdir -p /var/www/wondercms

Schimbati owner-ul  /var/www/wondercms directory to testhostx.

sudo chown -R texthostx:testhostx /var/www/wondercms

Navigati la directorul root

cd /var/www/wondercms

Dezcarcati si dezarhivati  WonderCMS.

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

Mutati fisierele WonderCMS in directorul necesar

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

modificati owner-ul din  /var/www/wondercms in directorul www-data.

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

Deschideti browserul si utilizati user-ul  admin apoi modificati parola default.