Wụnye Platform Mbipụta Blọọgụ Ghost (CMS) na Debian na Ubuntu
Ghost bụ isi mmalite mepere emepe yana ikpo okwu dị fechaa ezubere maka ịde blọgụ ma ọ bụ mbipụta n'ịntanetị. Edere ya na Nodejs wee na-abịa n'ụdị ngwa mbipụta ọgbara ọhụrụ emebere maka iwulite na ịgba akwụkwọ n'ịntanetị ngwa ngwa.
Ọ bara ọgaranya ma ugbu a nwere ngwa desktọpụ (na-agba na Linux, Windows na Mac OS) nke na-enye ọrụ niile na ike nke Ghost, naanị na kọmputa gị. Nke a pụtara na ị nwere ike ịgbanwe n'etiti ọtụtụ saịtị na-aga: na-eme ka ọ rụọ ọrụ nke ọma.
- Ọsọ, nwee ike ịgbatị ma rụọ ọrụ nke ọma.
- Na-enye gburugburu ndezi dabere na akara.
- Na-abịa na ngwa desktọpụ.
- Na-abịa na ndebiri njikwa njikwa mara mma.
- Nkwado maka njikwa ọdịnaya dị mfe.
- Nkwado maka ọtụtụ ọrụ maka ndị ode akwụkwọ, ndị editọ na ndị nchịkwa.
- Na-enye ohere ịhazi ọdịnaya n'ihu.
- Na-akwado ibe mkpanaka emelitere.
- Na-akwado njikarịcha search engine.
- Na-enye data ahaziri ahazi.
- Na-akwado ndenye aha RSS, Email na Slack.
- Na-akwado ndezi saịtị dị mfe yana ọtụtụ ndị ọzọ.
- Nwụnye nkesa Debian nke nwere ebe nchekwa 1GB
- Wụnye obere ihe nkesa Ubuntu nwere ebe nchekwa 1GB
- Node v6 LTS – Wụnye Node.js na NPM kacha ọhụrụ na Debian na Ubuntu
- Ihe nkesa Debian/Ubuntu arụnyere Nginx
Ihe dị mkpa: Tupu ịmalite ịwụnye Ghost n'onwe gị, ị ga-achọ ịnweta ezigbo VPS Bochum, anyị na-akwado BlueHost.
N'isiokwu a, anyị ga-akọwa otu esi etinye isi mmalite Ghost (Sistemụ Njikwa Ọdịnaya) ịde blọgụ na sistemụ Debian na Ubuntu.
Kwụpụ 1: Wụnye Nodejs na Debian na Ubuntu
1. Nodejs adịghị na ndabara Debian na Ubuntu software repositories, ya mere buru ụzọ tinye ya repositories wee wụnye dị ka ndị a.
$ sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - $ sudo apt-get install nodejs
2. Ozugbo nodejs arụnyere, ị nwere ike nyochaa na ị nwere akwadoro mbipute nke Nodejs na npm arụnyere na iji iwu.
$ node -v $ npm -v
Kwụpụ 2: Wụnye Ghost Na Debian na Ubuntu
3. Ugbu a mepụta akwụkwọ ndekọ mgbọrọgwụ Ghost nke ga-echekwa faịlụ ngwa na/var/www/ghost, nke bụ ebe nrụnye akwadoro.
$ sudo mkdir -p /var/www/ghost
4. Na-esote, jide ụdị Ghost kachasị ọhụrụ site na ebe nchekwa Ghost's GitHub wee wepụ faịlụ ebe nchekwa n'ime ndekọ aha ị mebere n'elu.
$ curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip $ sudo unzip -uo ghost.zip -d /var/www/ghost
5. Ugbu a gaa na akwụkwọ ndekọ mmụọ ọhụrụ, wee wụnye Ghost ( naanị nrụpụta mmepụta) site na iwu ndị dị n'okpuru.
$ sudo cd /var/www/ghost $ sudo npm install --production
Kwụpụ 3: Malite wee nweta blọọgụ Ghost an-kpọ
6. Iji malite Ghost, mee iwu na-esonụ site na /var/www/ghost directory.
$ sudo npm start --production
7. Site na ndabara, mmụọ kwesịrị ịdị na-ege ntị na ọdụ ụgbọ mmiri 2368. Iji hụ blọọgụ Ghost ọhụrụ gị, mepee ihe nchọgharị weebụ wee pịnye URL n'okpuru:
http://SERVER_IP:2368 OR http://localhost:2368
Rịba ama: Mgbe ịmalitechara Ghost na nke mbụ, a ga-emepụta faịlụ config.js na mgbọrọgwụ ndekọ nke Ghost. Ị nwere ike iji ya ịtọ nhazi ọkwa gburugburu maka mmụọ; ebe ị nwere ike hazie nhọrọ dịka URL saịtị gị, nchekwa data, ntọala ozi wdg.
Kwụpụ 4: Wụnye ma hazie Nginx maka Ghost
9. Na ngalaba a, anyị ga-arụnye na hazie Nginx ka ọ bụrụ ihe nkesa blọgụ Ghost anyị na ọdụ ụgbọ mmiri 80, ka ndị ọrụ nwee ike ịnweta blọgụ Ghost na-agbakwunyeghị ọdụ ụgbọ mmiri : 2368
na njedebe nke url.
Buru ụzọ kwụsị ọrụ Ghost site na ịpị igodo CTRL+C
na njedebe wee wụnye nginx dịka egosiri.
# sudo apt install nginx # systemctl start nginx # systemctl enable nginx
10. Ozugbo nginx arụnyere, mepụta faịlụ ọhụrụ n'okpuru /etc/nginx/sites-available/ghost.
$ sudo vi /etc/nginx/sites-available/ghost
Tinye nhazi ndị a wee hụ na ị gbanwee ahịrị ndị a pụtara ìhè na your_domain_or_ip_address.
server { listen 80; server_name your_domain_or_ip_address; location / { proxy_set_header HOST $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:2368; } }
Chekwaa faịlụ ma rụọ ọrụ nhazi a site na ịmepụta symlink n'okpuru /etc/nginx/sites-enabled directory.
$ sudo ln -s /etc/nginx/sites-available/ghost /etc/nginx/sites-enabled/ghost
11. Ugbu a mepee faịlụ /etc/nginx.conf. tinye faịlụ nhazi na ndekọ saịtị nyere aka wee gbanyụọ saịtị ndabara dị ka egosiri.
$ sudo vi /etc/nginx/nginx.conf
Ugbu a tinye ahịrị na-esonụ n'ime http
ngọngọ ka ịtinye faịlụ nhazi na ndekọ saịtị nyere aka.
http { ... # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*;
Wee kwupụta kpam kpam ngọngọ ihe nkesa nke achọtara n'ime ngọngọ http
.
... # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; # server { # listen 80 default_server; # listen [::]:80 default_server; # server_name _; # root /usr/share/nginx/html; # # # Load configuration files for the default server block. # include /etc/nginx/default.d/*.conf; # # location / { # } # # error_page 404 /404.html; # location = /40x.html { # } # # error_page 500 502 503 504 /50x.html; # location = /50x.html { # } ... ...
N'ikpeazụ, chekwaa ma malitegharịa nginx sava weebụ.
$ sudo systemctl restart nginx
Ọzọ, gaa na http://your_domain_or_ip_address
ma ị ga-ahụ blọgụ Ghost gị.
Maka ozi ndị ọzọ, gaa na webụsaịtị gọọmentị Ghost: https://ghost.org/
Ọ gwụla! N'isiokwu a, anyị gosipụtara otu esi edozi Ghost na Debian na Ubuntu. Zitere anyị ajụjụ gị ma ọ bụ echiche ọ bụla gbasara ntuziaka a site na mpempe nzaghachi n'okpuru.