- 為了保持系統安全性還有套件升級,除了用 crontab 自己設定之外,也有些方便的套件可以幫你完成喔~安裝 yum-cron 就搞定了
yum -y install yum-cron systemctl start yum-cron systemctl enable yum-cron
建議把修改 /etc/yum/yum-cron.conf把update_cmd = default
改成update_cmd = security
這樣就只更新安全性,避免因為套件升級造成其他的問題Linux | 90 觀看 | 02-27 | Kuann Hung 上傳 - 如果要讓 ubuntu 系統自動更新 apt 的 package,有更簡單的方法喔~~~
apt-get install cron-apt
可以修改 /etc/cron.d/cron-apt 來調整時間vi /etc/cron.d/cron-aptMAILON="always"
Linux | 108 觀看 | 02-21 | Kuann Hung 上傳 - 直接上指令!
yum -y install dnf yum -y install yum-utils yum-config-manager --disable 'remi-php*' yum-config-manager --enable remi-php82 dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm dnf remove -y php php-* dnf install -y php php-opcache php-cli php-common php-devel php-fpm php-gd php-imap php-mbstring php-pecl-mcrypt php-opcache php-pdo php-xml php-snmp php-soap php-tidy php-mysqlnd php-pear php-bcmath php-pecl-zip php-imagick php-geoip
PHP | 216 觀看 | 2022-12-24 | Kuann Hung 上傳 最近發現硬碟空間越來越少 (2T SSD 竟然剩下不到 100G),覺得很奇怪,所以就來查找一下看看到底花生蛇魔術!
赫然發現,有一個用很久的 VM 開發環境竟然佔用了 800GB,看來是 snapshot 累積太久,砍掉 snapshot 然後再 compact 一下就搞定!跑了很久之後,燈燈,竟然還有 600GB......進去 vm 的 linux 中,把已經停掉的 container,不用的 images 都刪一刪,prune 一下,用 du -d 2 / 找一下看看那些東西有占用全部清一清之後,用 df 看不到 100G 了,嗯,再來 compact 一下.... 燈燈.... 還是占用 600GB.....只好請 google 大神出馬,原來,要透過 vmware-tool 去 shrink 一下,相關的指令很簡單vmware-toolbox-cmd disk shrink /
跑了好一陣子,就搞定囉!!~~如果 vm 空間高居不下,可以這樣就解決喔!~其他 | 221 觀看 | 2022-12-24 | Kuann Hung 上傳- 有時候 server 丟在那邊沒有定時去看,往往會忽略一些 security updates 或是 套件的 patch 沒有執行造成安全問題。所以透過系統自動更新是一個比較方便的做法!Linux | 354 觀看 | 2022-07-10 | Kuann Hung 上傳
rpm -ivh https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm # PostgreSQL 11 yum -y install postgresql11-server postgresql11-contrib # init db /usr/pgsql-11/bin/postgresql-11-setup initdb # enable / start systemctl enable postgresql-11 systemctl start postgresql-11
Linux | 464 觀看 | 2022-05-24 | Kuann Hung 上傳- Ref:
- Cloud Armor Preconfigured WAF Rules Codelab
https://codelabs.developers.google.com/codelabs/cloudnet-ca-waf-rules#0 - Google Cloud Armor custom rules language reference
https://cloud.google.com/armor/docs/rules-language-reference - Tuning Google Cloud Armor WAF rules
https://cloud.google.com/armor/docs/rule-tuning
Linux | 1034 觀看 | 2022-02-11 | Kuann Hung 上傳 - Cloud Armor Preconfigured WAF Rules Codelab
- Modern work -- from waiting tables to crunching numbers to designing products -- is about solving brand-new problems every day, flexibly and collaboratively. But as Yves Morieux shows in this insightful talk, too often, an overload of rules, processes and metrics keeps us from doing our best work together. Meet the new frontier of productivity: cooperation.數位學習 | 429 觀看 | 2022-01-28 | Kuann Hung 上傳