Part 1 එක කියවන්න මෙතනින්.
මේ පෝස්ට් එකෙන් අපි ඔයා Google Cloud Platform Free Tier එකේ host කරපු wordpress website එක සම්පූර්ණ කරගන්න තමයි බලාපොරොත්තු වෙන්නේ.

මේ පෝස්ට් එකෙන් අපි,

2.1 Cloud DNS එක හරහා nameservers, A records සහා CName setup කරගන්න හැටි. ඒ මගින් domain name එක wordpress instance එකේ IP address එකට add කරගන්න හැටි.
2.2 ඔයා ගත්ත​ domain name එකේ දැනට තියෙන nameservers මාරු කරලා Google Cloud DNS එකේ nameservers වලට මාරු කරන හැටි
2.3. Free SSL certificate එකක් ඔයාගේ site එකට add කරගන්න හැටි
2.4 Bitnami logo එක පැත්තකින් load වෙන එක නවත්තන විදිහ

2.1 Google Cloud Platform (GCP) එකේ Cloud DNS එක හදාගන්න හැටි

මේ යටතේ අපි දේවල් කිහිපයක් හදන්න බලාපොරොත්තු වෙනවා. ඒ සියලුම පියවර කොටස් වලට බෙදලා අපි කතා කරමු.

Cloud DNS එකේ Zone එකක් හදා ගමු
* Network services වලට ගිහින් Cloud DNS එක click කරන්න​

* Create Zone button එක උඩ click කරන්න​. Zone type : Public තියන්න​, zone name එකට කැමති නමක් දෙන්න (ආපහු මාරු කරන්න බැහැ). DNS name එකට ඔයාගේ website එකේ නම දෙන්න (උදා: xyz.com). DNSSEC ඔයාට අවශයනම් On කරන්න පුලුවන්. Create button එක උඩ click කරන්න​.

Cloud DNS එකට records add කරගමු
* වම් පැත්තේ pane එකෙන් Compute Engine > VM Instances එකට යන්න​.
* ඔයාගේ wordpress website එක host වෙලා තියෙන VM එකේ External IP address එක copy කරගන්න.
* Network services > Cloud DNS එකට ගිහින් ඔයා හදපු Cloud DNS zone එක click කරන්න​​. Add record set එක උඩ click කරන්න.
* Resources record type එක “A” record ද කියලා බලන්න. එහෙම නැතිනම් A record කියලා drop down menu එකෙන් select කරන්න​. IPv4 Address එකට ඔයා copy කරගත්ත VM external IP address එක paste කරන්න​​. Create button එක click කරන්න.
* ආපහු ​Add record set එක උඩ click කරන්න. DNS name එක ඉස්සරහට www කියලා කරන්න, resources record type එක “CName” record කියලා drop down menu එකෙන් select කරන්න. Canonical name එකට ඔයාගේ domain name එක දෙන්න්න www නැතුව. ​Create button එක click කරන්න.

දැන් ඔයාගේ domain name එක wordpress IP එක​ connect කරන මූලික වැඩේ ඉවරයි.

2.2 Google nameserver records ඔයාගේ domain එකට connect කරමු.

මේ පියවර ටික කියලා දෙන්න මම උදාහරණයකට ගන්නේ GoDaddy.com. ඔයා GoDaddy එකෙන් නම් domain name එක ගත්තේ පහල පියවර අනුගමනය කරන්න. වෙනත් service provider කෙනෙක්ගෙන් නම් domain name ගත්තේ මුල් පියවර කිහිපයක් විතරක් වෙනස් වෙන්න පුලුවන්.

පියවර
* Godaddy website එකට login වෙන්න
* ඔයාගේ doname name එක ඉස්සරහ තියෙන dns button එක click කරන්න​​.
* Nameservers යටතේ change button එක click කරන්න​.
* “I’ll use my own nameservers” option එක click කරන්න.
* Google Cloud Platform > network services > Cloud DNS එකේ ඔයාගේ zone එකේ තියෙන type “NS” යටතේ තියෙන record 4, එකින් එක ඔයාගේ Godaddy domain එකේ add කරලා save කරන්න. ​

5 mins – 48 hours ඇතුලත DNS reocrds propagate වෙලා ඔයා browser එකේ domain name එක type කලාම ඔයාව wordpress site එකට direct වෙයි.

Direct උනත් ඔයාව website එකට, site is not secure / not secure කියලා පෙන්වන්න පුලුවනි. ඒක හදාගන්න විදිහ තමයි දැන් බලන්න යන්නේ.

2.3 ඔයාගේ domain එකට Free SSL එකක් දාගමු.

පියවර​
* Google Cloud > Compute Engine > VM Instance එකේ ඔයාගේ wordpress එක host කරලා තියෙන VM instance එක ඉස්සරහා තියෙන SSH කියන button එක click කරන්න.

* පහල code එක console එකේ type කරලා enter කරන්න​
Important ⬇️
* ​​email_address එකට ඔයාගේ email address එක දාන්න​
* your_domain.com එකට ඔයාගේ domain name එක දාන්න​

sudo /opt/bitnami/letsencrypt/scripts/generate-certificate.sh -m email_address -d your_domain.com -d www.your_domain.com

* උඩ code එක run කරනකොට එන messgaes කියවලා අදාල තැන් වල y අකුර යොදන්න​.
* වැඩේ ඉවර උනාට පස්සේ console එකේ clear කියලා type කරල enter කරන්න​
* පහල code එක console එකේ type කරලා enter කරන්න​

sudo nano /opt/bitnami/apache2/conf/bitnami/bitnami.conf

*Nano editor එක හරහා config file එක open වෙයි. පස්සේ පහල highlight කරලා තියෙන DocumentRoot එක සහා Directory tag එක අතර paste කරන්න. www.zyz.com කියන එක ඔයාගේ domain name එකෙන් replace කරන්න.

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://www.zyz.com/$1 [R,L]

*Console එකෙන් Exit වෙන code එක ගහලා exit වෙන්න. Exit වෙන ගමන් Y type කරලා එක save කරන්න​.
* Change එක සාර්ථක වෙන්න Apache Server එක restart කරන්න ඕනේ. පහල code එක run කරන්න main console එකේ.

sudo /opt/bitnami/ctlscript.sh restart apache

* Apache Server එක successfully restart උනාට පස්සේ, console එකේ exit කියලා type කරලා අයින් වෙන්න​.
* දැන් ඔයාගේ website එක access කරලා බලන්න. SSL active වෙලා තියෙයි

2.4 Bitnami Manage Corner Banner එක අයින් කරගමු

මේ වැඩේ හරි ලෙහෙසි. මෙන්න පියවර​
* Google Cloud > Compute Engine > VM Instance එකේ ඔයාගේ wordpress එක host කරලා තියෙන VM instance එක ඉස්සරහා තියෙන SSH කියන button එක click කරන්න.
* පහල code එක console එකේ type කරලා enter කරන්න​

sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1

* Change එක සාර්ථක වෙන්න Apache Server එක restart කරන්න ඕනේ. පහල code එක run කරන්න main console එකේ.

sudo /opt/bitnami/ctlscript.sh restart apache

* Apache Server එක successfully restart උනාට පස්සේ, console එකේ exit කියලා type කරලා අයින් වෙන්න​.
* දැන් ඔයාගේ website එක access කරලා බලන්න. Logo එක අයින් වෙලා ඇති.

මම හිතනවා මේ blog post දෙක ඔයාට උදව් වෙන්න ඇති කියලා ඔයාගේම website එකක් කරගන්න Google Cloud Free Tier එක භාවිතා කරලා. මේ එක post බලලා ඔයා website එකක් හැදුවා නම් පහල comment එකක් දාන්න අමතක කරන්න එපා.

What’s your Reaction?
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0