假設用 linux crontab + tar 排程備份網站資料
# tar -zcpBf /home/backup/site1.tgz /var/www/html/site1/

helloworld 發表在 痞客邦 留言(0) 人氣()

新版 ubuntu 預設沒有 netstat 工具
取而代之的是 ss 指令
如果要使用 netstat 工具
請安裝 net-tools 套件

helloworld 發表在 痞客邦 留言(0) 人氣()

假設要移動特定檔名的檔案到某個資料匣,但是因為檔案數量太多出現以下錯誤訊息
[root@example testdir]# mv test-*.log /tmp/workdir/
-bash: /usr/bin/mv: Argument list too long

helloworld 發表在 痞客邦 留言(0) 人氣()

image
以下狀況最近常發現在 FreeBSD 用戶端要讀取使用 Let's Encrypt. 憑證的網站
$ wget https://example.xx.xx/
Resolving example.xx.xx (example.xx.xx)... xx.xx.xx.xx
Connecting to example.xx.xx (example.xx.xx)|xx.xx.xx.xx|:443... connected.
ERROR: cannot verify example.xx.xx's certificate, issued by 'CN=R3,O=Let\'s Encrypt,C=US':
  Issued certificate has expired.
To connect to example.xx.xx insecurely, use `--no-check-certificate'.

helloworld 發表在 痞客邦 留言(0) 人氣()

image
發現系統出現以下錯誤訊息
Sep 30 14:12:57 s245 multipathd[601]: sda: add missing path
Sep 30 14:12:57 s245 multipathd[601]: sda: failed to get udev uid: Invalid argument
Sep 30 14:12:57 s245 multipathd[601]: sda: failed to get sysfs uid: Invalid argument
Sep 30 14:12:57 s245 multipathd[601]: sda: failed to get sgio uid: No such file or directory
Sep 30 14:13:02 s245 multipathd[601]: sda: add missing path
Sep 30 14:13:02 s245 multipathd[601]: sda: failed to get udev uid: Invalid argument
Sep 30 14:13:02 s245 multipathd[601]: sda: failed to get sysfs uid: Invalid argument
Sep 30 14:13:02 s245 multipathd[601]: sda: failed to get sgio uid: No such file or directory

helloworld 發表在 痞客邦 留言(0) 人氣()

執行 elastic search 需要有java 環境
請先確定系統環境是否已經安裝 java
$ java -version
如果沒有的話,以下步驟安裝
$ sudo apt install default-jre

helloworld 發表在 痞客邦 留言(0) 人氣()

參考資料:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
# import the MongoDB public GPG Key
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -

helloworld 發表在 痞客邦 留言(0) 人氣()

參考資料:
https://www.postgresql.org/download/linux/ubuntu/
PostgreSQL是開源的物件-關聯式資料庫資料庫管理系統,在類似BSD授權與MIT授權的PostgreSQL授權下發行。

helloworld 發表在 痞客邦 留言(0) 人氣()

image
如果你有使用 cloudflare 的cdn 功能
預設的cache 是啟用的
但是如果你目前需要頻繁更新網頁
想要看到即時的畫面,又不要不斷的清cache 

helloworld 發表在 痞客邦 留言(0) 人氣()

undefined
ubuntu 20.04 預設重開機時無法啟用 /etc/rc.local
如果要重開機後執行的話,修改方式如下
1. 在檔案的最末端加入以下三行,存檔離開
sudo vi /lib/systemd/system/rc-local.service
[Install] 
WantedBy=multi-user.target
Alias=rc-local.service

helloworld 發表在 痞客邦 留言(0) 人氣()

image
官網上提供詳細步驟
https://about.gitlab.com/install/#ubuntu
1. 安裝相關套件
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates tzdata perl

helloworld 發表在 痞客邦 留言(0) 人氣()

在shell 輸入 update-alternatives --config editor
星號標示目前預設的文字編輯器
如果要改變預設的文字編輯器,僅需要在提示欄位輸入編號即可
因為我習慣vi 的操作方式,所以我選擇3 並按enter 確認

helloworld 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。