安裝 tftp server
apt install tftpd-hpa

安裝 tftp client
apt install tftp

編輯設定檔
vi /etc/default/tftpd-hpa

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"

調整tftp 資料匣權限
chown -R tftp:tftp /srv/tftp

測試下載
tftp 192.1681.1.1 
tftp> get 234.txt
Received 5 bytes in 0.0 seconds

測試上傳
tftp> put 123.txt
Error code 1: File not found

解決方式:
touch /srv/tftp/123.txt ; chown tftp:tftp /srv/tftp/123.txt

再次測試上傳
tftp> put 123.txt
Error code 2: File must have global write permissions

解決方式:
chmod o+w /srv/tftp/123.txt

再次測試上傳
tftp> put 123.txt
Sent 9 bytes in 0.0 seconds

成功,但納悶 123.txt 的owner 和 tftp 的身分都一樣,為什麼沒權限上傳,沒時間研究,先醬

文章標籤

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

redmine top-menu 預設字型很小很小,如果要調整上方字型的大小
cd ./redmine/public/stylesheets
vi application.css

#top-menu {background: #3E5B76; color: #fff; height:1.8em; font-size: 0.8em; padding: 2px 10px 0px 12px;}
將紅字部分改成 1.2 我覺得就很合適了

調整 redmine 最上方列表文字大小

文章標籤

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

測試環境: docker + apache base

root@hellowordl:/home/nextcloud# docker exec --user www-data <CONTAINER ID> php occ config:system:set twofactor_enforced false
System config value twofactor_enforced => false set to empty string
 

文章標籤

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

下載位址:
https://community.arubainstanton.com/blogs/jamie-easly1/2021/11/01/instanton1960switchsoftwareportal?CommunityKey=26af222f-d9da-43cb-a665-cba6c273756c

若出現以下訊息
Operation Type
Update
File Type
Backup Image
Status
Operation Failed
Error
Copy: Version too old, downgrade prevented.

請將下載下來的zip 解壓縮,僅上傳 *.wsi 即可

升級 aruba 1960 10g switch 韌體

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

測試環境
docker: Base version - apache + mariadb

root@helloworld:~# docker ps
CONTAINER ID   IMAGE          COMMAND                  CREATED      STATUS      PORTS                  NAMES
846abceb2e61   nextcloud      "/entrypoint.sh apac…"   2 days ago   Up 2 days   0.0.0.0:8080->80/tcp   nextcloud-app-1
ab2fb11739b8   mariadb:10.6   "docker-entrypoint.s…"   2 days ago   Up 2 days   3306/tcp               nextcloud-db-1

root@helloworld:~# docker exec -it nextcloud-app-1 bash

root@846abceb2e61:/var/www/html# runuser -u www-data php /var/www/html/occ user:resetpassword admin
Enter a new password:
Confirm the new password:
Successfully reset password for admin
root@846abceb2e61:/var/www/html#
 

文章標籤

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

用AD帳號 登入windows 時,如果出現以下錯誤訊息
此工作站和主要網域間的信任關係失敗

解決方式:
使用本機帳號登入
確認系統時間與AD DC 之間是否有時間差
時間調整一致,登出再用AD 帳號登入測試是否成功
 

文章標籤

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

手動更新時間,出現以下錯誤訊息
root@lab:~# timedatectl set-time 11:55:12
Failed to set time: Automatic time synchronization is enabled

關閉 ntp 自動校時
root@lab:~# timedatectl set-ntp no

重新手動更新
root@lab:~# timedatectl set-time '2023-09-19 11:58:30'

root@lab:~# date
Tue 19 Sep 2023 11:58:31 AM CST
 

文章標籤

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

找到 httpd-ssl.conf 
每個版本路徑可能不大一樣,要自行找一下

找到以下關鍵字
SSLProtocol all -SSLv3
調整成
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1

存檔,重啟 apache 

可用 nmap 工具測試
nmap --script ssl-enum-ciphers -p 443 example-server
 

文章標籤

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

報告內容

Summary
The remote SSH server is configured to allow / support weak host
key algorithm(s).
Detection Result
The remote SSH server supports the following weak host key algorithm(s):

文章標籤

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

如果你習慣的預設瀏覽器是 google chrome 
但每次透過outlook 開啟連結時,系統卻預設幫你用 microsoft edge 開啟

文章標籤

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

(建立新的檔案系統)
zfs create testpool/data1

文章標籤

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

大約就在今年8/10 左右
更新 adobe pdf reader 之後
透過填寫和簽署新增輸入文字並存檔後
再次打開文件,文字就變成框框+叉叉

文章標籤

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

exchange online 的通訊群組清單,類似 postfix, sendmail 的 aliases
寄信時不用一個一個增加收件者
該收件者帳號收到信時,可以自動轉寄給特定或多位使用者
常用於部門群組信箱,或專案用信箱

文章標籤

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

假設你要寄信給 it部門
其成員有: bill , john , peter , mary
除了收件者欄位一個一個慢慢選
還可以設定一個部門信箱,如 it@xxx.com.tw

文章標籤

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

在cmd 下指令
net user loginname /domain
即可顯示密碼到期日

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

image
設定 > 時間與語言

文章標籤

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

登入後點擊右上角帳號圖示 > Configuration > Backup

文章標籤

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

Fortigate 的 SPAN (Switch Port Analyzer) 也就是常聽到的 port mirror

文章標籤

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

下載 livecd 開機

mount /dev/sda1 /mnt

文章標籤

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

指令: 
# 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

文章標籤

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

以前如果想讓linux 系統在重啟後,自動執行某些程式的話
習慣會把要執行的 scripts 加入 /etc/rc.local
其實crontab 也有相同的功能

文章標籤

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


修改 ./wp-includes/functions.php

文章標籤

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

如果nagios 發現異常要發送警告信給管理者
本機必須要有postfix或sendmail 之類的MTA

文章標籤

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

# apt-add-repository contrib
-bash: apt-add-repository: command not found

文章標籤

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

apt-get -y install 套件名
只會幫你一次安裝好套件
但如果中間出現對話框,還是會卡住

文章標籤

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

相關 OID
1.3.6.1.4.1.12356.101.4.1.3 : CPU使用率,單位 %
1.3.6.1.4.1.12356.101.4.1.4 : 記憶體使用率,單位 %

文章標籤

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

網路上文章通常只跟你講到第一個步驟
如果還是無法抓到 snmp 資料的話,請試試第二個步驟是否有設定

文章標籤

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

系統運作一陣子後
如果發現swap 空間不足,但沒有空的 partition 或是沒有新增硬碟的打算
可以新增一個 swap file 來增加 swap空間

文章標籤

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

有些人的解法是修改 docker 的iptables 設定,但可能會衍生出其他問題
所以建議以下作法

文章標籤

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

1. 把現有的images 存成 tar 格式
# docker save -o hello_world_nginx.tar hello_world_nginx

文章標籤

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

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼