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年5月3日 星期四

centos 關 ping

vim /etc/sysctl.conf

加入一行
net.ipv4.icmp_echo_ignore_all = 1

1:關
0:開

設定好後
sysctl -p

install phpPgAdmin

yum install httpd php

設定 vim /etc/httpd/conf/httpd.conf
DirectoryIndex後面加入index.php



安裝phpPgAdmin

  • yum安裝
    yum install phpPgAdmin
    會將相關的apache php等套件一同安裝
    使用yum安裝完後在/var/www/html並沒有發現phpPgAdmin的資料夾
    主要分成兩個部分
    主程式:/usr/share/phpPgAdmin
    設定檔:/etc/phpPgAdmin/config.inc.php
    網址:127.0.0.1/phpPgAdmin就可以連到,系統會自動設好
    
  • 手動下載安裝:
    下載網站:http://phppgadmin.sourceforge.net/doku.php?id=download
    下載完後解開到/var/www/html下即可
    設定檔:phpPgAdmin/conf/config.inc.php
    網址:127.0.0.1/phpPgAdmin就可以連到
    

設定config.inc.php

vim /etc/phpPgAdmin/config.inc.php

$conf['servers'][0]['host'] = 'localhost';

// Only show owned databases?
// Note: This will simply hide other databases in the list - this does
// not in any way prevent your users from seeing other database by
// other means. (e.g. Run 'SELECT * FROM pg_database' in the SQL area.)
$conf['owned_only'] = true;

// If extra login security is true, then logins via phpPgAdmin with no
// password or certain usernames (pgsql, postgres, root, administrator)
// will be denied. Only set this false once you have read the FAQ and
// understand how to change PostgreSQL's pg_hba.conf to enable
// passworded local connections.
$conf['extra_login_security'] = false;

設定vim /etc/httpd/conf.d/phpPgAdmin.conf
刪除Allow from 127.0.0.1
增加allow from all
重啟httpd

設定SELinux讓網頁可以連接資料庫

setsebool -P httpd_can_network_connect_db=1


2012年5月2日 星期三

Server instrumentation not install

安裝完postgresql後,用PgAdminIII連線會出現Server instrumentation not install的視窗

解決方法:
yum install postgresql91-contrib
su - postgres
psql < /usr/pgsql-9.1/share/extension/adminpack--1.0.sql
再用PgAdminIII重新連線一次,點選在 Server instrumentation not install的視窗下方的『Fix it!』按鈕

2012年4月30日 星期一

CentOS6 Mount NTFS

安裝好rpmforge-release後,再安裝fuse-ntfs-3g即可
yum install fuse-ntfs-3g

2012年4月17日 星期二

釋放linux下沒有使用的記憶體


sync
echo 1 > /proc/sys/vm/drop_caches

2012年4月16日 星期一

phpPgAdmin You don't have permission to access /phpPgAdmin on this server.

安裝完phpPgAdmin後
192.168.1.XXX/phpPgAdmin會出現You don't have permission to access /phpPgAdmin on this server.
但在127.0.0.1/phpPgAdmin或localhost/phpPgAdmin都可以連上

解決方式:
設定vim /etc/httpd/conf.d/phpPgAdmin.conf
刪除Allow from 127.0.0.1
增加allow from all
重啟httpd

==================================

Alias /phpPgAdmin /usr/share/phpPgAdmin


    Order deny,allow
    Deny from all
#    Allow from 127.0.0.1
    allow from all
    Allow from ::1
    # Allow from .example.com


2012年4月4日 星期三

CENTOS6 安裝 rpmforge-release

32位元
http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

64位元
http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

rpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm


centos5