Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, January 14, 2009

tentang postgresql


Fitur-fiturnya adalah:

  • complex queries
  • foreign keys
  • triggers
  • views
  • transactional integrity
  • multiversion concurrency control
script supports;
  • data types
  • functions
  • operators
  • aggregate functions
  • index methods
  • procedural languages

Instal PostgreSQL di Ubuntu

Dg. baris perintash (Terminal) ketik saja:

$ sudo apt-get install postgresql postgresql-common postgresql-client
(disarankan juga untuk menginstal: postgresql-doc)

Untuk Linux-Apache-PHP-Postgre instal paket-2 berikut:
apache2
php5
php5-pgsql

(disarankan juga untuk menginstal: php-doc)

Tool
pgadmin3
phppgadmin

Agar bisa diakses dari luar (server) maka perlu mengisi kata sandi pengguna postgres di sistem database (bukan pengguna di Linux).

Masuk ke sistem database sbg pengguna Linux, postgres:
$ sudo ­u postgres psql postgres
Ganti kata sandi postgres di sistem database:
# ALTER USER postgres WITH PASSWORD 'KaTa54nd1';
\q

Cobalah masuk ke sistem database:
$ psql -U postgres -h localhost
lalu masukkan kata sandi di atas. Bisa?

Perintah membuat user baru

Membuat database baru:
$ sudo -u postgres createdb
Membuat pengguna baru:
$ sudo -u postgres createuser --superuser $USER

Membuat database untuk pengguna Linux:
$ createdb $USER

Membuat database baru dari baris perintah:
$ createdb dbq

Membuat pengguna “biasa”
$ createuser -D -R -P penggunaq

Membuat database untuk pengguna lain
$ createdb -O penggunaq dbnya

Masuk ke database
$ psql dbq
atau
$ psql -U penggunaq -h localhost dbnya

https://help.ubuntu.com/community/PostgreSQL

Tuesday, January 13, 2009

Linux Beginner Series ..Create your Own Command with Symbolic link

particularly we need to compose our command such as batch in Win platform. This is this simplest way to create our own command in linux, using the symbolic link command in linux. For example, I want to create a symbolic link in my /usr/local/bin directory called mendem that symbolically links to /usr/local/YourFunApps
  • First you may open your terminal, go to the local bin directory by entering this.
    you@yourcomputer:~$ cd /usr/local/bin
then Enter;
  • Point your symbolic link that you refers to by entering this command
    you@yourcomputer:~$ ln -s /usr/local/YourFunApps mendem
  • you'll might find your own command marked by arrow text after your symbolic link successfully been created
    you@yourcomputer:~$ ls -l /usr/local/bin
    you@yourcomputer:~$ lrwxrwxrwx mendem 46 May 30 13:59 mendem -> /usr/local/YourFunApps
That The last two commands are just to demonstrate that the link was created