LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2014, 02:49 PM   #1
tt1187
LQ Newbie
 
Registered: Jan 2014
Posts: 13

Rep: Reputation: Disabled
chkconfig on nginx


Hello,

I installed nginx via this guide here.

I wanted to ask if anyone knows the command to have nginx start at system boot. Whenever I try it gives this error;

[root@server]# chkconfig /usr/local/sbin/nginx on
error reading information on service /usr/local/sbin/nginx: No such file or directory

Even if I do "chkconfig nginx on", same error. I'm not sure where the directory is suppose to be, I mean, /usr/local/sbin/nginx is the command I run to start up nginx and that works fine.

Anyone know what I might be missing here?

Thanks.
 
Old 04-29-2014, 04:21 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,116

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
What operating system are you doing this on?

And if it is in fact Centos, what does this command output?

chkconfig --list

Last edited by szboardstretcher; 04-29-2014 at 04:22 PM.
 
Old 04-30-2014, 01:33 PM   #3
tt1187
LQ Newbie
 
Registered: Jan 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by szboardstretcher View Post
What operating system are you doing this on?

And if it is in fact Centos, what does this command output?

chkconfig --list

Yup, I'm using centos. Here's what the command brings;

Code:
[root@server2-cent ~]# chkconfig --list
atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
cgconfig        0:off   1:off   2:off   3:off   4:off   5:off   6:off
cgred           0:off   1:off   2:off   3:off   4:off   5:off   6:off
cloud-config    0:off   1:off   2:on    3:on    4:on    5:on    6:off
cloud-final     0:off   1:off   2:on    3:on    4:on    5:on    6:off
cloud-init      0:off   1:off   2:on    3:on    4:on    5:on    6:off
cloud-init-local        0:off   1:off   2:on    3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
ip6tables       0:off   1:off   2:on    3:on    4:on    5:on    6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
nova-agent      0:off   1:off   2:on    3:on    4:on    5:on    6:off
postfix         0:off   1:off   2:on    3:on    4:on    5:on    6:off
rdisc           0:off   1:off   2:off   3:off   4:off   5:off   6:off
restorecond     0:off   1:off   2:off   3:off   4:off   5:off   6:off
rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off
saslauthd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
svnserve        0:off   1:off   2:off   3:off   4:off   5:off   6:off
udev-post       0:off   1:on    2:on    3:on    4:on    5:on    6:off
xe-linux-distribution   0:off   1:off   2:on    3:on    4:on    5:on    6:off
 
Old 04-30-2014, 01:35 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,116

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
In that how-to, they mention that another how-to will be written to create an init script, which is what you need to use chkconfig/service

Quote:
As mentioned, the next couple of articles will deal with learning how to create an init script so we have more control over Nginx.
I suggest finding that next article and following the directions.
 
Old 04-30-2014, 01:49 PM   #5
tt1187
LQ Newbie
 
Registered: Jan 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
yeah, it was to do with having init scripts. Here's the second article for anyone in future that has this problem.

Thanks for hte help szboardstretcher.
 
  


Reply

Tags
boot, chkconfig, nginx


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nginx/1.4.1 '/etc/nginx/sites-available/default' missing Jalalabee Linux - Newbie 0 06-05-2013 08:44 AM
nginx + php-fpm and nginx modules fantasygoat Linux - Server 0 06-09-2011 01:21 PM
Nginx experts help me-problem when using Nginx php-fpm !!! HuMan-BiEnG Linux - Server 2 04-17-2011 03:30 PM
NGINX with PHP-FPM vis NGINX with Spawn-FCGI WhisperiN Linux - Server 1 03-15-2011 07:39 PM
Why do I get "bash: chkconfig: command not found" when I try to run chkconfig? non-thrash Fedora 10 05-20-2010 01:31 PM


All times are GMT -5. The time now is 09:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration