Question

website in nginx tutorial not found

  • Posted February 16, 2013

The Digital Ocean tutorial “How to Install nginx on CentOS 6 with yum” lists a command containing a website: sudo su -c ‘rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

The command failed at the command line and gave a 404 error.

I verified that by going to the site directly: http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

That produces a 404 Not Found error (nginx/1.2.4).

Does anyone know the correct location? Also, is this step still necessary if I have already installed the LAMP package for Centos (following the digitak Ocean tutorial “How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6” article)?

Thanks.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

**

First Header Second Header
Content Cell Content Cell
Content Cell Content Cell

**

It’s not binding because something else is already using that port. You need to check what else is running see what it may be. <br> <br>On a side note, I recently had nginx do this because of a setting which seems to have changed in recent nginx versions or something (i havent looked in to it) it was caused by having two lines in nginx, one for ipv4 bind all and one for ipv6 bind all. This seems to have become auto both so only one line was necessary. You could check your nginx config.

As root, the package downloaded and installed successfully from what I can see, but nginx will not start (as per the article instructions). Sorry to be going through this step by step, but do you know why this would not bind? <br> <br> <br>Downloading Packages: <br>nginx-1.2.7-1.el6.ngx.x86_64.rpm | 364 kB 00:00 <br>Running rpm_check_debug <br>Running Transaction Test <br>Transaction Test Succeeded <br>Running Transaction <br>Warning: RPMDB altered outside of yum. <br> Installing : nginx-1.2.7-1.el6.ngx.x86_64 1/1 <br>---------------------------------------------------------------------- <br> <br>Thanks for using NGINX! <br> <br>Check out our community web site: <br>* http://nginx.org/en/support.html <br> <br>If you have questions about commercial support for NGINX please visit: <br>* http://www.nginx.com/support.html <br> <br>---------------------------------------------------------------------- <br> Verifying : nginx-1.2.7-1.el6.ngx.x86_64 1/1 <br> <br>Installed: <br> nginx.x86_64 0:1.2.7-1.el6.ngx <br> <br>Complete! <br>[root@01 ~]# /etc/init.d/nginx start <br>Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) <br>nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) <br>nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) <br>nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) <br>nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) <br>nginx: [emerg] still could not bind() <br> [FAILED] <br>

At the top the repo wasn’t added just su to root and run the commands and you should be good.

Raiyu - Thanks for your suggestions so far. I’m still not getting past the nginx install. I’ve included the output in case you can see what might be preventing it from working. <br> <br>[m@01 ~]$ wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm <br>–2013-02-17 01:35:23-- http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm <br>Resolving nginx.org… 206.251.255.63 <br>Connecting to nginx.org|206.251.255.63|:80… connected. <br>HTTP request sent, awaiting response… 200 OK <br>Length: 4311 (4.2K) [application/x-redhat-package-manager] <br>Saving to: nginx-release-centos-6-0.el6.ngx.noarch.rpm' <br> <br>100%[======================================>] 4,311 --.-K/s in 0.07s <br> <br>2013-02-17 01:35:23 (61.7 KB/s) - nginx-release-centos-6-0.el6.ngx.noarch.rpm’ saved [4311/4311] <br> <br>[m@01 ~]$ rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm <br>warning: nginx-release-centos-6-0.el6.ngx.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY <br>error: can’t create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied) <br>[m@01 ~]$ sudo yum install nginx <br>[sudo] password for mott: <br>Loaded plugins: fastestmirror <br>Loading mirror speeds from cached hostfile <br> * base: mirrors.lga7.us.voxel.net <br> * epel: epel.mirror.constant.com <br> * extras: mirror.symnds.com <br> * updates: mirror.team-cymru.org <br>Setting up Install Process <br>Resolving Dependencies <br>–> Running transaction check <br>—> Package nginx.x86_64 0:0.8.55-2.el5 will be installed <br>–> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Processing Dependency: libxslt.so.1()(64bit) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Processing Dependency: libssl.so.6()(64bit) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Processing Dependency: libgd.so.2()(64bit) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Processing Dependency: libexslt.so.0()(64bit) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Processing Dependency: libcrypto.so.6()(64bit) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Processing Dependency: libGeoIP.so.1()(64bit) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Running transaction check <br>—> Package GeoIP.x86_64 0:1.4.8-1.el5 will be installed <br>—> Package gd.x86_64 0:2.0.35-10.el6 will be installed <br>–> Processing Dependency: libpng12.so.0(PNG12_0)(64bit) for package: gd-2.0.35-10.el6.x86_64 <br>–> Processing Dependency: libpng12.so.0()(64bit) for package: gd-2.0.35-10.el6.x86_64 <br>–> Processing Dependency: libjpeg.so.62()(64bit) for package: gd-2.0.35-10.el6.x86_64 <br>–> Processing Dependency: libfreetype.so.6()(64bit) for package: gd-2.0.35-10.el6.x86_64 <br>–> Processing Dependency: libfontconfig.so.1()(64bit) for package: gd-2.0.35-10.el6.x86_64 <br>–> Processing Dependency: libXpm.so.4()(64bit) for package: gd-2.0.35-10.el6.x86_64 <br>–> Processing Dependency: libX11.so.6()(64bit) for package: gd-2.0.35-10.el6.x86_64 <br>—> Package libxslt.x86_64 0:1.1.26-2.el6_3.1 will be installed <br>—> Package nginx.x86_64 0:0.8.55-2.el5 will be installed <br>–> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: nginx-0.8.55-2.el5.x86_64 <br>—> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed <br>–> Running transaction check <br>—> Package fontconfig.x86_64 0:2.8.0-3.el6 will be installed <br>—> Package freetype.x86_64 0:2.3.11-14.el6_3.1 will be installed <br>—> Package libX11.x86_64 0:1.3-2.el6 will be installed <br>–> Processing Dependency: libX11-common = 1.3-2.el6 for package: libX11-1.3-2.el6.x86_64 <br>–> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.3-2.el6.x86_64 <br>—> Package libXpm.x86_64 0:3.5.8-2.el6 will be installed <br>—> Package libjpeg.x86_64 0:6b-46.el6 will be installed <br>—> Package libpng.x86_64 2:1.2.49-1.el6_2 will be installed <br>—> Package nginx.x86_64 0:0.8.55-2.el5 will be installed <br>–> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Running transaction check <br>—> Package libX11-common.noarch 0:1.3-2.el6 will be installed <br>—> Package libxcb.x86_64 0:1.5-1.el6 will be installed <br>–> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.5-1.el6.x86_64 <br>—> Package nginx.x86_64 0:0.8.55-2.el5 will be installed <br>–> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Running transaction check <br>—> Package libXau.x86_64 0:1.0.5-1.el6 will be installed <br>—> Package nginx.x86_64 0:0.8.55-2.el5 will be installed <br>–> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: nginx-0.8.55-2.el5.x86_64 <br>–> Finished Dependency Resolution <br>Error: Package: nginx-0.8.55-2.el5.x86_64 (epel) <br> Requires: perl(:MODULE_COMPAT_5.8.8) <br> You could try using --skip-broken to work around the problem <br> You could try running: rpm -Va --nofiles --nodigest <br>[m@01 ~]$ sudo /etc/init.d/nginx start <br>sudo: /etc/init.d/nginx: command not found <br>

Try this: <br> <br># wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm <br># rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm <br> <br>Then yum install nginx again.

After more digging, I found the following in a slicehost article: <br>sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm <br> <br>I used that, and then I tried <br>sudo yum install nginx <br> <br>I ended up getting some dependency issues and comments to work around from the messages coming back, which suggested using sudo yum install nginx --skip-broken <br> <br>A number of packages were skipped, including nginx-0.8.55-2.el5.x86_64 from epel <br> <br>I tried to continue on and start nginx as per the Digital Ocean article: <br>sudo /etc/init.d/nginx start <br> <br>but no go <br>sudo: /etc/init.d/nginx: command not found <br> <br>the website still renders apache, so I assume nginx was never installed <br> <br>given that it is the #2 web server - things have to be easier than this. <br> <br> <br>So, I ran it again <br>

I tried that and it says: <br>No package nginx available. <br>Error: Nothing to do. <br> <br>So, I assume I’m missing some files that I need to get from somewhere… <br>

As long as you get no errors running : sudo yum install nginx <br> <br>You should be good to go.