Selawat yang ringkas, yang mana apabila kamu membacanya satu kali sebanding 100 ribu kali, jadi kamu tinggal membaca 3 x kali saja sudah sebanding 300 ribu kali…
Selawat yang ringkas, yang mana apabila kamu membacanya satu kali sebanding 100 ribu kali, jadi kamu tinggal membaca 3 x kali saja sudah sebanding 300 ribu kali…
Let’s say, you have setup a new server which is running either Ubuntu 20.04 or Centos7.9
And while setting up cron, you notice the date time need to be offset correctly to have the actual time locally.
How about we just change the server to use local timezone altogether.
Here is how to do it.
Firstly, check first if the timezone list already updated.
Step1 : Check current setting by issuing the following command.
timedatectl
example output: (if UTC)
Local time: Sun 2022-03-13 12:46:47 UTC
Universal time: Sun 2022-03-13 12:46:47 UTC
RTC time: Sun 2022-03-13 12:46:47
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Step2: Check the actual timezone string required for Kuala Lumpur
timedatectl list-timezones|grep Asia|grep Kuala
..
Asia/Kuala_Lumpur
Step3: Set to the target timezone above Asia/Kuala_Lumpur
sudo timedatectl set-timezone Asia/Kuala_Lumpur
Step4: Re-check again
timedatectl
example output:
Local time: Sun 2022-03-13 20:49:41 +08
Universal time: Sun 2022-03-13 12:49:41 UTC
RTC time: Sun 2022-03-13 12:49:41
Time zone: Asia/Kuala_Lumpur (+08, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
Step 5: restart crond , httpd and check the logs
sudo service crond restart
sudo service mysqld restart
Step 6: Check logs
tail -f /var/log/apache/access.log
example:
52.77.255.203 - - [13/Mar/2022:20:36:44 +0800] "GET //i.php HTTP/1.1" 404 10072 "-" "python-requests/2.27.1"
52.77.255.203 - - [13/Mar/2022:20:36:44 +0800] "GET //infos.php HTTP/1.1" 404 10080 "-" "python-requests/2.27.1"
52.77.255.203 - - [13/Mar/2022:20:36:44 +0800] "GET //linusadmin-phpinfo.php HTTP/1.1" 404 10106 "-" "python-requests/2.27.1"
52.77.255.203 - - [13/Mar/2022:20:36:44 +0800] "GET //dashboard/phpinfo.php HTTP/1.1" 404 10104 "-" "python-requests/2.27.1"
Done.
In some cases, you may want to run the Docker build using the extra resources.
Instead of hogging the laptop RAM and CPU while it is building the docker images.
With docker machine, you are now able to do it pretty much quickly.
Here are the step:
That’s it!
After months of lock down in Kuala Lumpur due to COVID-19 movement control order (MCO)
The situation of daily infection still on the rise.
It actually goes up compared to before the lockdown.
And because of the lockdown, most of us are staying home and continue working from home whenever possible.
But there are still essential services that are allowed to go to work.
And to support that, everyone is also affected.
No more trips to the beach.
No more trips to recreation areas with kids.
Some healthcare workers are experiencing a higher workload compared to before the crisis.
Not all immediate family members for these front liners are fully vaccinated yet.
Priorities between family time and working stuff are now mixed up.
No work, no money to put food table for families.
Work from home sometimes the boundary are blurred a bit.
anyway, you still got to survive one after another wave from time to time.
Goodluck Malaysian.
I was wondering if this one already supported out of the box.
But somehow, on my setup, it was not that case.
I can access ipv6 network on router, but not on my own machine behind it.
Here is what I do to change that.
First, change the DNS IPv6 to a server. (optional)
Check if the router can already connect to ipv6 on its own,
by using Maintenance -> ping6
Check the eth1
interfaces.
Then, change the DHCPv6 relay.
Then, reconnect your eth1
connection to internet
So that, the intended setting will become like this.
Then, reconnect your laptop wifi (renew DHCP lease), ensure the laptop setting also allowed IPv6 ip assignment.
On mac, check the one under Advanced
Once, all OK, you can then check with the Iterm2
or terminal.
ping6 ipv6.google.com
or
ping6 blog.namran.net
yay !
Goodluck.
other refs from TM itself: https://www.tm.com.my/OnlineHelp/CustomerSupport/Documents/Guideline%20to%20Enable%20IPv6.pdf
Akhirnya terjawab sudah pertanyaan yang ingin diketahui oleh ramai pihak.
PKP 2.0 disambung lagi 2 minggu, sehingga 18 Februari 2021.
Dengan jumlah kes harian masih pada peringkat tertinggi, sepanjang PKP 2.0 beberapa hari telah mencatatkan rekod baru. 5 ribu dan keatas.
Adakah kerana SOP (standard operating procedure) kali telah menjadi longgar?
Kebanyakan jangkitan adalah di tempat kerja.
Masih banyak sektor dianggap sebagai kritikal dan dibenarkan berfungsi seperti biasa.
Sesuatu yang agak mendukacitakan ialah, disaat rakyat jelata dikenakan pelbagai sekatan.
Namun akhirnya ada juga yang terlepas masuk dari sempadan antarabangsa.
Antaranya ialah kes dari UK.
KUALA LUMPUR: Malaysia mengesan kes pertama COVID-19 membabitkan mutasi baharu dari United Kingdom (UK) dikenali sebagai varian B.1.1.7 atau 202012/01, hari ini.
Ketua Pengarah Kesihatan, Tan Sri Dr Noor Hisham Abdullah, berkata kes terbabit dikesan pada seorang pengembara yang ada sejarah perjalanan ke UK pada Disember lalu.
Beliau berkata, pengembara berkenaan didapati positif COVID-19 pada 28 Disember lalu, dan sudah diasingkan untuk rawatan lanjut.
“Sejak Oktober lalu, Kementerian Kesihatan (KKM) melakukan pemantauan terhadap semua pengembara dari negara yang telah melaporkan kes mutasi varian UK B.1.1.7, termasuk dari UK, Belanda, Singapura, Turki, Filipina dan India.
Siapa sangka, dikala rakyat biasa masih patuh kepada SOP untuk menjalani kehidupan seharian.
Tiba-tiba terdapat kemasukan kes dari luar negara pula.
Begitu juga disaat negeri-negeri dipantai timur yang awalnya masih di zon hijau atau pun kuning.
Hanya ibunegara dan beberapa negeri yang dikategorikan sebagai zon merah.
Tetapi entah kenapa dibenarkan pula rentas daerah dan rentas negeri.
Akhirnya semua negeri dipantai mencatat sebanyak 36 Kluster baru, disebabkan kes-kes diimport dari zon merah. Yang mana terdapat pengembara yang telah pun pulang ke kampung halaman dan menjangkiti keluarga masing-masing. serta mencetuskan kluster-kluster yang akhirnya merebak ke seluruh negeri.
Akhirnya PKP (perintah kawalan pergerakan) 2.0 pun diperkenalkan dengan tempoh awal selama hanya 14 hari.
Seterusnya pada 24 Januari 2021, dibocorkan surat dari EuroCham yang mengatakan bahawa SOP yang lebih ketat akan dikuatkuasakan selepas 4 Februari 2021.
SHAH ALAM – [DIKEMASKINI] Kerajaan dijangka menguatkuasakan Perintah Kawalan Pergerakan (PKP) lebih ketat dengan menutup hampir kesemua aktiviti ekonomi selepas 4 Februari depan jika PKP 2.0 yang sedang dilaksanakan sekarang gagal mengekang penularan Covid-19.
Amaran itu diberikan Dewan Perniagaan dan Industri Kesatuan Eropah (EU)-Malaysia (EuroCham Malaysia) dalam satu surat kepada anggotanya.
Menurut EuroCham, perkara itu dimaklumkan oleh Ketua Setiausaha Kementerian Perdagangan Antarabangsa dan Industri (Miti), Datuk Lokman Hakim Ali ketika bermesyuarat bersama EuroCham.
“Beliau (Lokman) memberitahu bahawa Kementerian Kesihatan Malaysia (KKM) membuat pendirian jelas tentang penutupan sepenuhnya ekonomi.
“Sebanyak 99 kluster Covid-19 di Malaysia berkait dengan sektor pembuatan dan KKM percaya sektor ini antara punca utama kepada jangkitan,” katanya dalam satu kenyataan pada Ahad.
Mengulas lanjut EuroCham berkata, sektor pembinaan turut dikategorikan sebagai punca penularan jangkitan Covid-19.
Bagaimanapun katanya, perkara itu hanya dibincangkan secara ringkas kerana ia bukan di bawah bidang kuasa Miti.
“Miti merayu kepada semua syarikat asing dan tempatan untuk berusaha mengurangkan dan memutuskan rantaian jangkitan bagii memastikan ekonomi terus dibuka untuk perniagaan,” katanya.
Menurut EuroCham, pihaknya juga akan bekerjasama dengan Miti untuk menggariskan beberapa langkah memandangkan asrama pekerja dan aktiviti berkaitan seperti pengangkutan dan sosial dikenal pasti sebagai punca masalah.
Katanya, syarikat dalam sektor berkenaan akan melantik sekurang-kurangnya seorang wakil daripada bahagian sumber manusia untuk menyelaras pekerja dan pekerja asing di asrama bagi mengurangkan pergerakan dan aktiviti sosial.
“Syarikat perlu bertanggungjawab terhadap pengurusan pekerja asing atau perumahan mereka yang dilantik melalui agensi.
“Ada kes membabitkan keadaan rumah teruk dan pengangkutan tidak mematuhi prosedur operasi standard (SOP) sehingga menyebabkan kadar jangkitan meningkat,” katanya.
Dalam pada itu, EuroCham berkata, syarikat terbabit juga disaran menyediakan ruang kuarantin asas di asrama bagi memastikan kes di bawah pemantauan, kontak rapat dan kes positif boleh diasingkan.
“Syarikat juga perlu memastikan jumlah pekerja dalam setiap kenderaan pekerja di bawah 50 peratus kapasiti bagi memastikan penjarakan fizikal,” katanya.
Artikel Penuh : https://www.sinarharian.com.my/article/120652/BERITA/Nasional/Surat-Eurocham-Penutupan-penuh-ekonomi-jika-kes-Covid-19-tak-turun
Walaubagaimanapun, selepas mendapat reaksi yang agak mengejut dari rakyat jelata di media sosial dan sebagainya. Akhirnya Ketua Pengarah Kesihatan mengeluarkan kenyataan dibawah.. https://www.bharian.com.my/berita/nasional/2021/01/779877/pkp-hingga-4-februari-tidak-akan-disambung
PKP hingga 4 Februari, tidak akan disambung
Oleh Rafidah Mat Ruzki dan Luqman Arif Abdul Karim – Januari 25, 2021 @ 9:11pm
PUTRAJAYA: Perintah Kawalan Pergerakan (PKP) di seluruh negara, kecuali Sarawak yang dijadual berakhir pada 4 Februari ini, tidak akan dilanjutkan.
Ketua Pengarah Kesihatan, Tan Sri Dr Noor Hisham Abdullah, berkata keputusan itu diambil bagi mengelak kesan negatif terhadap ekonomi negara, susulan pelaksanaan PKP.
Sehubungan itu, katanya, PKP yang dijadual berakhir pada 4 Februari ini akan disambung dengan pelaksanaan Perintah Kawalan Pergerakan Bersyarat (PKPB).
“PKP pada asalnya dijadual untuk dilaksanakan dalam tempoh dua minggu (sejak 13 Januari lalu) dan kesan pendekatan ini memerlukan masa.
“Justeru, kita lanjutkan sehingga Februari, tetapi kita tak nak panjangkan PKP kerana beri kesan terhadap ekonomi. Kita kena seimbangkan kepentingan ekonomi dan kesihatan.
“Kalau kita laksanakan PKP selama empat minggu, sampai awal Februari, ia kemudian disusuli PKPB bagi tempoh tiga bulan akan datang.
“Menerusi pendekatan ini, dijangka pada Mei, kita akan dapat turunkan kes (kadar jangkitan harian) kembali ke dua angka,” katanya pada sesi taklimat bersama media yang diadakan secara dalam talian, hari ini.
Dan hari ini, sehari selepas 1 Februari 2021 (Hari cuti umum sempena Hari Wilayah), diumumkan pula PKP 2.0 disambung lagi sehingga 18 Februari 2021.
Apapun, semoga segalanya kembali pulih seperti sediakala ataupun lebih baik.
Let’s say you have an account in Amazon Web Services (AWS) and got some instance running under an Elastic Container Services (ECS).
You had it running OK, until suddenly got the bills charging for the CloudWatch usage.
You go in the AWS console and checked the way to disable the Container Insight for the running ECS, and found out there is no button for that.
And need to use aws-cli command as below to disable it.
aws ecs update-cluster-settings --cluster ${clustername} --settings name=containerInsights,value=disabled --region ${AWS_REGION}
And then realised you don’t have aws-cli to run in local at the moment.
Here is how to install the aws-cli in the local machine and get the AWS_SECRET_KEY for the first time.
You start to install it with the following instruction.
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target
Then verify the installation is correct with
which aws
it correct it would return the following string
/usr/local/bin/aws
and also
aws --version
aws-cli/2.1.13 Python/3.7.4 Darwin/19.6.0 exe/x86_64 prompt/off
After that you need to configure it for the first time using the following command
aws configure
it will prompt to enter the AWS ID, AWS SECRET KEY and region.
You can find this information from the AWS IAM -> Roles -> Security Credentials.
Once logged,
it will create a file under the following folder
~/.aws/config
[default]
region = Singapore
output = json
~/.aws/credential
aws_access_key_id = xxx
aws_secret_access_key = yyyy
after that you can use to disable the container insight with the following command
export AWS_REGION=ap-southeast-1
export clustername=wp-namran
aws ecs update-cluster-settings --cluster ${clustername} --settings name=containerInsights,value=disabled --region ${AWS_REGION}
response
Verify again at the console.
Done, that’s all for now.
refs:
https://docs.aws.amazon.com/cli/latest/userguide/cli-services-iam-create-creds.html
https://ecsworkshop.com/container_insights/cleanup/
I came across the following idea recently.
How to setup and host wordpress website using one of auto-scaling infrastructure provided in Amazon Web Services. Which can be described as below:
It called Elastic Cluster Services (ECS) which come with the Task Definition and Services setting then can be setup to has some part exposed to outside world via Application Load Balancer (ALB).
The database is running on Amazon Relational Database Service (RDS).
The user uploaded images is hosted on Amazon Simple Storage Service (Amazon S3) combined with a wordpress plugin called WP Offload Media Lite. While the whole wordpress codebases is stored on Elastic Filesystem (EFS) then mounted via Network File System (NFS) on each instance.
And all these are available for FREE because it is part of AWS Free Tier.
(first one year).
Except if you somehow scaled the Amazon Elastic Compute Cloud (Amazon EC2) in “ECS
Roughly, here is the receipt on how to setup ECS with RDS, EFS and S3 that would work with vanilla wordpress.
1. Setup a new AWS account (so that you will be eligible for the Free Tier)
– this will need a new credit card that can be charged on overseas.
– I opted to a call from AWS to verify the contact number instead of the SMS.
2. Setup the VPC that split between “Public Subnet” and “Private Subnet”
– Because you will not wanting any of your ECS task being assigned a Public IPv4 address upon spinning up.
3. Setup Subnets and its NAT Gateway for the privates ones.
– you will need at least two of them each, to support the High Availability Zone.
4. Setup RDS with the internal access only allowed.
– set with security group that allow connection to 3306 port
– from your defined subnets.
– I just select MySQL 8.0.21 for the version running on t2.micro/10Gb (Free Tier)
5. Setup S3 bucket
– that will sit in the public subnet and allowed public access to its.
6. Setup EFS
– I just set the minimal size for this as per Free Tier.
– this should sit in the private subnet and allowed only your private subnets IPs to access it.
7. Create an IAM policy roles
– that will be able to use S3 and EFS infrastructure.
– should be able to read/write the S3 bucket
– should be able to mount/read/write the EFS
8. Setup Application Load Balancer for port HTTP and HTTPS (port 80/443)
– the target should be IPs on the ECS instances -> Task.
9. Setup the ECS Cluster infra
– Set it to be tied to your VPC and Subnet (public)
– For this one I just select t2.micro
– for the setup, you want to tied this your public subnet first instance to ensure everything can
be connected.
– set to run with key/pair for SSH access in cases need to debug it.
10. Setup the ECS’s Task definitions.
– here you should be able to add the EFS endpoint and mount it to “/var/www/html”
– Set the image source to point to wordpress:latest
– Define the working directory to “/var/www/html”
– Define the Docker variable of WORDPRESS_DB, WORPRESS_HOST, etc
11. Setup the Service from the Task.
– Here will be set the option to point to Application Load Balancer.
– that will be updated with latest target whenever new task is running.
12. Setup the security group for the ALB
– Set the certificates for the HTTPS
– and allow public access to it. port 80 and port 443.
Happy Malaysia Day !
Today is 16 September 2020.
We are still in the middle of Recovery Movement Control Order (RMCO)
which is has been extended to 31st December 2020.
It meant will be only might be fully lifted next year, 2021.
Take care everyone!
I come across an useful tool to monitoring web application performance — newrelic.com
It come very handy to find the root cause for the bottleneck issue in one of our PHP application. I managed to pinpoint where exactly the root cause of the problem from the useful graph of the newrelic dashboard.
If you are familiar with xdebug tool which can be used to drill down the function being called that lead to the highest load or waiting time.
Newrelic dashboard APM offer almost similar thing, but the different is almost realtime with the agent installed on the application host.
In order to install the newrelic agent, firstly you need to register an account in newrelic.com
Luckily they had just offered FREE access for minimal dashboard.
previously it had trial 14-days. the detail are as below.
You can head to their website to find out their features and sign up for its free access.
After signup you can then find the license_key that will be needed for the infra agent setup.
Sample of installation step for the centos or redhat based OS would be as simple as below:
# Create a configuration file and add your license key
echo "license_key: xxxxx" | tee -a /etc/newrelic-infra.yml |
echo "license_key: xxxxx" | tee -a /etc/newrelic-infra.yml
# Create the agent’s yum repository \
<
curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo |
curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo
# Update your yum cache
yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' |
yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
# Run the installation script
yum install newrelic-infra -y |
yum install newrelic-infra -y
then just start it. and after few minutes of traffic, you can start analysing the result in the newrelic dashboard.
Goodluck!
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |