How to install nginx 1.9.15 on amazon linux disto
<p>I try to install the latest version of nginx (>= 1.9.5) on a fresh amazon linux to make use of http2. I followed the instructions that are described here -> <a href="http://nginx.org/en/linux_packages.html" rel="noreferrer">http://nginx.org/en/linux_packages.html</a></p>

<p>I created a repo file <code>/etc/yum.repos.d/nginx.repo</code>with this content: </p>

<pre><code>[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/7/$basearch/
gpgcheck=0
enabled=1
</code></pre>

<p>If I run <code>yum update</code> and <code>yum install nginx</code> I get this:</p>

<p><code>nginx  x86_64 1:1.8.1-1.26.amzn1  amzn-main  557 k</code></p>

<p>It seems that it fetches still from the amzn-main repo. How do I install a newer version of nginx?</p>

<p>-- edit --
I added "priority=10" to the nginx.repo file and now I can install 1.9.15 with <code>yum install nginx</code> with this result:</p>

<pre><code>Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package nginx.x86_64 1:1.9.15-1.el7.ngx will be installed
--&gt; Processing Dependency: systemd for package: 1:nginx-1.9.15-1.el7.ngx.x86_64
--&gt; Processing Dependency: libpcre.so.1()(64bit) for package: 1:nginx-1.9.15-1.el7.ngx.x86_64
--&gt; Finished Dependency Resolution
Error: Package: 1:nginx-1.9.15-1.el7.ngx.x86_64 (nginx)
           Requires: libpcre.so.1()(64bit)
Error: Package: 1:nginx-1.9.15-1.el7.ngx.x86_64 (nginx)
           Requires: systemd
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
</code></pre>