2011年12月19日 星期一

[心得] [筆記]Ubuntu11.04桌面版安裝網頁伺服器LAMP+WebMail+FTP...

from : http://kerobbs.net/thread-17110-1-1.html


前提:就是筆記,所以幾乎不會有圖,
而且以下全部都是網路找到的資料,
故不是原創文章,特此公告。(都會給原始出處連結)
(不過,也是會有修改的地方[如果你有仔細看原始出處跟我的文章的話])
(很抱歉,我決定不翻譯了,
因為一來我翻譯的不好,二來有些東西很難翻,
但我會把一些不對的地方修正到好)

原始出處:
http://www.mysql-apache-php.com/

架設屬於你的網頁伺服器!
只需一天:快速與簡單的D.I.Y安裝

  • Apache 2 - Linux Web server (HTTP網頁伺服器)
  • MySQL 5 - MySQL Database Server (資料庫)
  • PHP 5 - PHP Scripting Language (PHP語言)
  • phpMyAdmin - Web-based database admin software. (網頁式資料庫管理軟體)
  • Webalizer - Website Traffic Analyzer (分析網站流量)
  • Mail Server - Postfix (MTA) with Dovecot IMAP/POP3 + Sasl Authentication (Mail伺服器)
  • Squirrelmail - A web based email 網頁收發MAIL(目前不清楚好不好用,從唸書到工作,
  • 接觸到的都是使用OpenWebmail,但工作時發現怎麼開啟Webmail網頁慢的要死,
  • 架完後上網查資料才知道此套軟體已六年沒維護,效能其差無比,不支援maildir故有些已更換為Horde
    裝完了,發現它(Squirrelmail)是個陽春的WebMail,無行事曆,有空改玩Horde看看)
  • VSFTP - A fast ftp server to upload files (FTP伺服器,可上傳檔案至伺服器)
  • Webmin - A freely available server control panel (網頁伺服器控制面板)
  • ClamAV - Antivirus software. (防毒軟體,可設定掃MAIL、WWW等是否有毒)
  • A Firewall using IPtables. (防火牆)

註1: Linux + Apache + MySQL + PHP/Perl 較廣為人熟知稱為 LAMP 伺服器。
註2:Apache其實應該指的是基金會名稱,它有發展很多軟體,見網址:http://www.apache.org/dyn/closer.cgi
HTTP Server只是其中一項。但目前很多人都誤為Apache指的就是HTTP Server,
其實這是錯誤的!

首先,讓我們準備一個系統,Ubuntu版本的Linux有一個最低的要求是至少有256MB的RAM可用。
任何低於最低RAM會導致很多問題,因為我們將會運行一個伺服器含有MySQL和Webmin等,
為了要正常運行的必要,需要很多記憶體。
如果你沒有足夠的記憶體在您的伺服器中,
MySQL會給你討厭的錯誤“cannot connect to mysql.sock”。


因為我對apt-get這個指令有巨大親和力,
所以我喜歡Ubuntu質基於Linux。
對一個初用戶知道這一個指令,它是如此容易安裝軟體套件,
而且你不需要擔心套件的其它依賴軟體以及配置。


如果你是透過SSH(Windows版)連進伺服器,首先下載PieTTy(作者:林弘德),
只要輸入你的伺服器的IP以root(未變更過密碼的話,請先用一般用戶再用指令sudo -i切換)登錄連進您的主機。
(故以下指令之前面皆未加sudo的原因!)
正如你可能知道,Webmin是免費提供的伺服器控制面板,
一旦我們已經完成了LAMP伺服器和郵件伺服器,
我們將會設定Webmin。
Webmin對我們的Linux機器而言更容易微調。


在開始安裝前,
先在Debian/Ubuntu中更新必要的套件更新,
使用下列指令:
  1. apt-get install update
複製代碼
第一步:Installing Apache + PHP
第二步:Installing MySQL Database Server
第三步:Mail Server Installation
第四步:Webmin - Server Control Panel
第五步:Webalizer Installation
第六步:Installing FTP Server (VSFTP)
第七步:ClamAV - Antivirus Software
第八步:Quick IP Tables Firewall
第九步:PHP*MySQL*Apache Server Kits
第十步:Useful Reference

以上已全部修改完畢。

2011年12月18日 星期日

InspireGate 派克空間

http://inspire.twgg.org/

嘸蝦米 for ibus onubuntu lucid

http://sreal.pixnet.net/blog/post/31827824



一直認為在ubuntu預設的ibus輸入法安裝嘸蝦米是很困難的一件事
事實上,不一定困難,但也真的非常麻煩,所以一直是用gcin的
直到有一天發現ubuntu 10.04裝了gcin以後,類MSN的軟體就不能登入了...orz
所以又把希望放在ibus上,輾轉終於從其他人手邊得知有個很方便的方法可以裝好嘸蝦米

在網路上已有人打包成安裝檔,讓安裝變得很方便
這裡 下載ibus-table-boshiamy_1.2.0.20091209-0ubuntu1_all.deb
double click即可開始安裝,安裝後可能需要重新啟動ibus

[2010-10-24 補充][START]
重啟ibus後,在工作列上的ibus圖示按右鍵,選擇偏好設定
ibus偏好設定
在選取輸入法的下拉框中,選擇「漢語」的分類,正常來說會看到嘸蝦米
選擇「嘸蝦米」,點右邊的「加入」按鈕,關閉後就可試看看有沒有嘸蝦米囉~
[2010-10-24 補充][END]

[2011-06-11 補充][START]
經網友反應,ubuntu 11.04安裝完嘸蝦米後,語言面板很害羞不出現
所謂的語言面板如下圖:
語言面板
在工作列上的ibus圖示按右鍵,選擇偏好設定,將「顯示語言面板」改為「總是」或「當啟用時」
顯示語言面板.png
語言面板就會在切換輸入法時很大方地出現在右下角了
[2011-06-11 補充][END]

用久了會發現,有時候打出來的字和預料的不同
例如: DAA,我預想的是出現「太」,但是它出現「時」
這時就是自己修改字碼表的時候了
在同一個網站下載ibus-table-boshiamy-1.2.0.20091209.tar.gz
解壓縮後,切換到/tables/下,找到並修改boshiamy.txt
請注意同樣的拆碼,第三欄數字愈大的排愈前面,如果有一樣的拆碼在不同語系,第3欄數字要相同

存檔後,開啟終端機輸入指令建立字碼的轉換檔:
[sreal@local ~]# ibus-table-createdb -s boshiamy.txt -n boshiamy.db

將檔案複製到ibus讀取字碼轉換檔的位置,覆蓋原來的檔案 (不放心可先備份):
[sreal@local ~]# sudo cp boshiamy.db /usr/share/ibus-table/tables/

完成後重新啟動ibus即可

2011年12月13日 星期二

Ubuntu Server 安裝筆記

from:http://blog.yam.com/leo2016/article/19679466


雖然Ubuntu Server 安裝已經非常的簡單,但還是記錄一下好了,當作日後參考的依據,畢竟人老了,腦子無法記憶太多東西,只好靠筆記來補強了

安裝SSHD
sudo apt-get install ssh

安裝LAMP套件
sudo apt-get install apache2-mpm-prefork libapache2-mod-php5 php5-gd php5-imagick php5-mysql mysql-server

將IP設定成固定IP
sudo vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.2.250
netmask 255.255.255.0
gateway 192.168.2.1

# sudo /etc/init.d/networking restart

顯示英文資訊
export LC_ALL=C

2011年12月9日 星期五

Ubuntu 1104 on IBM X60

from : http://www.arthurtoday.com/2010/06/thinkpad-x60-ubuntu.html

阿舍把小黑 ( ThinkPad x60 ) 裝上  Ubuntu 10.04 之後,第一個遇到的問題就是小黑的那些快捷按鍵好像都不太有用了,還有一些驅動程式的問題,所以,阿舍就去找了一下,整理如下:

tpb 是讓  ThinkPad 的快捷按鍵可以生效的軟體,安裝指令如下:

sudo aptitude install tpb

hdapsd 是硬碟防震的保護工具,安裝指令如下:

sudo aptitude install hdapsd

sensors-applet  是用來顯示硬碟和 CPU 的溫度的,安裝指令如下:

sudo aptitude install sensors-applet

ThinkPad Fan Control 是可以用來手動控制風扇轉速的,安裝指令如下:

sudo aptitude install tpfand

Thinkfinger tools 是指紋機的驅動程式,安裝指令如下:

sudo aptitude install thinkfinger-tools

嘸蝦米 for gicn on Ubuntu

from : http://blog.yam.com/ddy1280/article/2458455


無蝦米安裝程序:
1. 於/etc/apt/sources.lst 加入這行
     deb http://www.calno.com unstable main
2. sudo apt-get update;sudo apt-get install gcin (安裝gcin)
3. sudo im-switch -s gcin  (下次登入即可使用gcin)
4. wget http://edt1023.sayya.org/misc/noseeing-6.tar.gz (下載無蝦米表格檔)
5. tar zxvf noseeing-6.tar.gz
6. sudo cp noseeing.gtab /usr/share/gcin/table/
7. (system restart)

2011年11月13日 星期日

vncserver 設定


參考來源:曾阿銘的技術資料與吃喝玩樂

啟動Linux VNC Server

啟動VNC
第一次啟動VNC需輸入兩次密碼
#vncserver
You will require a password to access your desktops.
 
Password: 輸入密碼,畫面上不會顯示
Verify:再輸入一次
 
New 'localhost.localdomain:1(root)' desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
 
接下來可以用VNC客戶端軟體連至localhost.localdomain:1 ,再輸入剛剛設定之密碼測試連線是否成功。
 
往後如忘記密碼,可直接刪除/root/.vnc資料夾,再重新執行vncserver來設定產生。
#rm -rf /root/.vnc
#vncserver
 
若系統不想再提供遠端遙控的服務,可以將服務刪除:
#vncserver  -kill:1
 
如要連接Xwindows桌面,需編輯/root/.vnc/xstartup
1 #!/bin/sh
2
3 #Uncomment the following two lines for normal desktop:
4 unset SESSION_MANAGER       #將第四、五行的#拿掉
5 exec /etc/X11/xinit/xinitrc
6
 
存檔離開,重啟vncserver
#vncserver

2011年9月18日 星期日

iptable設定

1、阻止MAC地址為 XX:XX:XX:XX:XX:XX主機的所有通信:
    iptables -A INPUT -m mac --mac-source XX:XX:XX:XX:XX:XX -j DROP

2、允許MAC地址為XX:XX:XX:XX:XX:XX主機訪問22端口:
    iptables -A INPUT -p tcp --destination-port 22 -m mac --mac-source XX:XX:XX:XX:XX:XX -j ACCEPT

3、允許IP地址為192.168.1.21,MAC地址為XX:XX:XX:XX:XX:XX的主機通信,拒絕多有其他主機:
    iptables -A INPUT -s 192.168.1.21 -m mac --mac-source XX:XX:XX:XX:XX:XX -j ACCEPT
    iptables -P INPUT DROP

4、可以寫腳本限制MAC:
    iptables -P FORWARD DROP
    for mac in $(cat ipaddressfile); do
        iptables -A FORWARD -m mac --mac-source $mac -j ACCEPT
    done

2011年4月23日 星期六

How to : xerox workcentre 3119 printer work on win7 64bit


xerox workcentre 3119 和samsung scx-4200基本上是同一款機器,driver也大同小異,可能samsung的driver寫的比較好,相容於64bit win7,所以這一招是用scx-4200的drver來騙win7 64bit為workcentre3119。 





1. Obtain the Vista drivers from Xerox. Extract and do not install.
2. Obtain the (latest) Vista drivers from SAMSUNG for the model SCX-4200 .. I suspected this as the xrxe1u config file as provided by GDI Xerox actually references to the samsung driver.
3. Go to the GDI folder of the samsung package, then your OS(x32 or x64) folder and open suge1.inf cross-referenced to xrxe1u and did the following modification:


; Model section for Windows 2000 and XP
[MODEL.ntamd64.6.0]
"Samsung SCX-4200 Series" = DRVINSTALL, LPTENUM\SamsungSCX-4200_SeriD388
"Samsung SCX-4200 Series" = DRVINSTALL, USBPRINT\SamsungSCX-4200_SeriD388
"Xerox WorkCentre 3119 Series" = DRVINSTALL, LPTENUM\XeroxWorkCentre_3119C525
"Xerox WorkCentre 3119 Series" = DRVINSTALL, USBPRINT\XeroxWorkCentre_3119C525


this will make your Xerox be regconisable (pardon my spelling) by the installation.


4. Do a manual installation via the "Have Disk" method, pointing to the samsung installation. I got a unsigned warning (expected) but the installation went through without the "kernel-mode" error.


Tried it on Win7 x64, Samsung Vista/2003 40mb++ driver vesion 3.01.06.06 successfully.


Pls drop me an email at songwee [at] gmail [dot] com to share your potential success!


Regards