2011年3月5日
2011年3月3日
Wordpress 的上傳檔案大小限制
Wordpress 的上傳檔案大小限制為 2M, 不夠的話, 在 ubuntu 下要修改
sudo gedit /etc/php5/apache2/php.ini
然後在 php.ini 中修改以下的設定 (等號後的數字只是參考, 請依你自己的需要更改)
max_execution_time = 300
max_input_time = 600
memory_limit = 160M
post_max_size = 500M
upload_max_filesize = 600M
(注意: upload_max_filesize 要大於 post_max_size 的數值)
最後別忘了重新啟動 apache, 在 ubuntu 終端機中下指令
sudo gedit /etc/php5/apache2/php.ini
然後在 php.ini 中修改以下的設定 (等號後的數字只是參考, 請依你自己的需要更改)
max_execution_time = 300
max_input_time = 600
memory_limit = 160M
post_max_size = 500M
upload_max_filesize = 600M
(注意: upload_max_filesize 要大於 post_max_size 的數值)
最後別忘了重新啟動 apache, 在 ubuntu 終端機中下指令
sudo /etc/init.d/apache2 restart
UEC 在 ubuntu 之下
Ubuntu Enterprise Cloud
我有成功地安裝了 UEC, 但是發現, UEC 在虛擬伺服器的管理上, 有無法跨 node 的 CPU 限制, 也就是說, 如果每一個 node 是 2 個 CPU, 你無法在 UEC 下建立的任一個虛擬伺服器採用超過2 個 CPU。這和我原來以為 UEC 可以提升效能 (結合多台 PC 的 CPU 一起運作) 的預期不符。
似乎, 要想另外的平行運算, 或 HPC 的概念, 在 google 找了一下, 或許可參考:
High Performance Distributed File System and Parallel Data Processing Engine
- 雲端運算Cloud computing學習心得筆記
- opennebula.org
- Cloud and Grid Computing On-line Forum 討論區索引
- 叢集與平行計算
- 國網中心 高速計算服務
- UEC for grid or parallel computing?
- StarCluster Brings HPC to the Amazon Cloud
2011年2月10日
在ubuntu 將 virtualbox 裡網路設定靜態 IP (2)
在以前的文章 "在ubuntu 將 virtualbox 裡網路設定靜態 IP" 提到 static IP 的設定方法, 但我剛才做了另一個實驗, 也可以在 virtualbox 中的 ubuntu 設定靜態 IP:
1. 替 guest OS 選擇 "橋接介面卡"
2. 在 virtualbox 中的 ubuntu 設定網路: 用滑鼠右鍵點網路 icon, 再選 "編輯連線 (edit connections)
3. 新增一個網路連線, 例如名為 "my connection 1", 點其中的 IPv4 設定:
3.1 填入你想設定的靜態 IP, netmask, gateway;
3.2 DNS server 處, 填入和 gateway 同樣的 IP
再按 [套用 (Apply)] 即完成設定
4. 再用滑鼠右鍵點網路 icon, 改選剛才設定的 "my connection 1",
這樣就可以了!!!
用指令的話
sudo vim /etc/network/interfaces
將內容改成如下你自己的 IP (例如 192.168.0.1, ...)
1. 替 guest OS 選擇 "橋接介面卡"
2. 在 virtualbox 中的 ubuntu 設定網路: 用滑鼠右鍵點網路 icon, 再選 "編輯連線 (edit connections)
3. 新增一個網路連線, 例如名為 "my connection 1", 點其中的 IPv4 設定:
3.1 填入你想設定的靜態 IP, netmask, gateway;
3.2 DNS server 處, 填入和 gateway 同樣的 IP
再按 [套用 (Apply)] 即完成設定
4. 再用滑鼠右鍵點網路 icon, 改選剛才設定的 "my connection 1",
這樣就可以了!!!
用指令的話
sudo vim /etc/network/interfaces
將內容改成如下你自己的 IP (例如 192.168.0.1, ...)
auto eth0 iface eth0 inet static address 192.168.0.1 netmask 255.255.255.0 gateway 192.168.0.254
可參考: /etc/network/interfaces 集網路設定之大成
2011年2月8日
我常用的 linux 指令 and 紀錄檔
壓縮 & 解壓縮
tar cvpzf mytest.tgz /home/xxx
注意:參數
c 表示壓縮
v 顯示檔案名稱
p 的選項,重點在於『保留原本檔案的權限與屬性』
z 指用 gzip 進行壓縮/解壓縮
f 要放在最後 (其後跟隨著檔名)
指定目錄 -C 解壓縮
tar xvpzf mytest.tgz -C /home/xxx/下載
x 表示解壓縮
其它
-P(大寫) :保留絕對路徑,亦即允許備份資料中含有根目錄存在之意;
--exclude=FILE:在壓縮的過程中,不要將 FILE 打包!
===另可參考: Ubuntu常用命令與技巧 ===
tar -c 創建包 –x 釋放包 -v 顯示命令過程 –z 代表壓縮包
tar –cvf xxx.tar /home/xxx 把/home/benet目錄打包
tar –zcvf xxx.tar.gz /xxx 把目錄打包並壓縮
tar –zxvf xxx.tar.gz 壓縮包的文件解壓恢復
tar –jxvf xxx.tar.bz2 解壓縮
範例:
將 /var/www 壓縮至 *.tar.gz
sudo tar czvf /home/存檔目錄/檔名-`date +%Y%m_%H%m`.tar.gz /var/來源目錄 其中 `date +%Y%m_%H%m` 這個字串會自動產生日期+時間的檔案.tar.gz
== rsync ==
將遠端 www.xxx.tw 電腦之目錄備份至近端 A 電腦 /home/yyy 目錄 rsync -av --delete 帳號@www.xxx.tw:/var/www/ /home/yyy ==mySQL ==export (dump) 指令待查
import 指令待查
==ssh 待查==
上傳 & 下載
掛載
/etc/fstab
依 fstab 自動重新掛
sudo mount -a
網路
netstat
編輯網路紀錄檔
sudo vim /etc/network/interfaces
內容:
auto eth1 (USB 網路卡)
iface eth1 inet dhcp
auto eth0
iface eth0 inet static
address.192.168.20.1
netmask 255.255.255.0
network 192.168.20.0
broadcast 192.168.20.255
或許只要下列 3 行即可 (2012.02.07)
address.192.168.20.1
netmask 255.255.255.0
gateway 192.168.20.255
重新啟動網路設定
sudo /etc/init.d/networking restart
NTP server
sudo apt-get install ntp
sudo vim /etc/ntp.conf
內容 (在檔案最後加入以下):
server 127.127.1.0
fudge 127.127.1.0 stratum 10
重新啟動 ntp server
sudo /etc/init.d/ntp restart
最後於 cloud 再重新啟動 eucalyptus:
sudo restart eucalyptus-cc CLEAN=1
取消 AMD 虛擬CPU 模組
sudo rmmod kvm-amd
連同子目錄下的檔案, 一起改屬性
sudo chmod user:grp -R 子目錄
2011年1月29日
五種 ubuntu 上用的 blog 撰寫軟體
來源: Five Desktop Blog Editors for GNU/Linux Users
偶然從逛網站看到的, 都還沒試用過, 先記住以利日後參考。
我其實是想找一次可以管理多個網站、網誌的軟體,因為有太多網誌, 常常自已 PO 到哪都忘記了...
Five Blogging Editors to Make Blog Posts From the GNU/Linux platform
1. GNOME Blog Entry Poster

Gnome Blog Home page
2. Drivel Journal Editor

More information on Drivel
3. BloGTK Blog Editor


More about BloGTK
4. ScribeFire Firefox Extension

Getting Started with ScribFire Blog Editor
5. Google Docs as a Blog Editor
偶然從逛網站看到的, 都還沒試用過, 先記住以利日後參考。
我其實是想找一次可以管理多個網站、網誌的軟體,因為有太多網誌, 常常自已 PO 到哪都忘記了...
Five Blogging Editors to Make Blog Posts From the GNU/Linux platform
1. GNOME Blog Entry Poster
Gnome Blog Home page
2. Drivel Journal Editor
More information on Drivel
3. BloGTK Blog Editor

More about BloGTK
4. ScribeFire Firefox Extension
Getting Started with ScribFire Blog Editor
5. Google Docs as a Blog Editor
訂閱:
文章 (Atom)