DBIx-Custom / t / _run / common-postgresql.run /
Newer Older
35 lines | 0.808kb
test cleanup in progress
Yuki Kimoto authored on 2011-08-15
1
### CentOS5
2

            
3
# Install
4
yum -y install postgresql-server
5
yum -y install postgresql
6
yum -y install postgresql-devel
7
chkconfig --level 2345 postgresql on
8

            
9
# Start server
10
service postgresql start
11

            
12
# Change config file
13
vi /var/lib/pgsql/data/pg_hba.conf
14
  # "local" is for Unix domain socket connections only
15
  local   all         all                               trust
16

            
17
# Create user and database
18
su - postgres
19
createuser -a -d -U postgres -P dbix_custom
20
  # Shall the new role be a superuser? (y/n) -> y
21
  # Shall the new role be allowed to create databases? (y/n) -> y
22
  # Shall the new role be allowed to create more new roles? (y/n) -> y
23

            
24
createdb dbix_custom -U dbix_custom
25

            
26
# Connect to database
27
psql -U dbix_custom dbix_custom
28

            
29
# Install DBD::pg
30
cpanm DBD::Pg
31

            
32
### Memo
33

            
34
# Drop user
35
dropuser dbix_custom