LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-21-2018, 11:04 AM   #1
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Rep: Reputation: Disabled
startup of nginx


sorry to ask the question of software about nginx

in my centos , there is a nginx running ( which built by previous colleague ) , this nginx is compiled from source .

as the server is reboot , the nginx do not auto startup , I would like to startup it but do not know how to start it.

Just find this link

Code:
http://nginx.org/en/docs/beginners_guide.html
Tried the command below , but nothing started , would advise any way to start it ?
Code:
#nginx -s
#nginx -s start 
#service nginx start
another question , I also want to know what is the error to run the above command , how to verbose the error output ?

Last edited by catiewong; 12-21-2018 at 11:10 AM.
 
Old 12-21-2018, 11:30 AM   #2
dc.901
Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 841

Rep: Reputation: 256Reputation: 256Reputation: 256
When you run those commands to start, does it report anything?
What is output of "which nginx"
Did you review logs for nginx?
 
1 members found this post helpful.
Old 12-21-2018, 11:35 AM   #3
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dc.901 View Post
When you run those commands to start, does it report anything?
What is output of "which nginx"
Did you review logs for nginx?
When you run those commands to start, does it report anything? <<== nothing to show
What is output of "which nginx" <<== /usr/bin/which: no nginx in (/root/.nvm/versions/node/v6.9.5/bin:/opt/jdk1.8.0_66/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/usr/local/mysql/bin:/usr/local/mysql/lib)
Did you review logs for nginx? <<== no any start / error wrote to the log

Last edited by catiewong; 12-21-2018 at 08:54 PM.
 
Old 12-21-2018, 12:29 PM   #4
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: Slackware
Posts: 2,070

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
If you are running centos 6 series, I believe it still used a normal init system (sysvinit) so you'd have to start nginx as a process that would start at boot. If using centos 7 and up, it uses systemd - look up how to start something using systemd at boot.
 
1 members found this post helpful.
Old 12-21-2018, 01:57 PM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 15,353

Rep: Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036
did you enter # too at the beginning of the commands?
 
2 members found this post helpful.
Old 12-21-2018, 06:28 PM   #6
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
did you enter # too at the beginning of the commands?
of course not .
 
Old 12-24-2018, 04:08 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 15,353

Rep: Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036Reputation: 5036
in that case there should be something written in logs, in the terminal.
If really nothing comes out you can try strace to check what's happening.
 
Old 12-24-2018, 10:52 AM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,219

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Quote:
Originally Posted by catiewong View Post
What is output of "which nginx" <<== /usr/bin/which: no nginx in (/root/.nvm/versions/node/v6.9.5/bin:/opt/jdk1.8.0_66/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/usr/local/mysql/bin:/usr/local/mysql/lib)
That would seem to indicate that nginx is not installed. What does
Code:
yum list nginx
return?
(and please use [code] tags when you post commands or output. Thank you}
 
Old 12-27-2018, 01:28 PM   #9
dc.901
Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 841

Rep: Reputation: 256Reputation: 256Reputation: 256
In your original post:
Quote:
Originally Posted by catiewong View Post
in my centos , there is a nginx running ( which built by previous colleague ) , this nginx is compiled from source .
Then output of "which nginx"
Quote:
Originally Posted by catiewong View Post
What is output of "which nginx" <<== /usr/bin/which: no nginx in (/root/.nvm/versions/node/v6.9.5/bin:/opt/jdk1.8.0_66/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/usr/local/mysql/bin:/usr/local/mysql/lib)
This tells me that path where nginx is installed is not in your PATH. Ask your coworker where it is installed, then try to start from that directory.
If your coworker is no longer there then look at command history, may be it will give you hint.

If not, run "find / -name nginx"
 
  


Reply


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 07:44 AM
nginx + php-fpm and nginx modules fantasygoat Linux - Server 0 06-09-2011 12:21 PM
LXer: Nginx+Varnish compared to Nginx LXer Syndicated Linux News 0 04-27-2011 02:30 PM
Nginx experts help me-problem when using Nginx php-fpm !!! HuMan-BiEnG Linux - Server 2 04-17-2011 02:30 PM
NGINX with PHP-FPM vis NGINX with Spawn-FCGI WhisperiN Linux - Server 1 03-15-2011 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:05 PM.

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
Open Source Consulting | Domain Registration