Skip to content

Instantly share code, notes, and snippets.

@samuelololol
Last active December 22, 2015 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelololol/6440354 to your computer and use it in GitHub Desktop.
Save samuelololol/6440354 to your computer and use it in GitHub Desktop.
PostgreSQL on CentOS6

##PostgressQL

  1. edit /etc/yum.repos.d/CentOS-Base.repo, [base] and [updates] sections, add

     exclude=postgresql*
    
  2. download PGDG RPM

     curl -O http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm
    
  3. install RPM distribution

     sudo rpm -ivh pgdg-centos92-9.2-6.noarch.rpm
    
  4. install PostgreSQL 9.1 server:

     sudo yum install postgresql92-server
    
  5. initialize and start the database

     sudo service postgresql-9.2 initdb
     sudo service postgresql-9.2 start
    
  6. edit /var/lib/pgsql/9.2/data/pg_ident.conf, change ident to md5

  7. automatically launched when the OS starts

     sudo chkconfig postgresql-9.2 on
    

##plv8js ###V8 Engine Javascript Procedural Language add-on for PostgreSQL

  • Require:

      1. postgresql
      2. v8 engine
    
  • install v8

      mkdir ~/build
      cd ~/build
      svn checkout http://v8.googlecode.com/svn/trunk/ v8
      cd v8
      export GYPFLAGS="-D OS=freebsd"
      make dependencies
      make native.check -j 4 library=shared strictaliasing=off console=readline
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment