- Ersteller des Themas
- #1
Cavemen

Die Farbe ist mehr Schein als Sein !!
Szene-Pirat

Dieses Handbuch zeigt Ihnen, wie Sie Xenforo 2.1.X auf Ubuntu 16.04 (oder 17.10 oder 18.04) VPS installieren, z. B. DigitalOcean oder Amazon Web Server.
Bash:
Reconfigure locales:
sudo nano /etc/default/locale
LC_CTYPE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
sudo dpkg-reconfigure locales
sudo reboot
sudo su
Step 1: Install nginx
sudo apt-get update
sudo apt-get install nginx
Step 2: Install MariaDB Database Server
sudo apt-get install mariadb-server mariadb-client
On Ubuntu 16.04 LTS:
sudo systemctl stop mysql.service
sudo systemctl start mysql.service
sudo systemctl enable mysql.service
On Ubuntu 17.10 and 18.04 LTS:
sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
Step 3: Install PHP 7.4 FPM and Related Modules
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.4-fpm php7.4-common php7.4-mbstring php7.4-xmlrpc php7.4-soap php7.4-gd php7.4-xml php7.4-intl php7.4-mysql php7.4-cli php7.4-zip php7.4-curl
Step 4: Setting up MariaDB
sudo mysql_secure_installation
Step 5: Configurate php (for this one I suggest opening it with your code editor on filezilla, because on nano it will take you some time to find the variables)
sudo nano /etc/php/7.4/fpm/php.ini
file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 100M
cgi.fix_pathinfo = 0
max_execution_time = 360
date.timezone = America/Chicago
Step 6: Create Database
sudo mysql -u root -p
CREATE DATABASE xenforodb;
CREATE USER 'admin'@'localhost' IDENTIFIED BY '<passwordhere>';
GRANT ALL ON xenforodb.* TO 'admin'@'localhost' IDENTIFIED BY '<password_entered_above>' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
Step 7: Configure Nginx PHP-FPM Settings
sudo nano /etc/nginx/sites-available/default
Make sure that index.php is on the list, set server_name to your forum domain, and location ~ \.php$ is uncommented and with php7.4:
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name myforumdomain.com;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
}
sudo systemctl restart nginx.service
sudo systemctl restart php7.4-fpm.service
Step 8: Set the permissions for the html dir
sudo chown -R www-data:www-data /var/www/html
sudo chmod -R 755 /var/www/html/*
Step 9: Upload Xenforo zip file on /var/www/html folder (Make sure to remove the default index nginx file)
sudo apt-get install unzip
cd /var/www/html
sudo unzip /var/www/html/upload.zip
Step 10: Fix Xenforo needed permissions
sudo chmod 777 /var/www/html/data
sudo chmod 777 /var/www/html/internal_data
Now go to your forum url on your browser and finish the installation there
Zuletzt von einem Moderator bearbeitet: