Otu esi etinye phpBB na LEMP na AlmaLinux 8

Site na mmụba nke nyiwe mgbasa ozi mmekọrịta dịka Reddit, Facebook, Twitter na nyiwe nkata n'ịntanetị dị ka esemokwu, anyị ahụla ka obodo ọgbakọ mgbasa ozi ịntanetị na-ebelata. Onwe ya, dị ka m kwuru, ha na-eji nwayọọ nwayọọ na-alọghachi na mpaghara niche akọwapụtara maka mgbakwunye ọhụrụ. phpBB bụ otu n'ime ngwa mgbasa ozi ọgbakọ mepere emepe kachasị agbatị n'ahịa.

phpBB abụghị naanị nhọrọ. Ndị ọzọ dị ka VBulletin, Nodebb, Xenforo, na ndị ọzọ, mana ọtụtụ n'ime ihe ndị a na-akwụ ụgwọ site na nlele anya. VBulletin bụbu ụlọ ike, mana ugbu a ọ bụ onyinyo nke onwe ya mbụ. Xenforo bụ otu n'ime ngwa nbipụta akwụkwọ akụkọ kacha akwụ ụgwọ kacha mma. Agbanyeghị, nke ahụ bụ naanị echiche nke m, mana m ga-ebu ụzọ họrọ phpBB mgbe niile ka ọ bụ n'efu, mepere emepe, yana nwee ụfọdụ ndị mmepe mepere emepe 3rd ọzọ, ma devs ọhụrụ na nke dị kemgbe mmalite.

N'ime nkuzi a, ị ga-amụta ka esi etinye LEMP, yana ịhazigharị na ngwungwu kachasị ọhụrụ yana otu esi edozi phpBB maka iji Almalinux 8 nke mbụ.

Prerequisites

  • OS akwadoro: AlmaLinux 8.
  • Akaụntụ onye ọrụ: Akaụntụ onye ọrụ nwere sudo ihe ùgwù or ohere mgbọrọgwụ (su Command).

Na-emelite Sistemụ Ọrụ

Melite gi AlmaLinux Sistemụ arụmọrụ iji hụ na ngwugwu niile dị adị adịla ugbu a:

sudo dnf upgrade --refresh -y

Nkuzi a ga-eji ya sudo iwu na na-eche na ị nwere ọnọdụ sudo.

Iji nyochaa ọkwa sudo na akaụntụ gị:

sudo whoami

Ihe atụ na-egosi ọkwa sudo:

[joshua@localhost ~]$ sudo whoami
root

Ka ịtọlite ​​akaụntụ sudo dị adị ma ọ bụ ọhụrụ, gaa na nkuzi anyị na Otu esi etinye onye ọrụ na Sudoers na AlmaLinux.

Iji mgbọrọgwụ akaụntụ, jiri iwu na-esonụ na paswọọdụ mgbọrọgwụ banye.

su

Advertisement


Wụnye Nginx - (LEMP Stack)

Ọrụ mbụ bụ ịwụnye Nginx dịka akụkụ nke nrụnye LEMP.

Mbụ, site AlmaLinux 8.5 gaa n'ihu, mee ka ụdị Nginx 1.20 mee ka ọ bụrụ ụdị 1.14.

sudo dnf module enable nginx:1.20 -y

Na-esote, wụnye Nginx site na ịme iwu na-esonụ.

sudo dnf install nginx

Ihe atụ mmepụta:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Kwado nrụnye site na ịlele ụdị nrụpụta:

nginx -v

Ihe atụ mmepụta:

nginx version: nginx/1.20.0

Rịba ama na etinyere Nginx site na iji AlmaLinux 8.5; Ndị ọrụ 8.4 nwere ike ịhụ ụdị ochie.

Site na ndabara, mgbe ị na-etinye Nginx na Rocky Linux, anaghị enyere ya aka. Iji mee ka boot na ịmalite, jiri ihe ndị a:

sudo systemctl enable nginx --now

Ọmụmaatụ nke iji mee nke ọma (symlink):

Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service.

Ugbu a, lelee ka ịhụ ọkwa ọrụ Nginx gị site na iji iwu ọnụ na-esonụ:

systemctl status nginx

Ihe atụ na-ekwu na ihe niile dị mma:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Ugbu a, ị nwere ike kwado na sava weebụ Nginx gị na-arụ ọrụ site na ịbanye HTTP://server-ip or HTTP: // ngalaba-aha na ihe nchọgharị ịntanetị gị, ị ga-enweta ihe ndị a:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Ọ bụrụ na ịnweghị ike ịnweta ibe a, ị nwere ike ịhazi ntọala firewall kpuchiri na ngalaba na-esote.

Hazie Iwu Firewall

Ọ naghị agbakwunye iwu firewall na akpaghị aka na ọdụ ụgbọ mmiri 80 ma ọ bụ 443 mgbe ị na-etinye Nginx. Tupu ị gaa n'ihu, ịkwesịrị ịtọ iwu ndị a, nke a ga-adabere na ọdụ ụgbọ mmiri ị ga-eji, mana edepụtara nhọrọ niile.

Mepee ọdụ ụgbọ mmiri 80 ma ọ bụ HTTP:

sudo firewall-cmd --permanent --zone=public --add-service=http

Mepee ọdụ ụgbọ mmiri 443 ma ọ bụ HTTPS:

sudo firewall-cmd --permanent --zone=public --add-service=https

Bugharịa firewall iji mee mgbanwe ka ọ dị irè

sudo firewall-cmd --reload

Advertisement


Wụnye MariaDB (LEMP STACK)

Ugbu a, ọ bụ oge iji wụnye MariaDB; mbụ, a na-atụ aro ka ị gbanwee gaa na MariaDB 10.5, nke dịkwa na iyi Almalinux 8 App. Ihe ndabara bụ 10.3.

Na njedebe gị, mebie iwu a naanị ma ọ bụrụ na ịchọrọ ịgbanwe.

sudo dnf module enable mariadb:10.5 -y

Ọzọ, tinye MariaDB na iwu na-esonụ.

sudo dnf install mariadb-server mariadb

Ihe atụ mmepụta:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Ụdị "Y," wee pịa "Tinye igodo" ịga n'ihu na nwụnye.

Iji kwado nrụnye nke MariaDB yana ịlele ihe arụnyere arụnyere, pịnye iwu a:

mysql --version

Ihe atụ mmepụta:

mysql  Ver 15.1 Distrib 10.5.9-MariaDB, for Linux (x86_64) using  EditLine wrapper

Lelee ọkwa nkesa MariaDB

Site na ndabara, ị ga-ahụ ọkwa MariaDB ka ọ kwụsịrị. Iji malite MariaDB, jiri iwu a:

sudo systemctl enable mariadb --now

Ugbu a ị wụnyela ma mee ka MariaDB rụọ ọrụ, lelee ọnọdụ ya na iwu systemctl na-esonụ:

systemctl status mariadb

Ugbu a lelee ọkwa ahụ, ma ị ga-enweta ihe ndị a:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Iji kwụsị MariaDB:

sudo systemctl stop mariadb

Iji mee ka MariaDB nwee ike na mmalite sistemụ:

sudo systemctl enable mariadb

Iji gbanyụọ MariaDB na mmalite sistemụ:

sudo systemctl disable mariadb

Ka ịmalitegharịa ọrụ MariaDB:

sudo systemctl restart mariadb

Chekwaa MariaDB site na iji script nchekwa

Mgbe ị wụnye MariaDB Ọhụrụ, ntọala ndabara ka a na-ewere dị ka adịghị ike site n'ọtụtụ ụkpụrụ ma na-ebute nchegbu maka ike ikwe ka mbubata ma ọ bụ na-erigbu ndị hackers. A ngwọta bụ na-agba ọsọ nwụnye nche script na-abịa na MariaDB ndozi.

Mbụ, jiri iwu na-esonụ iji malite (mysql_secure_installation):

sudo mysql_secure_installation

Na-esote, a ga-enye gị ngwa ngwa na-arịọ gị ka ịbanye (MariaDB mgbọrọgwụ paswọọdụ). Maka ugbu a, pịa ( Tinye) igodo ka edobeghi mgbọrọgwụ okwuntughe dị ka n'okpuru:

Ọzọ, ụdị (NA) wee pịa tinye ka ịtọlite ​​​​ (mgbọrọgwụ) paswọọdụ dị ka n'okpuru:

Usoro ajụjụ ndị ọzọ ị nwere ike ịkụ n'enweghị nsogbu ( Tinye), nke ga-aza (NA) nye ajụjụ niile na-esote nke na-ajụ gị (wepụ ndị ọrụ na-amaghị aha, gbanyụọ nbanye mgbọrọgwụ dịpụrụ adịpụ, wee wepụ nchekwa data ule). Rịba ama (NA) bụ isi, nke pụtara na ọ bụ azịza ndabara mgbe ị pịa ya ( Tinye) isi.

Ọmụmaatụ n'okpuru:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Nchịkọta nke ihe kwesịrị ka eme n'elu:

  • Ịtọ ntọala paswọọdụ maka mgbọrọgwụ akaụntụ.
  • Iwepu akaụntụ mgbọrọgwụ nke a na-enweta site na mpụga onye ọbịa mpaghara.
  • Iwepu akaụntụ onye ọrụ amaghị aha.
  • Iwepu nchekwa data ule, nke ndị ọrụ amaghị aha nwere ike ịnweta na ndabara.

Nzọụkwụ a dị mkpa maka nchekwa nchekwa data MariaDB na e kwesịghị ịgbanwe ma ọ bụ wụpụ ọ gwụla ma ịmara ihe ị na-eme.

Wụnye PHP & PHP-FPM (LEMP STACK)

Dị ka aha ahụ ga-atụ aro, phpBB na-eji PHP eme ihe. Ụdị ndabara nke dị na iyi ngwa AlmaLinux bụ ụdị 7.2. Dị ka o kwesịrị, ị kwesịrị ịgbanwe nke a na PHP 7.4 ka akwụkwọ akụkọ bọọdụ na-arụ ọrụ nke ọma na ụdị a, yana uru arụmọrụ na-amali n'ihu 7.2.

Iji mee ka modul PHP 7.4 dnf, jiri iwu na-esonụ.

sudo dnf module enable php:7.4 -y

Mara, gị nwere ike ime PHP-7.3 ma ọ bụ ndị ọzọ site n'ịgbaso dnf modul nrụpụta iwu na iji ya dnf modul mee ka php: 7.3 iwu kama. ahọrọ ụdị ịchọrọ maka ngwa ahụ, nke a bụ naanị ọmụmaatụ nke ịnwe ụdị PHP kachasị ọhụrụ nke nhọrọ PHP ọ bụla ị kpebiri.

Wụnye PHP & PHP-FPM

Ọzọ, wụnye PHP na nkesa gị; dabere na ụdị nke PHP, ihe nrụpụta ga-adị iche; Otú ọ dị, iwu na-adị otu.

sudo dnf install php php-fpm php-mysqli php-cli php-common php-gd php-intl php-opcache php-xml php-soap php-mbstring

Ihe atụ mmepụta:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Ụdị "Y," wee pịa "Tinye igodo" ịga n'ihu na ntinye. Mara, enwere ike ịkpali gị pịnye "Y."

Nyochaa nwụnye ma lelee ụdị ma wuo:

php -v

Ihe atụ mmepụta:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Ugbu a, site na ndabara, PHP-FPM agbanyụrụ na anaghị enyere ya aka na buut. Iji mee ka boot na malite ọrụ, jiri ihe ndị a systemctl nyere iwu:

sudo systemctl enable php-fpm --now

Iji gosi na PHP-FPM na-agba ọsọ ugbu a, jiri ihe ndị a systemctl iwu:

systemctl status php-fpm

Ihe atụ mmepụta:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Cheta, ịkwesighi iji PHP 8.0, mee nyocha ma ọ bụrụ na ị maghị, ma ọ bụ ka mma, jụọ na phpBB Community forums, nke na-arụ ọrụ kacha mma ugbu a; Otú ọ dị, usoro a bụ otu ihe ahụ yana iwu iji jiri ndabara ma ọ bụ nsụgharị ọzọ dị na ndepụta dnf modul.

Ugbu a edobere LEMP, gaba na nrụnye phpBB n'ezie.


Advertisement


Part 1. phpBB Backend nwụnye

Ugbu a ị wụnyela nchịkọta LEMP, ị nwere ike ịga n'ihu ịwụnye forums phpBB. N'ime oge nkuzi a, phpBB 3.3.4 bụ ụdị kachasị ọhụrụ, mana ka oge na-aga, dị ka ọtụtụ ihe, nke a ga-agbanwe ka ha na-eme ntọhapụ kwa ọnwa isii. Lelee ibe nbudata iji nyochaa na njikọ ụdị ka dị irè.

Budata & Ntọala ndekọ

Budata phpBB mbụ:

cd /tmp && wget https://download.phpbb.com/pub/release/3.3/3.3.5/phpBB-3.3.5.zip
unzip phpBB-3.3.5.zip
sudo mv phpBB3 /var/www/html/phpbb

Ugbu a, anyị kwesịrị ịgbanwe ikike ndekọ maka NGINX:

sudo chown -R nginx /var/www/html/phpbb
sudo chmod -R 755 /var/www/html/phpbb

Nhazi Selinux

Site na ndabara, Selinux ga-agọnarị gị ịwụnye na ịgba ọsọ phpBB nke ọma na sava AlmaLinux gị. Iji dozie nke a, ị ga-ahazi SELinux.

A naghị atụ aro ka ị gbanyụọ Selinux. Kama, ị ga-eṅomi koodu a dị n'okpuru iji nye ikike.

sudo chcon -R -t httpd_sys_content_rw_t /var/www/html/phpbb/

Ya bụ ya, ọ dịghịkwa gị mkpa ime ya ọzọ. Ọ bụrụ na ị tinyegharịa phpBB n'ọdịnihu na ebe ọhụrụ, megharịa iwu ahụ.

Nhazi MariaDB

Ugbu a, ị na-aga n'ihu ịmepụta nchekwa data maka nrụnye phpBB gị na bọọdụ mgbasa ozi n'ọdịnihu.

Nke mbụ, weta ihe atụ njedebe MariaDB dị ka mgbọrọgwụ:

sudo mysql -u root -p

Mepụta nchekwa data maka ọgbakọ gị:

Ihe Nlereanya:

CREATE DATABASE phpbbdb;

Mepụta onye ọrụ nchekwa data akpọrọ phpbbuser nwere paswọọdụ ọhụrụ:

Ihe Nlereanya:

CREATE USER 'phpbbuser'@'localhost' IDENTIFIED BY 'new_password_here';

Mgbe ahụ nye onye ọrụ ohere ịnweta nchekwa data zuru oke site n'ime ihe ndị a:

Ihe Nlereanya:

GRANT ALL PRIVILEGES ON phpbbdb.* TO phpbbuser@localhost IDENTIFIED BY 'new_password_here';

Wepu ihe ùgwù ndị a iji mee mgbanwe ndị ahụ ka ọ rụọ ọrụ:

FLUSH PRIVILEGES;

Ugbu a pụọ:

EXIT;

Ebe nchekwa data gị maka phpBB adịla njikere, ma ị ga na-abanye nkọwa ahụ ozugbo ị nwetara akụkụ nrụnye UI weebụ nke nkuzi.

Nhazi PHP

Iji wụnye phpBB nke ọma ma rụọ ọrụ nke ọma n'ọdịnihu, ị kwesịrị ịbawanye nhọrọ ole na ole na faịlụ nhazi php.ini.

Nke mbụ, mepee faịlụ php.ini:

sudo nano /etc/php.ini

Na-esote, ị ga-ahụ ntọala akwadoro iji rụọ ọrụ na phpBB. Ị ga-achọ ịchọta ntọala na ahịrị ma gbanwee ha ka ọ bụrụ ndị a:

max_execution_time = 180 (located on line 338)
max_input_time = 90 (located on line 398)
memory_limit = 256M (located on line 409)
upload_max_filesize = 64M (located on line 846)

Nhọrọ, ụfọdụ ntọala nchekwa abawanyela, enwere ike ịwụpụ nke a:

cgi.fix_pathinfo=0 
session.use_strict_mode = 1
session.use_cookies = 1
session.cookie_secure = 1
session.use_only_cookies = 1
session.name = LCCookies (Change the name, example: POPme)
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = example.com (example only)
session.cookie_httponly = 1
session.cookie_samesite = Strict

Ozugbo emere, CTRL + O ịzọpụta mgbe ahụ CTRL + X ịpụ na faịlụ.

N'adịghị ka nrụnye LEMP na Debian/Ubuntu na-eji (www-data) onye ọrụ, nke a abụghị ikpe maka nrụnye Rhel/Rocky Linux. Site na ndabara na Rocky Linux, a haziri ọrụ PHP-FPM ka ọ na-agba ọsọ (apache) onye ọrụ, nke ezighi ezi ebe ọ bụ na anyị na-eji Nginx, nke a kwesịrị ka edozi ya.

Nke mbụ, meghere ndị a (www.conf) nhazi faịlụ:

sudo nano /etc/php-fpm.d/www.conf

Na-esote, dochie (apache) onye ọrụ na otu na (Nginx) onye ọrụ na otu:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Ka ịchekwaa, pịa (CTRL+O) wee pụọ (CTRL+X).

Ị ga-achọ ịmalitegharị PHP ka mgbanwe ndị a na-arụ ọrụ:

sudo systemctl restart php-fpm

Nhazi Nginx

Na ngọngọ nkesa Nginx gị, ịkwesịrị ikwuwapụta PHP elu na ebe PHP.

Ụzọ kachasị mma iji mepụta ngọngọ nkesa ọhụrụ, na-eji subdomain dị ka forums ma ọ bụ obodo.

Ọmụmaatụ nke a dị n'okpuru, gbanwee ka ọ dabara na mkpa gị:

Mbụ, mepụta ngọngọ nkesa:

sudo nano /etc/nginx/conf.d/phpbb.conf

Ugbu a detuo na mado ihe ndị a n'ime ngọngọ nkesa, gbanwee aha ngalaba, SSL, ụzọ mgbọrọgwụ, na ihe ọ bụla ọzọ iji gboo mkpa gị. Agaghị emetụ ebe ndị ahụ na PHP n'onwe ya aka ma ọ bụrụ na ị maara ihe ị na-eme.

Ọmụmaatụ naanị:

server {
   listen 80;
   listen [::]:80;

   server_name www.example.com example.com;
   root /var/www/html/phpbb;
   index index.php index.html index.htm;

    access_log /var/log/nginx/forums-access.log;
    error_log /var/log/nginx/forums-error.log;

location / {
	try_files $uri $uri/ @rewriteapp;

	# Pass the php scripts to FastCGI server specified in upstream declaration.
	location ~ \.php(/|$) {
		include fastcgi.conf;
                fastcgi_pass unix:/run/php-fpm/www.sock;
		fastcgi_split_path_info ^(.+\.php)(/.*)$;
		fastcgi_param PATH_INFO $fastcgi_path_info;
		fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
		fastcgi_param DOCUMENT_ROOT $realpath_root;
		try_files $uri $uri/ /app.php$is_args$args;
		fastcgi_intercept_errors on;	
	}

	# Deny access to internal phpbb files.
	location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor) {
		deny all;
		# deny was ignored before 0.8.40 for connections over IPv6.
		# Use internal directive to prohibit access on older versions.
		internal;
	}
}

location @rewriteapp {
	rewrite ^(.*)$ /app.php/$1 last;
}

# Correctly pass scripts for installer
location /install/ {
	try_files $uri $uri/ @rewrite_installapp =404;

	# Pass the php scripts to fastcgi server specified in upstream declaration.
	location ~ \.php(/|$) {
		include fastcgi.conf;
		fastcgi_split_path_info ^(.+\.php)(/.*)$;
		fastcgi_param PATH_INFO $fastcgi_path_info;
		fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
		fastcgi_param DOCUMENT_ROOT $realpath_root;
		try_files $uri $uri/ /install/app.php$is_args$args =404;
                fastcgi_pass unix:/run/php-fpm/www.sock;
		fastcgi_intercept_errors on;	
	}
}

location @rewrite_installapp {
	rewrite ^(.*)$ /install/app.php/$1 last;
}

# Deny access to version control system directories.
location ~ /\.svn|/\.git {
	deny all;
	internal;
}

 gzip on; 
 gzip_comp_level 6;
 gzip_min_length 1000;
 gzip_proxied any;
 gzip_disable "msie6";
 gzip_types
     application/atom+xml
     application/geo+json
     application/javascript
     application/x-javascript
     application/json
     application/ld+json
     application/manifest+json
     application/rdf+xml
     application/rss+xml
     application/xhtml+xml
     application/xml
     font/eot
     font/otf
     font/ttf
     image/svg+xml
     text/css
     text/javascript
     text/plain
     text/xml;

  # assets, media
  location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
      expires    90d;
      access_log off;
  }
  
  # svg, fonts
  location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
      add_header Access-Control-Allow-Origin "*";
      expires    90d;
      access_log off;
  }
}

Mara, ahịrị nwere "fastcgi_pass unix:/run/php-fpm/www.sock;" dị mkpa; na-enweghị ya FPM agaghị enwe ike ịkparịta ụka.

Ozugbo enyere gị aka, ị nwere ike ịme nnwale ọsọ ọsọ nke ọrụ Nginx gị iji hụ na ihe niile na-arụ ọrụ nke ọma:

sudo nginx -t 

Mmepụta ihe atụ ma ọ bụrụ na ihe niile na-arụ ọrụ nke ọma:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Ugbu a malitegharịa ọrụ Nginx maka phpBB ka ịnweta ya site na UI weebụ:

sudo systemctl restart nginx

Nhọrọ - Chekwaa Nginx na ka anyị zoo SSL Asambodo efu

Dị ka o kwesịrị, ị ga-achọ ịgba ọsọ Nginx gị HTTPS na-eji asambodo SSL. Ụzọ kacha mma isi mee nke a bụ iji Ka anyị zoo, ikike asambodo efu, akpaaka na mepere emepe nke ndị Otu nyocha nchekwa ịntanetị anaghị akwụ ụgwọ (ISRG).

Mbụ, wụnye EPEL ebe nchekwa na mod_ssl ngwugwu maka ngwungwu emelitere nke ọma na nchekwa.

sudo dnf install epel-release mod_ssl -y

Na-esote, wụnye ngwugwu certbot dị ka ndị a:

sudo dnf install python3-certbot-nginx -y

Ozugbo arụnyere, gbanye iwu a ka ịmalite imepụta asambodo gị:

sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email you@example.com -d forums.example.com

Nke a bụ ezigbo ntọala nke gụnyere ike HTTPS 301 redirects, Strict-Transport-Security nkụnye eji isi mee, na OCSP Stapling. Naanị jide n'aka na ịhazigharịa e-mail na ngalaba aha na ihe ị chọrọ.

Ugbu a URL gị ga-abụ https://forums.example.com kama HTTP://forums.example.com.

Rịba ama, ọ bụrụ na ị na-eji nke ochie URL HTTP, ọ ga-akpaghị aka redirect gaa na HTTPS.

Nhọrọ, ị nwere ike ịtọ ọrụ cron iji megharịa asambodo na-akpaghị aka. Certbot na-enye edemede nke na-eme nke a na-akpaghị aka, ma ị nwere ike ibu ụzọ nwalee iji jide n'aka na ihe niile na-arụ ọrụ site na ịme ọkụ ọkụ.

sudo certbot renew --dry-run

Ọ bụrụ na ihe niile na-arụ ọrụ, mepee windo crontab gị site na iji iwu njedebe na-esote.

sudo crontab -e

Na-esote, kọwaa oge mgbe ọ ga-emeghari onwe ya. Ekwesịrị ịlele nke a kwa ụbọchị na opekempe, ma ọ bụrụ na achọrọ ka emegharịa asambodo ahụ, edemede ahụ agaghị emelite asambodo ahụ. Ọ bụrụ na ịchọrọ enyemaka na ịchọta ezigbo oge ịtọ, jiri ya crontab.guru ngwá ọrụ efu.

00 00 */1 * * /usr/sbin/certbot-auto renew

Save (CTRL+O) wee pụọ (CTRL+X), na cronjob ga-enyere aka na-akpaghị aka.


Advertisement


Part 2. phpBB Web UI nwụnye

Ọ bụrụ na ihe niile na-arụ ọrụ nke ọma, anyị na-aga ugbu a na-ahọpụtara adreesị nke gị ọhụrụ arụnyere phpBB forums. Dịka ọmụmaatụ anyị, ọ bụ https://forums.linuxcapable.com maka ọmụmaatụ nkuzi, ma ọ bụrụ na ọ ga-aga nke ọma, ị ga-abata na ibe nrụnye bụ isi maka phpBB.

Ozugbo ị rutere na ibe ahụ, pịa Wụnye bọtịnụ n'akụkụ aka ekpe n'elu iji malite nrụnye eserese.

Ihe Nlereanya:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Na-esote, a ga-akpọrọ gị gaa na ihuenyo ọzọ na-adụ ọdụ maka nkọwa kacha nta na ozi teknụzụ ndị ọzọ. Mgbe ịgụchara na ịlele ugboro abụọ, pịa ya Wụnye bọtịnụ na ala peeji.

Ihe Nlereanya:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Na ihuenyo ọzọ, ịkwesịrị ime mepụta akaụntụ nchịkwa maka phpBB. Gbaa mbọ hụ na ejuju nke a nke ọma yana paswọọdụ siri ike dịka nke a dị mkpa maka mgbake, n'etiti ihe ndị ọzọ.

Ihe Nlereanya:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Ugbu a ị banyere nke gị Admin nkọwa nke ọma, ihuenyo nkọwa nchekwa data ga-apụta mejupụta. Mbụ, dobe ndabara MySQL na MySQL Extension ma banye localhost ma ọ bụrụ na nchekwa data gị dị na sava dị iche, tinyezie IP nkesa na ọdụ ụgbọ mmiri ma ọ bụrụ na agbanwere ya na ndabara.

Na-esote na ihe atụ nkuzi, aha nchekwa data ihe atụ phpbb, na phpbbuser ịbụ aha njirimara nke nwere ohere ma e wezụga mgbọrọgwụ iji nweta phpBB nchekwa data. N'ikpeazụ, prefix bụ na ndabara phpbb_, nke ị nwere ike idowe otu ihe ahụ, mana ọ bụrụ na ị ga-etinye ọtụtụ forums, a ga-adụ ọdụ ka ị gbanwee nke a iji dobe prefix ahụ dị ọcha na iche.

Tinye ihe ndị a wee pịa n'okpuru aga n'ihu.

Ihe Nlereanya:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Tọọ nhazi nkesa gị. Ọ bụrụ na ị naghị agba SSL, ntọala ndabara kwesịrị ịbụ nke zuru oke. Ọ bụrụ na ị na-agba SSL, gbanwee ha ka ọ dabara na mkpa gị.

Ihe Nlereanya:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Ibe na-esote, ị nwere ike ịtọ SMTP ọ bụrụ na ị nwere nhazi ịbanye. Ọ bụrụ na ọ bụghị, hapụ ndabara wee kụọ ọzọ.

Ihe Nlereanya:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Debe gị Aha Board / Aha na Asụsụ. Ọ bụrụ na ịmaghị ihe ị ga-akpọ forums gị, hapụ ndabara wee kụọ n'okpuru. Ị nwere ike ịgbanwe ntọala ndị a ma emechaa.

Ihe Nlereanya:

Otu esi etinye phpBB na LEMP na AlmaLinux 8
Otu esi etinye phpBB na LEMP (Nginx, MariaDB, na PHP) na Rocky Linux 8 27

Mgbe ịkụchara nrubeisi, ị ga-ahụ ihuenyo ikpeazụ dị ka nke dị n'okpuru ebe etinyere forums yana njikọ na-eduga gị na panel ACP. Ọ bụrụ na ị nwere mperi rụtụ aka azụ dị ka nzọụkwụ, ikike nwere ike agbagharala ya.

Biputere nwụnye phpBB

Wepu ndekọ nwụnye

Daalụ maka ịbanye na akụkụ a. Mgbe ịbanye n'ime panel ACP gị na nke mbụ, ị ga-ahụ nnukwu anya na-acha uhie uhie enyi na-agwa gị ka iwepụ ma ọ bụ nyegharịa akwụkwọ ndekọ aha gị. A na-atụ aro ka ihichapụ, ọ bụghị ịkwaga, ndekọ. Iji mee nke a, jiri iwu a na njedebe gị:

sudo rm -R /var/www/html/phpbb/install

Idozi ikike CHMOD (Nzọụkwụ Dị Mkpa)

Mgbe ị na-arụsi ọrụ ike na-eme iwu ọnụ, Ọ dị oke mkpa ịtọ nke ziri ezi ikikere chmod ka emechara. The Enwere ike ịchọta ntuziaka phpBB gọọmentị na nke a ebe a. Mwụpụ nke a nwere ike hapụ imeghe ụfọdụ ihe egwu nchekwa dị egwu, yabụ biko soro nke a kpọmkwem ma ọ bụ n'ụzọ gị ma ọ bụrụ na ị nwere usoro ka mma mana enweghị. hapụ ikike ndabara!!

sudo find /var/www/html/phpbb -type d -exec chmod 755 {} \;
sudo find /var/www/html/phpbb -type f -exec chmod 644 {} \;

Mgbe nke ahụ gasịrị, anyị kwesịrị ịnye ụfọdụ nchekwa / faịlụ ụfọdụ ikike pụrụ iche naanị dị ka ndị a:

sudo chmod 777 -R /var/www/html/phpbb/files
sudo chmod 777 -R /var/www/html/phpbb/cache
sudo chmod 777 -R /var/www/html/phpbb/store
sudo chmod 777 -R /var/www/html/phpbb/images/avatars/upload

Emeghị nke a ga-emebi ọrụ nke bọọdụ gị. Jide n'aka na ị na-agbaso ụzọ ndị a nke ọma, ma ọ bụ na ị nwere ike ịnye akwụkwọ ndekọ phpBB gị niile n'ụzọ zuru ezu na-agụ ma na-edeghachite ọha na eze, na-ebuteghachi nsogbu nchebe.

Tọọ Cronjob maka phpBB (A kwadoro)

Nzọụkwụ ikpeazụ ikpeazụ na ntuziaka anyị bụ ịtọlite ​​​​cronjob. A na-atụ aro Cronjobs na nnọkọ ndị na-arụsi ọrụ ike na ngwa ngwa iji guzobe ọrụ cron iji na-agba ọsọ nkeji 5 ọ bụla site na ụkpụrụ phpBB.

Weta crontab:

sudo crontab -e

Nhọrọ cronjob mbụ:

*/5 * * * * /usr/bin/php /var/www/html/phpbb/bin/phpbbcli.php cron:run > /dev/null 2>&1

Ihe Nlereanya:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Iji chekwaa, CTRL + O wee pụọ na CTRL + X. Ọ bụrụ na ọ ziri ezi, ị ga-ahụ nsonaazụ na-esote azụ na ọdụ gị:

crontab: installing new crontab

Nke a pụtara na etinyere ya ma na-arụ ọrụ, a na-adụ ọdụ ka ị na-agba ọsọ cronjobs kwa nkeji 5 na phpBB; Otú ọ dị, ị nwere ike ịhazigharị oge iji kwado mkpa gị ma ọ bụrụ na ịchọrọ.

Ugbu a, kpagharịa ogwe nchịkwa gị azụ na phpBB wee mee ka ọrụ cron nkesa dị na ntọala nkesa gị.

Ihe Nlereanya:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Ekele, ị rụnyela ọgbakọ phpBB nke ọma, ma ị dịla njikere chepụta ọgbakọ gị wee malite obodo gị. A na-atụ aro ka ị lelee webụsaịtị gọọmentị na wiki nke phpBB n'ihi na o nwere ọtụtụ ozi gbasara nhazi nke ọgbakọ gị, nke ga-abụ nke ukwuu itinye na ntuziaka a anyị mepụtara ebe a.


atụ:

Otu esi etinye phpBB na LEMP na AlmaLinux 8

Advertisement


Okwu na mmechi

Maka nchekwa, ndị otu phpBB nwere ndekọ egwu nchekwa. Mgbe ị na-enyocha mmebi iwu enwere ike, ahụrụ na ndị ọrụ anaghị elekwasị anya na nrụnye “echekwabara”, dị ka ụfọdụ usoro anyị rụtụrụ aka na ntuziaka ahụ, dị ka ikike chmod.

N'ozuzu, phpBB bụ ngwanrọ na-emepe emepe nke na-apụtaghị na ọ ga-apụ n'anya n'oge na-adịghị anya. Enwetụbeghị m nsogbu na ihe nkesa siri ike, nke siri ike, ntọala phpBB mbụ.

Obodo 3rd dị ezigbo mma. Ole na ole n'ime ndị a ile anya bụ SplickerSnap na DMZX, ma enwere m ike depụta 20 ma ọ bụ karịa kwesịrị ka a kpọtụrụ ya aha.

Idenye aha
Gwa nke
0 Comments
Inline nzaghachi
Lee echiche niile
0
Ga-ahụ n'anya gị echiche, biko okwu.x