Einführung
Vanille ist ein kanadisches Softwareunternehmen, das 2009 in Montreal, Quebec, Kanada, gegründet wurde. Es ist sowohl eine Cloud-basierte (SaaS) Community-Forum-Software als auch eine von der Open-Source-Community unterstützte Software. Das Hauptprodukt des Unternehmens ist Vanilla Cloud.
Sein Open-Source-Produkt Vanilla OSS ist ein leichtgewichtiges Internetforum-Paket, das in der PHP-Skriptsprache unter Verwendung des Garden-Frameworks geschrieben wurde. Die Software ist unter der GNU GPL veröffentlicht. Vanilla Forums ist eine kostenlose Software, standardkonforme, anpassbare Diskussionsforen. Seit 2009 gibt es auch eine Cloud-gehostete Version (angeboten von Vanilla).
Installation
Befolgen Sie einfach die folgenden Schritte:
- Installieren Sie also php, php-fpm und seine Module
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
- Starten und aktivieren Sie php-fpm.
systemctl start php-fpm
systemctl enable php-fpm
- Installieren Sie nginx und starten Sie es.
dnf install nginx -y && systemctl start nginx
- Mariadb installieren, starten und aktivieren.
dnf install -y mariadb mariadb-server && systemctl start mariadb && systemctl enable mariadb
- Konfigurieren Sie die MariaDB-Datenbank und sichern Sie Ihre MariaDB.
mysql_secure_installation
- Beantworten Sie alle Fragen wie unten gezeigt
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
- melden Sie sich bei der MariaDB-Shell an
mysql -u root -p
- Datenbank und Datenbankbenutzer erstellen und dann alle Berechtigungen erteilen.
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;
- Vanilla-Forum herunterladen.
wget https://open.vanillaforums.com/get/vanilla-core-3.3.zip
Sie können das neueste Vanilla-Forum von der offiziellen Website herunterladen.
Neuestes Vanilla-ForumHinweis :Das neueste Produkt, das von den Mitarbeitern und dem Kernteam der Vanilla-Foren gepflegt wird.
- Entpacken Sie die heruntergeladene Datei.
unzip vanilla-core-3.3.zip
- Verschieben Sie das extrahierte Verzeichnis in das Nginx-Webstammverzeichnis.
mv package /var/www/html/vanilla
- Setzen Sie den Besitz des Vanilla-Verzeichnisses auf Nginx
chown -R nginx:nginx /var/www/html/vanilla
- Konfigurieren Sie den PHP-FPM-Pool, indem Sie die Datei /etc/php-fpm.d/www.conf bearbeiten
vim /etc/php-fpm.d/www.conf
- Ändern Sie die folgenden Zeilen in nginx.
user = nginx group = nginx
- Erstellen Sie ein Sitzungsverzeichnis für PHP und ändern Sie dessen Besitzer
mkdir -p /var/lib/php/session
chown -R nginx:nginx /var/lib/php/session
- Starten Sie den PHP-FPM-Dienst neu
systemctl restart php-fpm
- Konfigurieren Sie Nginx für Vanilla, indem Sie eine virtuelle Nginx-Hostdatei erstellen.
vim /etc/nginx/conf.d/vanilla.conf
- Fügen Sie dann die folgenden Zeilen hinzu
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;
}
}
- Starten Sie den Nginx-Dienst neu
systemctl restart nginx
- Port 80 und 443 auf der Firewall zulassen.
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
rewall-cmd --reload
- Außerdem müssen Sie SELinux für das Vanilla-Forum konfigurieren
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
- Greifen Sie auf das Vanilla Forum zu, indem Sie Ihren Webbrowser öffnen und die URL https://vanilla.unixcop.com besuchen .
- Geben Sie Ihre Datenbankinformationen und andere erforderliche Eingaben ein und klicken Sie dann auf Weiter .
- Sie sollten das Vanilla-Dashboard wie oben gezeigt sehen.
Schlussfolgerung
In dieser Installationsanleitung haben wir gezeigt, wie Vanilla-Forums installiert wird auf CentOS 8.
Das ist alles. Danke.