Skip to content

Zeroplex 生活隨筆

軟體開發、伺服器和生活瑣事

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

標籤: Linux

Redmine 連 Postfix 失敗

Posted on 2013 年 11 月 1 日2021 年 3 月 12 日 By 日落 在〈Redmine 連 Postfix 失敗〉中尚無留言

Redmine server 一直沒辦法寄出異動通知,Redmine log 有記錄寄信,但沒有錯誤訊息。後來發現 Postfix log 出現一些奇怪的字樣:

postfix/smtpd[31217]: connect from localhost[127.0.0.1]
postfix/smtpd[31217]: lost connection after STARTTLS from localhost[127.0.0.1]
postfix/smtpd[31217]: disconnect from localhost[127.0.0.1]

查了一下,是因為 Postfix 檢查 TLS 失敗,所以沒辦法寄信。把 TLS 關閉即可。

/etc/postfix/main.cf:

smtpd_use_tls=no

Reference:

Problem using TLS: lost connection after STARTTLS
http://postfix.1071664.n5.nabble.com/Problem-using-TLS-lost-connection-after-STARTTLS-td58911.html

Tags:Linux, Postfix, Redmine

Linux motd

Posted on 2013 年 10 月 23 日2021 年 3 月 12 日 By 日落 在〈Linux motd〉中尚無留言

覺得輸入完帳號、密碼到 prompt 出現速度實在有點太慢,檢查了 .bashrc 發現在 bash_completion 之前,還有 script 拖到時間。

每次登入都會看到這個畫面,:

Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.9.3-x86 i686)

 * Documentation:  https://help.ubuntu.com/

  System information as of Wed Oct 23 09:35:28 CST 2013

  System load:  0.66               Processes:           163
  Usage of /:   65.8% of 46.01GB   Users logged in:     0
  Memory usage: 39%                IP address for eth0: 127.0.0.1
  Swap usage:   10%

  Graph this data and manage this system at https://landscape.canonical.com/

Last login: Wed Oct 23 09:30:26 2013 from some.where.net

除了 uptime 以外,還會有需要更新的套件數量統計,不禁懷疑是否就是統計套件更新數量在慢。

先搜尋訊息存在哪裡:

$ grep -s -r "System information" /etc
motd:  System information as of Wed Oct 23 09:35:28 CST 2013
update-motd.d/50-landscape-sysinfo:    echo -n "  System information as of "
update-motd.d/50-landscape-sysinfo:    echo " System information disabled due to load higher than $threshold"

看來是跟 motd 有關。man 一下, motd 的意思是「message of a day」,而 /etc/update-motd.d 下則是用來統計系統資訊的 script。

而 update-motd.d 的 script 是否在 login 時執行還不曉得,找個時間在繼續追。

Tags:Linux

AVG Anitvirus on Linux

Posted on 2013 年 10 月 19 日2021 年 3 月 12 日 By 日落 在〈AVG Anitvirus on Linux〉中尚無留言

Download deb package from official website:
http://free.avg.com/us-en/download.prd-alf

install it:

$ sudo dpkg avg2013flx-r3115-a6155.i386.deb

update before scanning:

$ sudo avgupdate

setup real-time protection (support only special version of Linux kernel):

$ sudo avgsetup

Scan whole system:

$ sudo avgscan /
Tags:Linux

List Disk Label

Posted on 2013 年 9 月 29 日2021 年 3 月 12 日 By 日落 在〈List Disk Label〉中尚無留言

Linux 要掛載磁碟機,通常都是使用 /dev 底下的裝置名稱:

mount /dev/sdb /media/backup

但磁碟機一多,常常會搞不清楚裝置名稱與磁碟機的對應。

Linux 上除了裝置名稱以外,有為 disk label 建立 mapping,當作掛載時的參考:

mount /dev/disk/by-label/System-Backup /media/backup

另外還有「by-uuid」、「by-path」可用。

Tags:Linux

Setting Vim from Command Line Argument

Posted on 2013 年 9 月 3 日2021 年 3 月 12 日 By 日落 在〈Setting Vim from Command Line Argument〉中尚無留言

因不同環境編碼不同,而需要從外部程式呼叫 vim 時直接設定編碼。苦想不到解法時,看到 NeoBundle 第一次執行 vim 要安裝 bundle 時,執行「vim +NeoBundleInstall」,翻了很久才找到「+」的說明文件 (天曉得為什麼要用 :h -c 才能找到文件啊 ….)

假設要在 vim 中執行「:set fileencoding=utf-8」,可以改做由 command line 執行:

vim +fileencodeing=utf-8

所以稍早在 .bashrc 裡面加了:

export SVN_EDITOR="vim +"fileencoding=utf-8 encoding=utf-8""
Tags:Linux, Vim

文章分頁

上一頁 1 ... 23 24 25 ... 32 下一頁

其他

關於我  (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 Ubuntu Unix Vim Web Windows WordPress XD 作業系統 分享 好站推薦 專題 攝影 新奇搞笑 新聞 旅遊 生活雜記 程式設計 網路架站 網頁設計 資訊學習 資訊安全 遊戲 音樂


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