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

Come installare Vanila Forum su CentOS 8

Introduzione

Vaniglia è una società di software canadese fondata nel 2009 a Montreal, Quebec, Canada. È sia un software per forum della comunità basato su cloud (SaaS) sia un software supportato dalla comunità open source. Il prodotto principale dell'azienda è Vanilla Cloud.

Il suo prodotto open source, Vanilla OSS, è un pacchetto di forum Internet leggero scritto nel linguaggio di scripting PHP utilizzando il framework Garden. Il software è rilasciato sotto GNU GPL. Vanilla Forums è software gratuito, forum di discussione personalizzabile e conforme agli standard. Dal 2009 esiste anche una versione cloud-hosted (offerta da Vanilla).

Installazione

Segui i passaggi seguenti:

  • Quindi installa php, php-fpm e i suoi moduli
dnf instal php 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
  • Avvia e abilita php-fpm.
 systemctl start php-fpm
 systemctl enable php-fpm
  • Installa nginx e avvialo.
dnf install nginx -y && systemctl start nginx
  • Installa, avvia e abilita mariadb.
dnf install -y mariadb mariadb-server && systemctl start mariadb && systemctl enable mariadb
  • Configura il database MariaDB e proteggi il tuo MariaDB.
mysql_secure_installation
  • Rispondi a tutte le domande come mostrato di seguito
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
  • accedi alla shell MariaDB
mysql -u root -p
  • Crea database e utente database, quindi concedi 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;
  • Scarica il forum di vaniglia.
wget https://open.vanillaforums.com/get/vanilla-core-3.3.zip

Puoi scaricare l'ultimo vanilla-forum dal sito ufficiale.

L'ultimo forum di vaniglia

Nota :l'ultimo prodotto gestito dallo staff e dal core team di Vanilla Forums.

  • decomprimi il file scaricato.
unzip vanilla-core-3.3.zip
  • Sposta la directory estratta nella directory principale web di Nginx.
mv package /var/www/html/vanilla
  • Imposta la proprietà della directory vanilla su Nginx
chown -R nginx:nginx /var/www/html/vanilla
  • Configura il pool PHP-FPM, puoi farlo modificando il file /etc/php-fpm.d/www.conf
vim /etc/php-fpm.d/www.conf
  • Cambia le seguenti righe in nginx.
user = nginx
group = nginx
  • crea una directory di sessione per PHP e modificane la proprietà
mkdir -p /var/lib/php/session
chown -R nginx:nginx /var/lib/php/session
  • Riavvia il servizio PHP-FPM
systemctl restart php-fpm
  • Configura Nginx per Vanilla creando il file host virtuale Nginx.
vim /etc/nginx/conf.d/vanilla.conf
  • Quindi aggiungi le seguenti righe
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;
  }

}
  • Riavvia il servizio Nginx
systemctl restart nginx
  • Consenti le porte 80 e 443 sul firewall.
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
rewall-cmd --reload
  • Dovrai anche configurare SELinux per il forum Vanilla
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
  • Accedi al Vanilla Forum aprendo il tuo browser web e visita l'URL https://vanilla.unixcop.com .
  • Fornisci le informazioni sul database e altri input richiesti, quindi fai clic su continua .
  • dovresti vedere la dashboard Vanilla come mostrato sopra.

Conclusione

In questa guida all'installazione, abbiamo illustrato come installare Vanilla-Forums su CentOS 8.

È tutto. Grazie.


Cent OS
  1. Come installare e configurare Nginx su CentOS 7

  2. Come installare Nginx su CentOS 7

  3. Come installare phpMyAdmin con Nginx su CentOS 7

  4. Come installare Nginx su CentOS 8

  5. Come installare Linux Dash su CentOS 6

Come installare Vanila Forum e proteggerlo con Lets 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

Come installare Nginx su CentOS 7?