r1 - 15 Feb 2007 - 10:20:54 - KritsanaMunwongYou are here: NTL >  Main Web  > Winter2549_Internship > Kritsana_Deliverable > Postgres-des
-- KritsanaMunwong - 15 Feb 2007

การติดตั้ง PostgreSQL? บน Fedora Core6 แบบ rpm

1. เข้าไปตรวจสอบว่า postgreSQL ลงหรือยัง ตรวจสอบโดยใช้คสั่ง rpm -q postgresql
ถ้ายังไม่มีสามารถเข้าไป download ได้ที่ http://www.postgresql.org/ หรือที่ http://linux.softpedia.com/get/Database/Database-Servers/PostgreSQL-074.shtml
เมื่อ download มาแล้วให้แตกไฟล์โดยใช้คำสั่ง tar tar xvf postgresql-8.2.3.tar.bz2
2. จากนั้นทำการลง postgresql โดยใช้คำสั่ง yum install postgresql-8.2.3
3. เข้าไปตรวจสอบว่าลงหรือยังโดยใช้คำสั่ง #ps –ef | grep postmaster
4. สั่ง start โดยใช้คำสั่ง service postgresql start
5. ต่อไปเราต้องสร้าง user ขึ้นมาโดยใช้คำสั่ง #su – postgres เพิ่อเข้าไปสร้าง user
6. เราจะใช้คำสั่ง createuser ตามด้วยusername ที่จะตั้ง แล้วระบบจะถามว่า ต้องการให้เป็น superuser หรือไม่ ให้ตอบ y เพื่อให้สามารถจักการกับระบบได้<ทุกอย่าง
ต่อไปให้เข้าไปตั้ง password โดยใช้คำสั่ง alter user password”**********”;
7. เราสามารถตรวจสอบว่ามี user ของเรารึยังโดยใช้คำสั่ง \du
8.ขั้นตอนต่อไปเป็นการ config ให้ postgresql ซึ่งเป็นระบบรักษาความปลอดภัยให้แก่ผู้ใช้ ถ้าไม่ config จะไม่สามารถใช้งานได้
เข้าไปที่ #vi /var/lib/pgsql/data/pg_hba.conf
8. ดูตรงที่ ident sameuser เปลี่ยนเป็น md5 ทั้ง 3 บรรทัด แล้วเซฟกดEsc : wq
10. ให้ใช้คำสั่ง pg_ctl reload เพื่อให้เป็นการกระตุ้นให้ระบบที่เราคอนฟิกไปทำงาน

สามารถ download รายละเอียดได้ที่ด้านล่าง

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
elserar install_PostgresSQL.rar manage 233.5 K 15 Feb 2007 - 10:17 KritsanaMunwong การติดตั้ง postgresql
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Powered by NTL
This site is powered by the TWiki collaboration platformCopyright © by National Electronics and Computer Technology Center, NECTEC.
Ideas, requests, problems regarding NTL? Send feedback