登入後點擊右上角帳號圖示 > Configuration > Backup
目前分類:系統管理 (432)
- Jul 07 Fri 2023 16:40
備份fortigate 防火牆設定
- Jul 06 Thu 2023 17:20
Fortigate 防火牆SPAN 設定
Fortigate 的 SPAN (Switch Port Analyzer) 也就是常聽到的 port mirror
- Jun 27 Tue 2023 09:27
debian linux 重新安裝 grub
- Jun 21 Wed 2023 10:04
透過 docker-compose 重啟單一個container
指令:
# docker-compose rm -s -v service_name
或是參數合在一起也可以
# docker-compose rm -sv service_name
Options:
-f, --force Don't ask to confirm removal
-s, --stop Stop the containers, if required, before removing
-v, --volumes Remove any anonymous volumes attached to containers
舉例
docker-compose.yml 內容
web_lab:
container_name: container_web_lab
image: myweb:5.5.5
depends_on:
- mysqldb
root@srv:/helloworld# docker-compose rm -sv web_lab
[+] Running 1/1
⠿ Container container_web_lab Stopped 1.5s
? Going to remove container_web_lab Yes
[+] Running 1/1
⠿ Container container_web_lab Removed 0.6s
root@srv:/helloworld# docker-compose up -d web_lab
[+] Running 2/2
⠿ Container web_db Running 0.0s
⠿ Container container_web_lab Started
- May 24 Wed 2023 10:01
透過 crontab 實現重開機時自動執行 script
以前如果想讓linux 系統在重啟後,自動執行某些程式的話
習慣會把要執行的 scripts 加入 /etc/rc.local
其實crontab 也有相同的功能
- May 24 Wed 2023 09:28
wordpress 不透過安裝 plugin 寄信
修改 ./wp-includes/functions.php
- May 17 Wed 2023 13:53
nagios 使用外部MTA 驗證寄信
如果nagios 發現異常要發送警告信給管理者
本機必須要有postfix或sendmail 之類的MTA
- May 17 Wed 2023 11:21
解決 Debian 11 找不到 apt-add-repository 指令問題
# apt-add-repository contrib
-bash: apt-add-repository: command not found
- Apr 14 Fri 2023 11:20
debian 安裝套件時,跳過對話過程
apt-get -y install 套件名
只會幫你一次安裝好套件
但如果中間出現對話框,還是會卡住
- Apr 12 Wed 2023 11:20
使用 mrtg 紀錄 fortigate cpu / memory 使用率
相關 OID
1.3.6.1.4.1.12356.101.4.1.3 : CPU使用率,單位 %
1.3.6.1.4.1.12356.101.4.1.4 : 記憶體使用率,單位 %
- Apr 12 Wed 2023 08:55
啟用 fortigate snmpd
網路上文章通常只跟你講到第一個步驟
如果還是無法抓到 snmp 資料的話,請試試第二個步驟是否有設定
- Apr 07 Fri 2023 17:11
Ubuntu 20.04.2 LTS 新增 swapfile
系統運作一陣子後
如果發現swap 空間不足,但沒有空的 partition 或是沒有新增硬碟的打算
可以新增一個 swap file 來增加 swap空間
- Mar 23 Thu 2023 11:56
解決 ufw 無法阻擋連線到 docker container 問題
有些人的解法是修改 docker 的iptables 設定,但可能會衍生出其他問題
所以建議以下作法
- Mar 22 Wed 2023 14:28
不透過 repository 搬移 docker images 到其他 hosts
1. 把現有的images 存成 tar 格式
# docker save -o hello_world_nginx.tar hello_world_nginx
- Mar 22 Wed 2023 13:53
客製化自己的 docker images
1. 建立 container
- Mar 22 Wed 2023 11:05
解決 apt update 錯誤訊息
$ sudo apt-get update
Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]
Err:1 http://dl.google.com/linux/chrome/deb stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
- Mar 16 Thu 2023 17:17
解決rsync 無法透過 ssh 同步問題
指令
rsync --list-only -e ssh backup@rsync-server::web/
- Mar 16 Thu 2023 13:14
rsync 透過 ssh 加密同步檔案
首先建立 recive 端到來源端的 passwordless ssh 登入
- Mar 10 Fri 2023 14:38
solaris 網路設定
顯示網路卡
# dladm
- Feb 16 Thu 2023 09:55
修改 symbolic link 的 owner
檔案結構如下
-rw-r--r-- 1 777 777 4 Jan 19 11:50 555.txt
lrwxrwxrwx 1 666 666 7 Feb 16 09:41 555.txt.lnk -> 555.txt
執行 chown 預設只會改變來源的 owner,也就是 555.txt
chown 888:888 555.txt.lnk
如果要變更 link 的 owner ,可以加以下參數
chown -h 888:888 555.txt.lnk