Tuesday, January 10, 2012

Service command not found at CentOS 5.7

CentOS 5.7, attempt to restart PostgreSql server cause error


[root@server user]# sudo service postgresql initdb
sudo: service: command not found

Solution:

 /sbin/service should be added it to environment variables like this

vi ~/.bash_profile

PATH=$PATH:$HOME/bin:/sbin


logout/login

for errors of service startup review /var/lib/pgsql/pgstartup.log.

No comments:

Post a Comment