Recent Comments

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

2012年6月28日 星期四

CentOS6用yum安裝webmin

vim /etc/yum.repos.d/webmin.repo
加入下面的內容

[Webmin]
name=Webmin Distribution Neutral 
baseurl=http://download.webmin.com/download/yum 
enabled=1

rpm --import http://www.webmin.com/jcameron-key.asc
yum install webmin
yum install gcc openssl openssl-devel

http://localhost:10000
帳號密碼為系統管理者root

2012年6月7日 星期四

the log_filename parameter must equal

當執行pgadmin III的工具->伺服器狀態時會出現the log_filename parameter must equal……
主要是設定檔的LOG FILE格式和PGADMIN III的格式不符所造成的

修改postgresql.conf
vim /var/lib/pgsql/9.1/data/postgresql.conf
修改下面log_filename的參數內容
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'

安裝adminpack


使用locate adminpack找到檔案路徑
/usr/pgsql-9.1/share/extension/adminpack--1.0.sql


執行
su -l postgres
psql -d n5_data < /usr/pgsql-9.1/share/extension/adminpack--1.0.sql


出現Use "CREATE EXTENSION adminpack" to load this file.
在9.1的安裝方式改了,改用下面的指令,直接到資料庫中執行指令產生


psql -d n5_data 
CREATE EXTENSION adminpack


最後reload設定檔
su -l postgres
 /usr/pgsql-9.1/bin/pg_ctl reload -d /var/lib/pgsql/9.1/data/

重新開始後pgadmin iii就不會出現這個錯誤,也可以用pgadmin直接看到log內容
log檔案位置:/var/lib/pgsql/9.1/data/pg_log

2012年6月4日 星期一

解壓縮資料夾下的檔案

解壓縮Z
ls *.tar.Z | xargs -n 1 gunzip -d


解開檔案
ls *.tar | xargs -n 1 tar -xvf