Cara install phorum dengan Nginx di Fedora 30
Step By Step :
- Install PHP# dnf install -y php php-cli php-fpm php-common php-mysqlnd
- Check Version PHP
# php –version# PHP 7.3.5 (cli) (built: Jun 22 2019 08:37:17) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.3.5, Copyright (c) 1998-2018 Zend Technologies - Start dan Enable PHP-FPM
# systemctl start php-fpm.service# systemctl enable php-fpm.service - Install MariaDB#dnf install -y mariadb-server
- Start dan Enable MariaDB# systemctl start mariadb.service
# systemctl enable mariadb.service - Run Mysql_secure# mysql_secure_installation
Output :
Would you like to setup VALIDATE PASSWORD plugin? NNew password: your_secure_password
Re-enter new password: your_secure_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
- Connect Database# mysql -u root -p
- Create Database
mysql> CREATE DATABASE dbname;mysql> GRANT ALL ON dbname.* TO ‘username’ IDENTIFIED BY ‘password’;mysql> FLUSH PRIVILEGES;
- Install Nginx#dnf install -y nginx
- Start dan Enable Nginx# systemctl start nginx.service
# sudo systemctl enable nginx.service - Konfigurasi Nginx untuk phorum vim /etc/nginx/conf.d/phorum.confserver {
listen 80;
listen 443 ssl;
server_name example.com;
root /var/www/phorum;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include default.d/php.conf;
try_files $uri $uri/ /index.php?$query_string;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
- Check Nginx Konfigurasi#nginx -t
- Restart Nginx# systemctl reload nginx.service
- Buat Direktori Phorum#mkdir -p /var/www/phorum
- Ganti ownership of the /var/www/phorum directory to [jour_user]:#chown -R [your_user]:[your_user] /var/www/phorum
- Navigate ke direktori /var/www/phorum# cd /var/www/phorum
- Download packet phorum stable#wget https://www.phorum.org/downloads/phorum-5.2.23.tar.gz
- Unpack file downloaded archive dan pindah files to the document root:tar xvzf phorum-5.2.23.tar.gz
rm phorum-5.2.23.tar.gz
mv Core-phorum_5_2_23/* . && mv Core-phorum_5_2_23/.* .
rmdir Core-phorum_5_2_23 - Konfigurasi Database Access# cp include/db/config.php.sample include/db/config.php
- Edit Konfigurasi Database# vim include/db/config.php
- Ganti ownership of the /var/www/craft directory ke nginx:# chown -R nginx:nginx /var/www/phorum
- Edit vim /etc/php-fpm.d/www.conf#vim /etc/php-fpm.d/www.conf
Add this# user = nginx
# group = nginx
Di tulis oleh: Nanda Anubis