Hostnic Promo

Cara install phorum dengan Nginx di Fedora 30


Step By Step :

  1. Install PHP# dnf install -y php php-cli php-fpm php-common php-mysqlnd
  2. 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
  3. Start dan Enable PHP-FPM
    # systemctl start php-fpm.service# systemctl enable php-fpm.service
  4. Install MariaDB#dnf install -y mariadb-server
  5. Start dan Enable MariaDB# systemctl start mariadb.service
    # systemctl enable mariadb.service
  6. Run Mysql_secure# mysql_secure_installation
    Output :
    Would you like to setup VALIDATE PASSWORD plugin? N

    New 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

  7. Connect Database# mysql -u root -p
  8. Create Database
    mysql> CREATE DATABASE dbname;mysql> GRANT ALL ON dbname.* TO ‘username’ IDENTIFIED BY ‘password’;

    mysql> FLUSH PRIVILEGES;

  9. Install Nginx#dnf install -y nginx
  10. Start dan Enable Nginx# systemctl start nginx.service
    # sudo systemctl enable nginx.service
  11. 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;

    }

    }

  12. Check Nginx Konfigurasi#nginx -t
  13. Restart Nginx# systemctl reload nginx.service
  14. Buat Direktori Phorum#mkdir -p /var/www/phorum
  15. Ganti ownership of the /var/www/phorum directory to [jour_user]:#chown -R [your_user]:[your_user] /var/www/phorum
  16. Navigate ke direktori /var/www/phorum# cd /var/www/phorum
  17. Download packet phorum stable#wget https://www.phorum.org/downloads/phorum-5.2.23.tar.gz
  18. 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
  19. Konfigurasi Database Access# cp include/db/config.php.sample include/db/config.php
  20. Edit Konfigurasi Database# vim include/db/config.php
  21. Ganti ownership of the /var/www/craft directory ke nginx:#  chown -R nginx:nginx /var/www/phorum
  22. Edit vim /etc/php-fpm.d/www.conf#vim /etc/php-fpm.d/www.conf 
    Add this

    # user = nginx

    # group = nginx

Hostnic Promo

Di tulis oleh: