07 2009 檔案
postgres數據庫的操作
摘要: 1. 修改role密碼
alter role postgres password 'postgres';
2. 設置postgres遠程連接
1). 修改listen addresses
sudo vim /etc/postgresql/8.3/main/pg_hba.conf
# listen_addresses = 'localhost'
設置為 listen_addresses = '*'
2). 添加ip
sudo vim /etc/postgresql/8.3/main/postgresql.conf
在 最后一行添加
host all all 192.168.0.0/16 md5
3
閱讀全文
posted @
2009-07-31 14:23 冰是沒有未來的,因為它的永恒|
編輯
postgres設置遠程可訪問數據庫
摘要: 1. 修改 ${postgres_install}/data/postgresql.conf
將listen_address = 'localhost' 改為 listen_address = '*'
2. ${postgres_install}/data/pg_hba.conf
在文件最后加入:
host all all 192.168.1.0/24 password
3. 重新啟動數據庫
${postgres_install}/bin/pg_ctl stop -D ${postgres_install}/data
${postgres_install}/bin/postmaster -i -D ${postgres_install}/data>logfile 2>&1 &
4. 這樣就可以遠程訪問數據庫了,如下邊的命令:
$ psql -h 192.168.1.216 -p 5432
閱讀全文
posted @
2009-07-24 10:37 冰是沒有未來的,因為它的永恒|
編輯
jvm調優總結
摘要: jvm調優總結
由于應用服務器本身對內存消耗比較大,所以遇到不同配置的機器時經常要對suite的啟動腳本進行修改
來調整內存參數,尤其是在虛擬機分配內存過小的情況
于是想總結一下內存參數相關的內容,但搜索之后發現unixboy已經很好的總結了
于是轉載過來以供自己學習參考。
聲明:本文一下內容轉自:http://unixboy.javaeye.com/blog/174173
堆大小設置
JVM 中最大堆大小有三方面限制:相關操作系統的數據模型(32-bt還是64-bit)限制;系統的可用虛擬內存限制;系統的可用物理內存限制。32位系統下,一般限制在1.5G~2G;64為操作系統對內存無限制。我在Windows Server 2003 系統,3.5G物理內存,JDK5.0下測試,最大可設置為1478m。
典型設置:
java -Xmx3550m -Xms3550m -Xmn2g -Xss128k
-Xmx3550m:設置JVM最大可用內存為3550M。
-Xms3550m:設置JVM促使內存
閱讀全文
posted @
2009-07-15 14:26 冰是沒有未來的,因為它的永恒|
編輯
jpa @Column說明
摘要: @Column(name="columnName";boolean unique() default false;boolean nullable() default true;
boolean insertable() default true;boolean updatable() default true;
String columnDefinition() default "";
String table() default "";
int length() default 255;
int precision() default 0; // decimal precision
int scale() default 0; // decimal scale
name 可選,字段名(默認值是屬性名)
unique 可選,是否在該字段上設置唯一約束(默認值false)
nullable 可選,是否設置該字段的值可以為空(默認值false)
insertable 可選,該字段
閱讀全文
posted @
2009-07-15 13:17 冰是沒有未來的,因為它的永恒|
編輯
linux 收藏
摘要: http://www.pixelbeat.org/cmdline_zh_CN.html
http://www.linuxfromscratch.org/blfs/edguide/chapter03.html
基于SSH密鑰對的自動登錄
xiao@xiao .ssh]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/xiao/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/xiao/.ssh/id_rsa.
Your public key has been saved in /home/xiao/.ssh/id_rsa.pub.
The
閱讀全文
posted @
2009-07-07 09:54 冰是沒有未來的,因為它的永恒|
編輯
數據庫備份
摘要: 1.備份
>pg_dump -h 192.168.4.217 --username admin RestaurantCenter >restaurantcenter1.sql
2.執行sql
>psql -h 192.168.1.18 --username postgres RestaurantCenter < restaurantcenter1.sql
閱讀全文
posted @
2009-07-02 13:43 冰是沒有未來的,因為它的永恒|
編輯