Changes

From SME Server
Jump to navigationJump to search
Line 45: Line 45:     
To be able to do this, we need to create a file as described below, which is the postgresql way of settings variables:
 
To be able to do this, we need to create a file as described below, which is the postgresql way of settings variables:
  mkdir -p /opt/rh/postgresql92/root/etc/sysconfig/pgsql
+
  mkdir -p /opt/rh/rh-postgresql92/root/etc/sysconfig/pgsql
  echo PGDATA=/home/e-smith/files/pgsql/data > /opt/rh/postgresql92/root/etc/sysconfig/pgsql/postgresql92-postgresql
+
  echo PGDATA=/home/e-smith/files/pgsql/data > /opt/rh/rh-postgresql92/root/etc/sysconfig/pgsql/postgresql92-postgresql
    
{{Note box|Just like MySQL, Postgresql needs pre-backup and pre-restore actions. New actions have to developed to make this possible. Once this is the case, the databases location will have to change to the default /var/lib/pgsql}}
 
{{Note box|Just like MySQL, Postgresql needs pre-backup and pre-restore actions. New actions have to developed to make this possible. Once this is the case, the databases location will have to change to the default /var/lib/pgsql}}
Line 53: Line 53:  
====Initialize database====
 
====Initialize database====
 
PostgreSQL requires the initialization of the database environment. This can be done by the following command:
 
PostgreSQL requires the initialization of the database environment. This can be done by the following command:
  /etc/rc.d/init.d/postgresql92-postgresql initdb
+
  /etc/rc.d/init.d/rh-postgresql92-postgresql initdb
 
      
====Start/Stop PostgreSQL as a system service====
 
====Start/Stop PostgreSQL as a system service====
Line 73: Line 72:  
  signal-event remoteaccess-update
 
  signal-event remoteaccess-update
 
You can toggle between private and public access followed by the remoteaccess-update command.
 
You can toggle between private and public access followed by the remoteaccess-update command.
      
===Enable the postgresql92 environment at boot time===
 
===Enable the postgresql92 environment at boot time===
Line 82: Line 80:  
  export X_SCLS="`scl enable postgresql92 'echo $X_SCLS'`"
 
  export X_SCLS="`scl enable postgresql92 'echo $X_SCLS'`"
   −
This will take effect after a reboot, so a reboot is required at this time. A better way needs to be investigated to avoid a reboot.
+
This will take effect after a logout/login as root or reboot. The simplest way is to log out from the console at this time and login again as root.
     

Navigation menu