2011年9月28日 星期三

httpd restart出現錯誤 Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

這個問題應該是沒有在 /etc/apache2/httpd.conf 中設定 ServerName 
#vi /etc/apache2/httpd.conf
ServerName localhost

#/etc/init.d/apache2 restart

Ubuntu 如何啟動&停止 Apache2 的虛擬主機 ( Virtual Host ) ?

新增:
在 Ubuntu 上要新增虛擬主機 ( Virtual Host ),要用下面的方式來新增:
至/etc/apache2/sites-available下,新增一個檔名。
以下範例使用 mail2.awen.tw 為檔名。
# vim mail2.awen.tw
檔案內容為
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName  mail2.awen.tw                      #DOMAIN
        DocumentRoot /home/www/mailserver      #網站實體目錄
</VirtualHost>
儲存後執行
#sudo a2ensite  mail2.awen.tw
#sudo /etc/init.d/apache2 reload

停止:
直接執行以下指令
#sudo a2dissite mail2.awen.tw

即可!

群輝NAS掛載語系編碼問題解決

感謝廖哈哈提供技術經驗!

在linux上掛載smbclient時
要指定來源端的編碼和本地端的編碼
正常來說~linux的系統應該都是UTF8
但群輝的被改成big5
所以~群輝的來源端編碼~要設big5
mount -t cifs //IP/分享資源 /掛載點 [-o options]
選項與參數:
-o 後面接的參數 (options) 常用的有底下這些:
username=你的登入帳號:例如 username=smb1
password=你的登入密碼:需要與上面 username 相對應啊!
iocharset=本機的語系編碼方式,如 big5 或 utf8 等等;
codepage=遠端主機的語系編碼方式,例如繁體中文為cp950

範例:  //192.168.8.251/Backup/DataBackup       /Synology       cifs    user=xxx,password=xxxx,iocharset=utf8,codepage=uft8 0       0

Install RoundCube on Ubuntu11.04

Install RoundCube on Ubuntu11.04

2011年9月21日 星期三

Postfix 自動回信設定

vim:enc=utf8
2
----------------------------------------------------------------------------------------------------
3
原文取自:Netman
4
加入網友的一點點心得修改...
5
6
作者: Song (Song) 看板: Linux
7
標題: [文件]Vacation 自動回信程式
8
時間: Thu Oct 5 16:14:02 2000
9
10
================
11
vacation 用途簡介 :
12
13
當我們在上班日子裡,放一個特別的假期時,電子郵件依然不斷的湧入。
14
等放完假回來的時候,發現信箱中一堆抱怨的信件:「前天信件中的問題,
15
為什麼還沒有處理?...」、「昨天寄的信件到底有沒有看到?...」。
16
17
如果您有以上的問題,您就可以考慮安裝 vacation 自動回信程式。
18
19
如果您沒有以上的問題,您也可以考慮安裝 vacation 自動回信程式。
20
21
================
22
版本環境 << Red Hat 7.3 >> :
23
24
sendmail : 8.11.6
25
vacation : 1.2.6
26
27
================
28
vacation 取得 :
29
30
http://freshmeat.net/redir/linuxvacation/5880/url_rpm/vacation-1.2.6-1.i386.rpm
31
32
================
33
vacation 安裝 :
34
35
D1. rpm -Uvh vacation-1.2.6-1.i386.rpm
36
<安裝完成>
37
38
這麼快,這樣就裝好了?
39
40
hell ell的,就是這麼簡單。
41
但是還要修改設定喔 icon_smile.gif
42
43
================
44
vacation 設定 :
45
46
.forward
47
--------
48
在使用者 service 的家目錄中,新增檔案 .forward。如: /home/service/.forward
49
檔案的內容只要一行:
50
\song, "|/usr/bin/vacation song"
51
52
( 註:這個檔案要 chmod 600 .forward ,簡單說 group、other 不可有
53
write 權限。)
54
55
.vacation.msg
56
-------------
57
在使用者的家目錄中,新增檔案 .vacation.msg。如: /home/service/.vacation.msg
58
59
這個檔案就是自動回信的內容,其中可以使用寄入信件的標題及寄信人作為變數
60
使用。標題: $SUBJECT,寄信人:$FROM。其餘欄位是否也可以使用?請自行測試
61
62
範例檔:
63
Subject: Re:$SUBJECT
64
From: service ( 由 vacation 程式自動回信 )
65
$FROM 您好:
66
我目前無法看到這封信。
67
當我回來上班並看過這封信後,我會盡快給您回信。
68
謝謝。
69
70
在 man vacation 中有提到,如果要加入 Reply-To: 欄位,啟動時要加入 -r 的
71
參數。如果寄入的信件中,使用者的帳號沒有在 To: 或 Cc: 的欄位中,則不會
72
自動回信的,除非啟動時使用 -j 參數。
73
74
================
75
vacation 啟動 :
76
77
當上述設定都完成後,我們就要來啟動 Vacation 了 ...
78
如果是以 root 登入:vacation -I service
79
如果是以 song 登入:vacation -I
80
如果 .vacation.msg 中有使用到 Reply-To: 欄位:vacation -I -r song
81
82
如此會在 /home/service 底下產生一個檔案 .vacation.db 這樣就可以來測試了。
83
84
當您測試了第一封信是正確的,一高興又連測了八封,卻都沒有回應的時候,
85
先別忙著罵我,繼續看下去:
86
87
vacation 會把回過信的郵件地址存入 .vacation.db 中,同時在 7 天之中不會
88
再自動回覆相同的郵件地址。7 天是系統預設值,如要修改可在啟動時使用 -tN
89
的參數,N 是天數,如:vacation -I -r -t1 song ,這樣隔 1 天就會再自動
90
回覆相同的郵件地址了。 如果需要更短的話...可以自動
91
92
如果為了測試,可以在自動回覆一封信後,再重新啟動一次,如此就會清空
93
.vacation.db 的資料。
94
95
================
96
vacation 停止 :
97
98
這個最容易,只要將 .forward 改名或刪除就可以了。
99
建議用改名的方式,下次假期要使用時,只要再改回來就可以了。

2011年9月20日 星期二

檢查解除Email 黑名單網址

http://www.dnsbl.info/dnsbl-database-check.php

WindowsXP 網路芳鄰分享清除記憶密碼

在命令提示字元 DOS 視窗(CMD)下的指令  net use * /del /y 就能清除之前紀錄的登入帳密資訊,再重新輸入網芳路徑 \\xxx.xxx.xxx\ 就可出現輸入帳號密碼的對話視窗,或直接輸入連線帳號的方式,指令如下:  net use /user:account \\192.168.11.250\account

2011年9月19日 星期一

ASUS GHOST RESTORE PASSWORD


Restore Windows on EEE BOX without CD/DVD drive (boot from USB falsh drive)

ASUS provides your a DVD recovery disk for your EEE BOX machine, which does not have CD/DVD drive. When something of your OS goes wrong, you have to plug in a CD/DVD drive to run the recovery DVD to get Windows recovered. It happened that I do not have a portable CD/DVD drive available. How can I install the Windows OS without pluging in a Cd/DVD drive? The answer is it is not easy but you can do it. A step by step instruction is given here.

1 Software needed

- Ultra ISO Creator Version 9 Trial  from  http://www.ezbsystems.com/ultraiso/download.htm
- A USB flash drive with at least 2 GB free space
- a XP computer with DVD drive and USB 2.0  port
- Asus EEE Recovery DVD
- Optional  (to avoid working with original DVD) : a program to create the bootable ISO of your Recovery DVD. I used  LCIsoCreator.exe  from http://www.lucersoft.com/freeware.phpPeToUSB

2 Create an ISO file from the ASUS original Recovery DVD

a ) Unzip  the  file LcIsoCreator.zip in a folder of your choice
b) Insert Asus EEE Recovery DVD into the drive
c) Launch LcIsoCreator.exe, select the DVD unit and click on  Create ISO. Type the file for your iso image , for example : EEE.iso

3a Create your bootable Asus EEE USB flash drive (using Ultra ISO)

a) Install Ultra ISO with default settings
b) Launch UltraISO, click on Continue to Try ..
c) If you decided to work using an iso image instead of the physical DVD mount the iso image on a virtual DVD (Tools / Mount to drive  (F6)). You can  also mount it using another tool such Daemon tool if you prefer it.
d) From menu select  File / Open CD/DVD e select the DVD drive of the Asus EEE Recovery DVD (physical or virtual depending on your previous choices)
e) Insert your USB pen into an USB port
f) From menu select Bootable  / Write Disk Image. on Disk Drive select the USB pen drive, on Image File you should have already the DVD drive, on Write Method select USB-HDD.
g) Click on Xpress Boot and wait the image creation. It will take about 30 minutes

3b Create your bootable Asus EEE USB flash drive (using PeToUSB)

a) Unzip PeToUSB to a folder
b) Connect a USB Flash Drive with at least 2GB of storage to your PC and start PeToUSB
c) The USB flash drive should show up under Destination Drive. Check USB Removable, Enable Disk Format and Enable File Copy
d) Finally browse to the Source Path of the EEE.iso created in the second step
e) Click “Start” button and answer the following two questions “Continue?” with “Yes”. All existing volumes and data will be lost!
Depending on the write speed of your USB Flash drive it may take a while to copy all EEE.iso files.
f) If everything goes well, the message “Operation Completed Successfully!” should appear. Click “OK” and close PeToUSB.

4 Modify WINPE.ISO to Choose Symantec Ghost as start application

a) Use Ultra ISO open WINPE.ISO on the USB falsh drive
b) Navigate to I386\SYSTEM32\ and find WINPESHL.INI
c) Extract this file to your hard drive
d) Open the file WINPESHL.INI and change …
[launchApp]
AppPath=x:\EPCRecover.exe
… to …
[launchApp]
AppPath=x:\GHOST32.EXE
… and save the changes
e) Copy this file back to I386\SYSTEM32\ in UltraISO
f) Save your modification to the USB flash drive
In addition, please also copy all content in the ASUS drive CD to the USB flash drive. You need it once the Widnows is installed.

5 Recovery process

a) Connect the USB Flash Drive to your Eee PC and turn on the Eee
b) Press “Delete” at the boot screen and you will be able to open BIOS setup page
c) Go to Boot tab and set the Hard Drive to USB flash and set it to first priority drive
d) After booting from USB Flash Drive, WinPE (Windows Preinstallation Environment) should start and finally Symantec Ghost
e) Click “OK” and then “Local > Disk > From Image”. From the pulldown menu on the top choose your USB Flash Drive. It should be drive X:, because Windows assigned this drive letter during boot up. From here you can choose the image file ASUS.GHO.
f) Now you have to select the destination drive. Of course this should be the Eee BOX hard drive
g) The next window will show you the destination drive details. Here you can change the partition layout or just click “OK” to keep the default settings.
h) The ghost image ASUS.GHO was password protected. You have to use the password “mbrcd” to proceed. There will be one last question “Proceed with disk restore?”. If you click “Yes”, the process will be started

6 Install and setting your Windows

It was a big pain to install Windows and set up all things. It took hours to complete. After Windows installation is done, you can navigate the ASUS drive folder on your USB flash drive and start the setup program. It will automatically install all drivers for you.
Now it is time to enjoy your brand new EEE BOX.