顯示具有 Ubuntu 標籤的文章。 顯示所有文章
顯示具有 Ubuntu 標籤的文章。 顯示所有文章

2015年2月3日 星期二

centos 6.6 使用 msmtp 失敗記!

家用 adsl + centos 6.6

要求,外部 ip 成日變,想變動時用 mail 通知自己,順便將 log 寄出。
唔打算自設 mail server!
請大家俾d意見同方法。

2015-01-30 原來換 mint 17.1 可以。

centos 6 試足幾日都唔惦,玩到死埋機。
結果換跑道用 mint 17.1 xfce就ok。

在 mint 環境下,只要在 ~/.msmtprc 做以下兩個設定,可以發信。好滿足!
port 465
tls_starttls off

當然,我順手試埋 port 587 同 tls_starttls on 的各種組合,就只有上面的一組能行。

以下是相關的資料:


sudo apt-get install msmtp

Get:3 http://archive.ubuntu.com/ubuntu/ trusty/universe msmtp i386 1.4.31-1 [116 kB]



$ vi ~/.msmtprc
    account default
    host smtp.gmail.com
    from xxxxxx@gmail.com
    auth on
    #重點1 必須是 port 465
    port 465  
    user xxxxxx@gmail.com
    password *****************
    logfile ~/.msmtp.log
    tls on
    #重點2 tls_starttls 必須是 off
    tls_starttls off
    tls_trust_file /etc/ssl/certs/ca-certificates.crt
    logfile ~/.msmtp.log

$ echo -e "Subject: Test Mail\r\n\r\nThis is a test mail" |msmtp --debug --from=default -t xxxxxx@gmail.com

ignoring system configuration file /etc/msmtprc: No such file or directory
loaded user configuration file /home/storylai/.msmtprc
falling back to default account
using account default from /home/xxxxxx/.msmtprc
host                  = smtp.gmail.com
port                  = 465
timeout               = off
protocol              = smtp
domain                = localhost
auth                  = choose
user                  = storylai@gmail.com
password              = *
passwordeval          = (not set)
ntlmdomain            = (not set)
tls                   = on
tls_starttls          = off
tls_trust_file        = /etc/ssl/certs/ca-certificates.crt
tls_crl_file          = (not set)
tls_fingerprint       = (not set)
tls_key_file          = (not set)
tls_cert_file         = (not set)
tls_certcheck         = on
tls_force_sslv3       = off
tls_min_dh_prime_bits = (not set)
tls_priorities        = (not set)
auto_from             = off
maildomain            = (not set)
from                  = default
dsn_notify            = (not set)
dsn_return            = (not set)
keepbcc               = off
logfile               = /home/xxxxxx/.msmtp.log
syslog                = (not set)
aliases               = (not set)
reading recipients from the command line and the mail
TLS certificate information:
    Owner:
        Common Name: smtp.gmail.com
        Organization: Google Inc
        Locality: Mountain View
        State or Province: California
        Country: US
    Issuer:
        Common Name: Google Internet Authority G2
        Organization: Google Inc
        Country: US
    Validity:
        Activation time: Tue 15 Jul 2014 04:40:38 PM CST
        Expiration time: Sat 04 Apr 2015 11:15:55 PM CST
    Fingerprints:
        SHA1: 9C:0A:CC:93:1D:E7:51:37:90:61:6B:..........
        MD5:  E7:48:1D:0B:99:4A:C3:A8:31:86:E5:..........
<-- -="" 220="" br="" esmtp="" g6sm10245709pdo.76="" gsmtp="" mx.google.com="">--> EHLO localhost
<-- 250-mx.google.com="" at="" br="" service="" your=""><-- 250-size="" 35882577="" br=""><-- 250-8bitmime="" br=""><-- 250-auth="" br="" login="" plain-clienttoken="" plain="" xoauth2="" xoauth=""><-- 250-enhancedstatuscodes="" br=""><-- 250-pipelining="" br=""><-- 250-chunking="" br=""><-- 250="" br="" smtputf8="">--> AUTH PLAIN AHN0b3J5bGFpQGdtYWlsLmNvbQAyNDA0ODkxMjM0
<-- 2.7.0="" 235="" accepted="" br="">--> MAIL FROM:
--> RCPT TO:
--> DATA
<-- -="" 2.1.0="" 250="" br="" g6sm10245709pdo.76="" gsmtp="" ok=""><-- -="" 2.1.5="" 250="" br="" g6sm10245709pdo.76="" gsmtp="" ok=""><-- -="" 354="" ahead="" br="" g6sm10245709pdo.76="" go="" gsmtp="" nbsp="">--> Subject: Test Mail
-->
--> This is a test mail
--> .
<-- -="" 1422612091="" 2.0.0="" 250="" br="" g6sm10245709pdo.76="" gsmtp="" ok="">--> QUIT
<-- font=""> 221 2.0.0 closing connection g6sm10245709pdo.76 - gsmtp

2010年2月24日 星期三

(轉載)Ubuntu 9.10 安裝最新版本 Nvidia Driver on ION 系統


Ubuntu 9.10 安裝最新版本 Nvidia Driver on ION 系統


很好的一篇,可以輕鬆安裝 Nvidia driver。測試後證實有效。原文如下:

Ubuntu's repository 並沒有放入最新的 Nvidia 驅動程式 (截至目前為止這邊的 Nvidia 驅動版本為 185),要下載最新版本的,那當然就要到 Nvidia 的儲庫 (repository)來找。

下列指令除了新增 Nvidia 儲庫外,同時也安裝了最新版本的驅動程式。
  • 新增 Nvidia 官方儲庫並搜尋最新釋出 (release)的版本。
    > sudo add-apt-repository ppa:nvidia-vdpau/ppa
    > sudo apt-get update
    > apt-cache search nvidia | grep source
  • 選擇欲安裝的釋出版本。目前最新釋出為 195,隨爾後搜尋到比之更高的版號改掉即可。
    > sudo apt-get install nvidia-195-kernel-source nvidia-glx-195 nvidia-settings mesa-utils libvdpau-dev
  • Generate an xorg.conf file
    sudo nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.conf
  • Load the NVIDIA kernel module
    > sudo modprobe nvidia
重新啟動系統,至 Xwindow 桌面工作列,系統 → 管理 → Nvidia X Server Settings 查看驅動程式版本。截至目前為止 (02/23),最新釋出的版號為 195.36.03。

 
 
 

2009年12月17日 星期四

Ubuntu 的支援真的很強

作為 OS,穩定同易用是關鍵。

就系統穩定性言,Fedora 、SUSE 及 Ubuntu 都採用同系列 kernel ,甚至可以隨時換 Kernel core。穩定性應該不存在大分別。

至於「易用性」就不同了。只要用 Firefox 連到 appnr.com,甚麼軟件都 click click 安裝好。.




天呀。你叫 Windows 怎樣混下去?


  
  

Ubuntu 的 root 密碼

Ubuntu 的 root 不設 password ,原因是:令 root 不能登入系統。保安最重要。

有關保安的問題,可參考這個連結,我摘錄要點如下:

0- 若要為 root 加密碼,可打入 sudo passwd root 設定密碼,但絕不建議。

因此,要取得 root 權限,可以採用以下的方法:

1- 在 terminal 打入 sudo su - 及輸入密碼。

  storylai@storylai-desktop:~$ sudo su -
  [sudo] password for storylai:
  root@storylai-desktop:~#

2- 在 terminal 打入 sudo -i 或 sudo -s ,直接變成 root ,毋須輸入密碼。

  storylai@storylai-desktop:~$ sudo -i
  root@storylai-desktop:~#
 
3- 在 terminal 打入 sudo nautilus 及輸入密碼,叫出超強的檔案總管(nautilus)。

4- 新增 root 終端機 (極不建議)

  4-1 系統->偏好設定->主選單....在系統工具的選單中裡把root終端機打勾後關閉。
  4-2 應用程式->系統工具->root終端機。

關於 sudo 的用法,可以在 terminal 打 man sudo ,又或參考以下網頁:
  http://zh.wikipedia.org/wiki/Sudo
  
  
  

2009年12月11日 星期五

因 "Ailurus 艾樂若" 而想起

Ailurus 艾樂若 是啥? 原作者說是小熊貓,以下是網上找到的相片。



早前提及, ubun-student 是一個很好用的軟件。技術上,它是以 SCRIPTS 的形式,直接用 apt-get 來下載指定軟件,以補完 Ubuntu 中因 CD 容量及版權問題而未收錄的軟件包。

昨天,ubun-student 改名了,新名叫 Ailurus 艾樂若 !

Ailurus 艾樂若(ubun-student) 、 Lazyscripts 及 Ubuntu Tweak 是同一類的軟件包,它們之間的軟件包有重覆,亦有因側重點不同而有分別。這也體驗了「開源世界的自由精神」。

要推廣 Linux ,這是一個方向。理由是:

  1- 「騎在巨人的肩上」、「不重新發明輪子」:與其按需要整合發行版來出 CD 、DVD,倒不如以 SCRIPTS 來補完系統。

  2- SCRIPTS 讓使用者選擇何時下載何時安裝。假如仿照 moztw.org 、「嚴選十五最佳套件」或「附加元件」形式開一個網站,讓用家在下載前容易了解套件特性,「簡單」、「直觀」、「方便使用」是行銷的最基本也最重要的元素。
  
  
  
  

2009年12月8日 星期二

Ubuntu 正體中文 Wiki

朋友換成 Ubuntu 後,一直埋怨沒有資料,到下面的網站就對了。


   Ubuntu 正體中文 Wiki
 
 
 
 
 
 

2009年12月5日 星期六

Gnome 或 Lxde ???

Linux 上有數不盡的 desktop environment,我慣用 Gnome。

Lxde 是新的 desktop environment ,號稱「輕」、「快」、「省」,年多前便開始試用了。除了操作不習慣外,仍有許多無解的 bug 。

昨天(20091204),看到 Fedora 12 的Lxde 版推出 livecd,便下載玩玩。

試玩的結果是:晚上決定正式安裝了。

簡單來講,Lxde 已經很完整,操作上未發現甚麼問題,加上它很的 startbar 接近 Windows 的模式,很容易上手。

接著,我將 Ubuntu 9.10 的 desktop environment 也改為 Lxde,一句指令便完成,下載約 50 MB。

   sudo aptitude install lxde


問題來了,Lxde 可以取代 Gnome 嗎?我的看法是:

1- 兩者的操作差不多,Gnome 是各大出版商的預設安裝,使用 Gnome 較穩定,亦不用另行安裝。

2- 「快」?兩者的速度差不多。Lxde 不見得有優勢。

3- 「輕」?Lxde 一定佔優。

4- 「省」?不一定。我用 Fedora 12 及 Ubutu 9.10 輪流測試。開機後,Lxde 的系統使用約 150 MB 記憶體,比 Gnome 少不足 20 MB 。

因此,Ubuntu 9.10 下的 Gnome 仍然勝出。

順帶一提,在使用 Lxde 時,Ubuntu 仍然比定製的 Fedora-lxde 要流暢。
  
 
 
 
  
  

2009年12月3日 星期四

Ubuntu 9.10 是 2009 年最佳選擇

 
宣佈:Ubuntu 9.10 真是王道!

家中的電腦裝了 Centos 5.4 做測試。 Centos 不錯,很穩定。我用它裝了 3 個 XP 的 VM 跑,從未出什麼問題。

近期再安裝 Fedora 12,配置好了,隔天便無故不能開機。搞了三天都沒有解決。今天決定放棄了,等 13 吧!

Ubuntu 9.10 其實很穩定,網上社群活躍,資源多,
大小問題都容易解決。

打算用 Ubuntu 9.10 的桌面版來設 SERVER !

我再安裝以下兩個套件,一中一英,全部OK。
所以說 Ubuntu 9.10 真是王道!

中文:Lazyscripts

英文:ubun_student

 
 
 

2009年11月22日 星期日

ibus 問題:無法輸出中文

ibus 是 Ubuntu 新輸入法框架,
使用中有一個問題,是經常叫出了中文輸入法,
但無法輸入中文。

找到個臨時方法,
1-「ibus設定」、「選切換的熱鍵」。
2- 將有關的 CAPSLOCK 的熱鍵取消。
3- 重啟 ibus 。
4- 輸入時若無法輸入中文,按一下 CAPSLOCK 即可!
 

----- 200911120915 -----
原來已有人反映這一問題:

Comment by giftedcn, Oct 04, 2009

1.30下capslock键行为改了,不像以前直接切换到大写英文输入,相当的麻烦。 请问这个功能可以改回去么?


   
   

OS 大混戰:Ubuntu 7.10 勝出

經過近一星期的測試,Ubuntu 7.10 勝出!

「勝出」是我會在家中正式使用。僅此如止。

這次我是用 Ubuntu 7.10 64bit 。

我選用 Ubuntu 的原因很簡單,就是它「簡單」。

安裝後下載 lazyscripts ,一切由 lazyscripts 去做。

再由已安裝好的 VirtualBox 安裝 XP 及 Fedora 12 做測試。

一切都順利。 可能是 64 BIT 的關係,Ubuntu 的速度很快。滿意中。