enabling unlimited row size for system tables... ok
creating system views... ok
loading pg_description... ok
vacuuming database template1... ok
copying template1 to template0... ok
Success. You can now start the database server using:
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
or
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
啟動數(shù)據(jù)庫:
$ pg_ctl -l $HOME/data/server.log start
postmaster successfully started
$ cat data/server.log
DEBUG: database system was shut down at 2003-10-31 19:22:27 CST
DEBUG: checkpoint record is at 0/109664
DEBUG: redo record is at 0/109664; undo record is at 0/0; shutdown TRUE
DEBUG: next transaction id: 89; next oid: 16556
DEBUG: database system is ready
$ pg_ctl stop
waiting for postmaster to shut down......done
postmaster successfully shut down
$ pg_ctl -l $PGDATA/server.log start
postmaster successfully started
致此,PGSQL自由數(shù)據(jù)庫已經正常工作啦 。:)
現(xiàn)在建一個數(shù)據(jù)庫試試吧
$ createdb temp
$ psql temp
temp=# create table test (t1 char(9),t2 int);
temp=# select * from test;
t1 | t2
---- ----
(0 rows)
temp=#
temp=#q
$
temp=# 是進入psql后的提示符,前面的temp表示你正在操作的當前數(shù)據(jù)庫是"temp" 。如果不建數(shù)據(jù)庫,psql就不能用,psql 后面一定要跟一個數(shù)據(jù)庫名,缺省是postgres
你也可以先建一個叫postgres的數(shù)據(jù) 。
好了,用吧,具說PGSQL是個精品數(shù)據(jù)庫呢,我也是才拿到UW711系統(tǒng),花了一開時間搞定的,加上改SHELL,用了我兩天時間,不過精力不是很集中的哈 。
/***********************************************
如果要在系統(tǒng)每次啟動時都啟動PGSQL 在/etc/rc2.d/目錄下創(chuàng)建S99pgsql文件
# cat /etc/rc2.d/S99pgsql
#
# Start/Stop PGSQL
#
# PGDATA="https://www.rkxy.com.cn/usr/local/pgsql/data"
case "$1" in
start)
su - postgres -c "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start"
stop)
su - postgres -c "/usr/local/pgsql/bin/pg_ctl stop"
*)
exit 1
esac
exit 0
然后為此文件加執(zhí)行權限:
chmodx /etc/rc2.d/S99pgsql
***************************************************/
##############上面這一段不用了,原來PGSQL也提供了一個腳本,我剛才發(fā)現(xiàn)的,hoho 。
# /etc/init.d/postgresql enable
# /etc/rc2.d/S97pgsql start
這樣就搞定了,哈哈,覺得自己有些笨 。
為MySQL啟動做準備:
# vi /etc/services
## 增加一行:
mysql 3306/tcp MySQL_Connect-Port
啟動mysql數(shù)據(jù)庫,執(zhí)行方法:
# /etc/init.d/mysql start
## 增加路徑: /usr/local/bin
# vi /etc/profile
## 在最后增加一行:
PATH=$PATH:/usr/local/bin
重新登錄root 執(zhí)行
# mysql
.
.
.
mysql>show databases;
應該可以看到兩個數(shù)據(jù)庫 mysql & test
現(xiàn)在該小小慶賀一下了吧 。
最后將MySQL管理軟件phpMyAdmin裝上,這個軟件可以在網上搜索到,下載后解壓 。
# cd /tmp
# gunzip phpMyAdmin-2.2.4-php.tar.gz
# cd /usr/local/apache/htdocs
# tar xvf /tmp/phpMyAdmin-2.2.4-php.tar
# mv PhpMyAdmin-2.2.4 admin ## 只是為了方便一些:)
在瀏覽器地址欄輸入:
http://localhost/admin/main.php
如果看到一個MySQL的管理頁面就大功告成啦,這個MySQL是3.21.26伽馬版的,蠻穩(wěn)定的 。在使用MySQL管理工具時,由于版本問題會出現(xiàn)一些錯誤,原因是phpMyAdmin管理模塊是基于MySQL3.23以上版本的,所以有些小的錯誤 。如果你有興趣可以下載新版的源代碼然后自己編譯 。
相關網站:
PHP: http://www.php.net
Apache: http://www.apache.org
MySQL: http://www.mysql.com
OpenSSL: http://www.openssl.org
Postpres: http://www.pgsql.org
推薦閱讀
- 如何構建Informix分布式數(shù)據(jù)庫訪問
- SYBASE 11.0.0 For SCO Unix 安裝手冊
- 備份Informix-Online數(shù)據(jù)庫三法
- 4 Informix-Online 7.30的安裝及管理
- SQL SERVER 11.0.x FOR SCO OPENSERVER 5
- 2 Informix-Online 7.30的安裝及管理
- 5 Informix-Online 7.30的安裝及管理
- 3 用FreeBSD構建家庭網絡世界
- 使用Jail和ipfilter結合構建高安全服務器
- 2 用FreeBSD構建家庭網絡世界
