GNU/Linux >> Linux Esercitazione >  >> Cent OS

Come installare Vanilla Forum su CentOS 8

Introduzione

Vanilla è un'azienda di software canadese fondata nel 2009 a Montreal, in Québec. Offre sia un software per forum di community in cloud (SaaS) sia un software community supportato open source; il prodotto principale dell'azienda è Vanilla Cloud.

Il prodotto open source, Vanilla OSS, è un pacchetto per forum Internet leggero, scritto in PHP e basato sul framework Garden. È distribuito con licenza GNU GPL. Vanilla Forums è quindi un software libero, conforme agli standard e altamente personalizzabile per discussioni; dal 2009 esiste anche una versione ospitata in cloud offerta da Vanilla.

Installazione

  • Installate PHP, php-fpm e i moduli necessari:
dnf install php php-mysqlnd php-opcache php-xml php-xmlrpc php-gd php-mbstring php-json php-fpm php-curl php-pear php-openssl php-intl unzip -y
  • Avviate e abilitate php-fpm:
systemctl start php-fpm
systemctl enable php-fpm
  • Installate e avviate Nginx:
dnf install nginx -y && systemctl start nginx
  • Installate, avviate e abilitate MariaDB:
dnf install -y mariadb mariadb-server && systemctl start mariadb && systemctl enable mariadb
  • Configurate il database MariaDB e mettetelo in sicurezza:
mysql_secure_installation
  • Rispondete alle domande come segue:
Enter current password for root (enter for none):
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
  • Accedete alla shell di MariaDB:
mysql -u root -p
  • Create database e utente, quindi assegnate tutti i privilegi:
CREATE DATABASE vanilla_db CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'vanilla_usr'@'localhost' IDENTIFIED BY 'unixcopPassword';
GRANT ALL PRIVILEGES ON vanilla_db.* TO 'vanilla_usr'@'localhost';
FLUSH PRIVILEGES;
\q;
  • Scaricate Vanilla Forum:
wget https://open.vanillaforums.com/get/vanilla-core-3.3.zip

Potete scaricare l'ultima versione di Vanilla Forum dal sito ufficiale, dove è disponibile il prodotto mantenuto dallo staff e dal core team del progetto.

  • Estraete il file scaricato:
unzip vanilla-core-3.3.zip
  • Spostate la directory estratta nella web root di Nginx:
mv package /var/www/html/vanilla
  • Assegnate la proprietà della directory a Nginx:
chown -R nginx:nginx /var/www/html/vanilla
  • Configurate il pool PHP-FPM modificando il file /etc/php-fpm.d/www.conf:
vim /etc/php-fpm.d/www.conf
  • Impostate le righe seguenti su nginx:
user = nginx
group = nginx
  • Create la directory di sessione per PHP e assegnatene la proprietà:
mkdir -p /var/lib/php/session
chown -R nginx:nginx /var/lib/php/session
  • Riavviate il servizio PHP-FPM:
systemctl restart php-fpm
  • Configurate Nginx per Vanilla creando il file di virtual host:
vim /etc/nginx/conf.d/vanilla.conf
  • Aggiungete le righe seguenti:
server {
    listen 80;
    server_name vanilla.unixcop.com;
    root /var/www/html/vanilla;
    index index.php;

    location ~* /\.git { deny all; return 403; }
    location /build/ { deny all; return 403; }
    location /cache/ { deny all; return 403; }
    location /cgi-bin/ { deny all; return 403; }
    location /uploads/import/ { deny all; return 403; }
    location /conf/ { deny all; return 403; }
    location /tests/ { deny all; return 403; }
    location /vendor/ { deny all; return 403; }

    location ~* ^/index\.php(/|$) {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        try_files $fastcgi_script_name =404;
        set $path_info $fastcgi_path_info;
        fastcgi_param PATH_INFO $path_info;
        fastcgi_index index.php;
        include fastcgi.conf;
        fastcgi_param SCRIPT_NAME /index.php;
        fastcgi_param SCRIPT_FILENAME $realpath_root/index.php;
        fastcgi_param X_REWRITE 1;
        fastcgi_pass unix:/var/run/php-fpm/www.sock;
    }

    location ~* \.php(/|$) {
        rewrite ^ /index.php$uri last;
    }

    location / {
        try_files $uri $uri/ @vanilla;
    }

    location @vanilla {
        rewrite ^ /index.php$uri last;
    }
}
  • Riavviate il servizio Nginx:
systemctl restart nginx
  • Autorizzate le porte 80 e 443 sul firewall:
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload
  • Configurate anche SELinux per Vanilla Forum:
setsebool httpd_can_network_connect on -P
chcon -R -u system_u -t httpd_sys_rw_content_t -r object_r /var/www/html/vanilla
  • Accedete a Vanilla Forum aprendo il browser all'URL https://vanilla.unixcop.com.
Come installare Vanilla Forum su CentOS 8
  • Inserite i dati del database e le altre informazioni richieste, poi cliccate continue.
Come installare Vanilla Forum su CentOS 8
  • Comparirà la dashboard di Vanilla, come mostrato sopra.

Conclusione

In questa guida abbiamo illustrato come installare Vanilla Forums su CentOS 8. È tutto: grazie per averci seguito!


Cent OS
  1. Installazione e configurazione di Nginx su CentOS 7

  2. Installazione e amministrazione di Nginx su CentOS 7

  3. Installare phpMyAdmin con Nginx su CentOS 7

  4. Installare Nginx su CentOS 8

  5. Come installare Linux Dash su CentOS 6

Come installare Vanilla Forum e proteggerlo con Let's Encrypt su CentOS 8

Come installare Nginx su CentOS

Come installare Nginx con ngx_pagespeed su CentOS

Come installare Nginx con PHP-FastCGI su CentOS 6

Come installare Nginx su CentOS 6: guida passo per passo

Come installare Nginx su CentOS 7