Showing posts with label centos 5.7 service command. Show all posts
Showing posts with label centos 5.7 service command. Show all posts

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.