Skip to content

Zeroplex 生活隨筆

軟體開發和生活瑣事

小 縮小字型大小。 中 重設字型大小。 大 放大字型大小。

標籤: Linux

Ubuntu 上 LNMP 的 PPA

Posted on 2022 年 2 月 14 日2022 年 2 月 14 日 By 日落 在〈Ubuntu 上 LNMP 的 PPA〉中尚無留言

default packages 更新速度比較慢,所以後來都改用 3rd-party 的 PPA 來裝 LNMP 環境。

以 PHP 來說的話,主要會以 oerdnj 的 PPA 為主:https://launchpad.net/~ondrej/+archive/ubuntu/php

其他則是:

  • Nginx https://launchpad.net/~nginx/+archive/ubuntu/stable
  • Redis https://launchpad.net/~redislabs/+archive/ubuntu/redis

MySQL / Percona / MariaDB 更新、patch 速度沒那麼快的,則是直接使用預設的 packages 來安裝。

Tags:Linux, MySQL, Nginx, PHP, 網路架站

Kali Linux Undercover Mode

Posted on 2022 年 2 月 11 日2022 年 2 月 11 日 By 日落 在〈Kali Linux Undercover Mode〉中尚無留言

在 Kali Linux 找工具的時候,看到一個功能叫做「Undercover Mode」:

(大圖)

點一下後,發現整個螢幕上所有的東西都自動換成和 Windows 幾乎一模一樣的布景主題,甚至連 terminal 都也不放過 XD

(大圖)

不曉得是不是什麼復活節彩蛋。

後來想要還原時,找不到什麼「no-cover」或是「upper-cover」之類的東西,連系統布景主題的設定怎麼改都改不回來,索性把 ~/.config 砍掉重新開機 (當然還是死)。

最後才發現重新點擊 Undercover Mode 第二次,所有的環境設定就會馬上被還原 XD

Tags:Linux, XD

btop system monitor

Posted on 2022 年 2 月 3 日2022 年 2 月 3 日 By 日落 在〈btop system monitor〉中尚無留言

一樣是 top 系列的 system monitor,支援 theme 卻又不像 glances 那麼吃運算資源:

圖:用 btop 看被壓力測試的 Pi 4 狀況 (看大圖)

預設畫面就可以看到整台機器大致狀況,甚至連處理器溫度和時脈都抓出來了,操作複雜了一點,但應該可以一次頂替掉不少監視工具。

btop Github: https://github.com/aristocratos/btop

Tags:Linux

Ubuntu 20.04 Failed to Change Password while Using cloud-init

Posted on 2022 年 1 月 22 日2022 年 2 月 22 日 By 日落 在〈Ubuntu 20.04 Failed to Change Password while Using cloud-init〉中尚無留言

Cloud-Init should allow you to modify password after first time login. But if SSH closed while changing password:

WARNING: Your password has expired.
You must change your password now and login again!
Changing password for ubuntu.
Current password:
passwd: Authentication token manipulation error
passwd: password unchanged
Connection to 192.168.0.102 closed.

There might be Cloud-Init issue in older version.

There is a workaround to by-pass force passwd. Find /boot/firmware/user-data in the boot partition, then you will see options:

# On first boot, set the (default) ubuntu user's password to "ubuntu" and
# expire user passwords
chpasswd:
  expire: true
  list:
  - ubuntu:ubuntu

Update expire to false if you do not want to change password in first login. Or create your own username/password in list if expire is not work.

Please notice that device is not safe using default user name and password. Change it after you connect to the device.

Tags:Linux, Raspberry Pi, Ubuntu

SSH 發送指令至遠端主機發生 terminal error

Posted on 2022 年 1 月 14 日2022 年 1 月 14 日 By 日落 在〈SSH 發送指令至遠端主機發生 terminal error〉中尚無留言

若不想開啟 teminal 而只想透過 SSH 擷取 remote server 的指令執行結果,可以直接這樣做:

ssh user@your.domain \
    ls /var/run/reboot*

不過有些指令會使用 TTY 繪製圖形、顯示特定格式,這時就會出現錯誤訊息:

Error opening terminal: unknown.

例如我在 remote server 執行 watch 指令就會遇到這個錯誤。

已知可以透過參數 -t 來解決這個問題:

ssh -t user@your.domain \
    watch -n 2 tail /var/log/kern.log
Tags:Linux

文章分頁

上一頁 1 ... 11 12 13 ... 33 下一頁

其他

關於我  (About me)

  文章 RSS Feed

  留言 RSS Feed

Apache AWS Bash C/C++ Docker FreeBSD GCP Git Google Java JavaScript Laravel Linux Microsoft MSSQL MySQL Nginx PHP PHPUnit PostgreSQL Python Qt Raspberry Pi Ubuntu Unix Vim Web Windows XD 作業系統 分享 好站推薦 專題 攝影 新奇搞笑 新聞 旅遊 生活雜記 程式設計 網路架站 網頁設計 資訊學習 資訊安全 遊戲 音樂


創用 CC 授權條款
本著作係採用創用 CC 姓名標示-相同方式分享 4.0 國際 授權條款授權.