Install nginx 1.8 on Centos 7












2














I'm trying to install nginx 1.8 on Centos 7. I tried the following steps:





  1. Install nginx repo from http://nginx.org/en/linux_packages.html



    wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
    rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm



  2. Install Nginx



    yum install nginx



  3. Start Nginx:



    sudo systemctl start nginx



But nothing happens; nginx doesn't start. The exact same steps work on Centos 6 without a problem.



Here is the output of systemctl status nginx:



nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
Active: inactive (dead) since Thu 2015-08-06 14:30:51 UTC; 21s ago
Process: 29865 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 29776 (code=exited, status=0/SUCCESS)

Aug 06 13:31:12 vultr.guest systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
Aug 06 13:31:12 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:30 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:54 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:57 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:32:04 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 14:30:20 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 14:30:51 vultr.guest systemd[1]: Stopping The nginx HTTP and reverse proxy server...
Aug 06 14:30:51 vultr.guest systemd[1]: Stopped The nginx HTTP and reverse proxy server.
Aug 06 14:30:56 vultr.guest systemd[1]: Stopped The nginx HTTP and reverse proxy server.









share|improve this question
























  • do, tail -f -n0 /var/log/messages on your centos machine and then do, systemctl start nginx. systemctl logs the service start error messages here...
    – Madhavan Kumar
    Aug 6 '15 at 15:05
















2














I'm trying to install nginx 1.8 on Centos 7. I tried the following steps:





  1. Install nginx repo from http://nginx.org/en/linux_packages.html



    wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
    rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm



  2. Install Nginx



    yum install nginx



  3. Start Nginx:



    sudo systemctl start nginx



But nothing happens; nginx doesn't start. The exact same steps work on Centos 6 without a problem.



Here is the output of systemctl status nginx:



nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
Active: inactive (dead) since Thu 2015-08-06 14:30:51 UTC; 21s ago
Process: 29865 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 29776 (code=exited, status=0/SUCCESS)

Aug 06 13:31:12 vultr.guest systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
Aug 06 13:31:12 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:30 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:54 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:57 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:32:04 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 14:30:20 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 14:30:51 vultr.guest systemd[1]: Stopping The nginx HTTP and reverse proxy server...
Aug 06 14:30:51 vultr.guest systemd[1]: Stopped The nginx HTTP and reverse proxy server.
Aug 06 14:30:56 vultr.guest systemd[1]: Stopped The nginx HTTP and reverse proxy server.









share|improve this question
























  • do, tail -f -n0 /var/log/messages on your centos machine and then do, systemctl start nginx. systemctl logs the service start error messages here...
    – Madhavan Kumar
    Aug 6 '15 at 15:05














2












2








2







I'm trying to install nginx 1.8 on Centos 7. I tried the following steps:





  1. Install nginx repo from http://nginx.org/en/linux_packages.html



    wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
    rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm



  2. Install Nginx



    yum install nginx



  3. Start Nginx:



    sudo systemctl start nginx



But nothing happens; nginx doesn't start. The exact same steps work on Centos 6 without a problem.



Here is the output of systemctl status nginx:



nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
Active: inactive (dead) since Thu 2015-08-06 14:30:51 UTC; 21s ago
Process: 29865 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 29776 (code=exited, status=0/SUCCESS)

Aug 06 13:31:12 vultr.guest systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
Aug 06 13:31:12 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:30 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:54 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:57 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:32:04 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 14:30:20 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 14:30:51 vultr.guest systemd[1]: Stopping The nginx HTTP and reverse proxy server...
Aug 06 14:30:51 vultr.guest systemd[1]: Stopped The nginx HTTP and reverse proxy server.
Aug 06 14:30:56 vultr.guest systemd[1]: Stopped The nginx HTTP and reverse proxy server.









share|improve this question















I'm trying to install nginx 1.8 on Centos 7. I tried the following steps:





  1. Install nginx repo from http://nginx.org/en/linux_packages.html



    wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
    rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm



  2. Install Nginx



    yum install nginx



  3. Start Nginx:



    sudo systemctl start nginx



But nothing happens; nginx doesn't start. The exact same steps work on Centos 6 without a problem.



Here is the output of systemctl status nginx:



nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
Active: inactive (dead) since Thu 2015-08-06 14:30:51 UTC; 21s ago
Process: 29865 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 29776 (code=exited, status=0/SUCCESS)

Aug 06 13:31:12 vultr.guest systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
Aug 06 13:31:12 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:30 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:54 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:31:57 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 13:32:04 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 14:30:20 vultr.guest systemd[1]: Started The nginx HTTP and reverse proxy server.
Aug 06 14:30:51 vultr.guest systemd[1]: Stopping The nginx HTTP and reverse proxy server...
Aug 06 14:30:51 vultr.guest systemd[1]: Stopped The nginx HTTP and reverse proxy server.
Aug 06 14:30:56 vultr.guest systemd[1]: Stopped The nginx HTTP and reverse proxy server.






centos nginx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 7 '15 at 5:34









Michael Mrozek

60.5k29187208




60.5k29187208










asked Aug 6 '15 at 13:45









user1086010

1113




1113












  • do, tail -f -n0 /var/log/messages on your centos machine and then do, systemctl start nginx. systemctl logs the service start error messages here...
    – Madhavan Kumar
    Aug 6 '15 at 15:05


















  • do, tail -f -n0 /var/log/messages on your centos machine and then do, systemctl start nginx. systemctl logs the service start error messages here...
    – Madhavan Kumar
    Aug 6 '15 at 15:05
















do, tail -f -n0 /var/log/messages on your centos machine and then do, systemctl start nginx. systemctl logs the service start error messages here...
– Madhavan Kumar
Aug 6 '15 at 15:05




do, tail -f -n0 /var/log/messages on your centos machine and then do, systemctl start nginx. systemctl logs the service start error messages here...
– Madhavan Kumar
Aug 6 '15 at 15:05










1 Answer
1






active

oldest

votes


















0














Try these commands below



hostnamectl
hostnamectl set-hostname servername.domain.com
hostnamectl
systemctl restart sshd.service

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

yum install nginx
systemctl enable nginx.service
systemctl start nginx.service

systemctl stop httpd.service or systemctl disable httpd
yum remove httpd
systemctl disable httpd.service

systemctl enable nginx.service
systemctl start nginx.service

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload


http://your_server_IP_address/






share|improve this answer























  • this is not answering the question nor solving the described problem
    – Jakuje
    Aug 7 '15 at 14:23










  • There are a few things I'm not sure why they're included like restarting the ssh service, and this may not solve the problem, but it is actually a possible solution to the vague question in my opinion.
    – Julie Pelletier
    Jul 14 '16 at 2:57











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f220557%2finstall-nginx-1-8-on-centos-7%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Try these commands below



hostnamectl
hostnamectl set-hostname servername.domain.com
hostnamectl
systemctl restart sshd.service

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

yum install nginx
systemctl enable nginx.service
systemctl start nginx.service

systemctl stop httpd.service or systemctl disable httpd
yum remove httpd
systemctl disable httpd.service

systemctl enable nginx.service
systemctl start nginx.service

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload


http://your_server_IP_address/






share|improve this answer























  • this is not answering the question nor solving the described problem
    – Jakuje
    Aug 7 '15 at 14:23










  • There are a few things I'm not sure why they're included like restarting the ssh service, and this may not solve the problem, but it is actually a possible solution to the vague question in my opinion.
    – Julie Pelletier
    Jul 14 '16 at 2:57
















0














Try these commands below



hostnamectl
hostnamectl set-hostname servername.domain.com
hostnamectl
systemctl restart sshd.service

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

yum install nginx
systemctl enable nginx.service
systemctl start nginx.service

systemctl stop httpd.service or systemctl disable httpd
yum remove httpd
systemctl disable httpd.service

systemctl enable nginx.service
systemctl start nginx.service

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload


http://your_server_IP_address/






share|improve this answer























  • this is not answering the question nor solving the described problem
    – Jakuje
    Aug 7 '15 at 14:23










  • There are a few things I'm not sure why they're included like restarting the ssh service, and this may not solve the problem, but it is actually a possible solution to the vague question in my opinion.
    – Julie Pelletier
    Jul 14 '16 at 2:57














0












0








0






Try these commands below



hostnamectl
hostnamectl set-hostname servername.domain.com
hostnamectl
systemctl restart sshd.service

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

yum install nginx
systemctl enable nginx.service
systemctl start nginx.service

systemctl stop httpd.service or systemctl disable httpd
yum remove httpd
systemctl disable httpd.service

systemctl enable nginx.service
systemctl start nginx.service

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload


http://your_server_IP_address/






share|improve this answer














Try these commands below



hostnamectl
hostnamectl set-hostname servername.domain.com
hostnamectl
systemctl restart sshd.service

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

yum install nginx
systemctl enable nginx.service
systemctl start nginx.service

systemctl stop httpd.service or systemctl disable httpd
yum remove httpd
systemctl disable httpd.service

systemctl enable nginx.service
systemctl start nginx.service

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload


http://your_server_IP_address/







share|improve this answer














share|improve this answer



share|improve this answer








edited Aug 7 '15 at 14:47









Jakuje

16.2k52953




16.2k52953










answered Aug 7 '15 at 14:07









Sammy

1




1












  • this is not answering the question nor solving the described problem
    – Jakuje
    Aug 7 '15 at 14:23










  • There are a few things I'm not sure why they're included like restarting the ssh service, and this may not solve the problem, but it is actually a possible solution to the vague question in my opinion.
    – Julie Pelletier
    Jul 14 '16 at 2:57


















  • this is not answering the question nor solving the described problem
    – Jakuje
    Aug 7 '15 at 14:23










  • There are a few things I'm not sure why they're included like restarting the ssh service, and this may not solve the problem, but it is actually a possible solution to the vague question in my opinion.
    – Julie Pelletier
    Jul 14 '16 at 2:57
















this is not answering the question nor solving the described problem
– Jakuje
Aug 7 '15 at 14:23




this is not answering the question nor solving the described problem
– Jakuje
Aug 7 '15 at 14:23












There are a few things I'm not sure why they're included like restarting the ssh service, and this may not solve the problem, but it is actually a possible solution to the vague question in my opinion.
– Julie Pelletier
Jul 14 '16 at 2:57




There are a few things I'm not sure why they're included like restarting the ssh service, and this may not solve the problem, but it is actually a possible solution to the vague question in my opinion.
– Julie Pelletier
Jul 14 '16 at 2:57


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f220557%2finstall-nginx-1-8-on-centos-7%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Morgemoulin

Scott Moir

Souastre