You are viewing an old revision of this post, from January 2, 2018 @ 18:44:05 [Autosave]. See below for differences between this version and the current revision.

Centos – How to Install The Latest Apache Server

By default of Centos, you only can install Apache version 2.4.6, because Centos uses Security Backporting Practice to apply most recent fixes to older versions of a software package. As a result, it doesn’t mean that an older version provided by default repositories is vulnerable. But I need the latest version of Apache so that I can speed up my website. There is a great custom repo created by these guys CodeIT It provides latest versions of web servers (Apache & Nginx).

Before setting up the CodeIT repository, you need to enable the EPEL. It satisfies some dependencies required by the CodeIT repo.

sudo yum install -y epel-release
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo

Then verify the Apache package version again, and you should see something like that.

yum info httpd

Now you should have everything set up to install the latest Apache package.

yum install httpd
systemctl start httpd

Finally, tell systemd to start the Apache service automatically at boot.

systemctl enable httpd

That’s all if you have any troubles, please feel free to leave comments below.

Hope it is useful to you 🙂

Revisions

Revision Differences

January 2, 2018 @ 18:44:05 [Autosave]Current Revision
Content
Deleted: By default of Centos, you only can install Apache version 2.4.6, because Centos uses <a href="https:/ /access.redhat.com/security/ updates/backporting/">Security Backporting Practice</a> in order to apply most recent fixes to older versions of a software package. As a result, it doesn’t mean that an older version provided by default repositories is vulnerable. But I need the latest version of Apache so that I can speed up my website. Added: By default of Centos, you only can install Apache version 2.4.6, because Centos uses <a href="https:/ /access.redhat.com/security/ updates/backporting/">Security Backporting Practice</a> to apply most recent fixes to older versions of a software package. As a result, it doesn’t mean that an older version provided by default repositories is vulnerable. But I need the latest version of Apache so that I can speed up my website.
Deleted: There is a great custom repo created by these guys <a class="article- content__link" href="https:/ /codeit.guru/en_US/" target="_blank" rel="noopener" >CodeIT</a> It provides latest versions of web servers (Apache &amp; Nginx). Added: There is a great custom repo created by these guys <a class="article- content__link" href="https:/ /codeit.guru/en_US/" rel="noopener" >CodeIT</a> It provides latest versions of web servers (Apache &amp; Nginx).
Deleted: <p class="article- content__paragraph">Before setting up the CodeIT repository first of all you need to enable the <a class="article- content__link" href="https:/ /fedoraproject.org/wiki/EPEL" target="_blank" rel="noopener">EPEL</a>. It satisfies some dependencies required by the CodeIT repo.</p> Added: <p class="article- content__paragraph">Before setting up the CodeIT repository, you need to enable the <a class="article- content__link" href="https:/ /fedoraproject.org/wiki/EPEL" rel="noopener">EPEL</a>. It satisfies some dependencies required by the CodeIT repo.</p>
Unchanged: <pre>sudo yum install -y epel-release</pre>Unchanged: <pre>sudo yum install -y epel-release</pre>
Deleted: <div class="highlighted-source native bash "> Added: <div class="highlighted-source native bash">
Unchanged: <pre><span class="nb">cd</span> /etc/yum.repos.d <span class="o">&amp; &amp;</span> wget <a class="vglnk" href="https:/ /repo.codeit.guru/codeit.el" rel="nofollow" >https://repo.codeit.guru/ codeit.el</a><span class="sb">`</span>rpm -q --qf <span class="s2">"%{VERSION}"</span> <span class="k">$(</span>rpm -q --whatprovides redhat-release<span class="k">)</span><span class="sb">`</span>.repoUnchanged: <pre><span class="nb">cd</span> /etc/yum.repos.d <span class="o">&amp; &amp;</span> wget <a class="vglnk" href="https:/ /repo.codeit.guru/codeit.el" rel="nofollow" >https://repo.codeit.guru/ codeit.el</a><span class="sb">`</span>rpm -q --qf <span class="s2">"%{VERSION}"</span> <span class="k">$(</span>rpm -q --whatprovides redhat-release<span class="k">)</span><span class="sb">`</span>.repo
Unchanged: </pre>Unchanged: </pre>
Deleted: <p class="article- content__paragraph">Then verify the Apache package version again and you should see something like that.</p> Added: <p class="article- content__paragraph">Then verify the Apache package version again, and you should see something like that.</p>
Unchanged: <pre>yum info httpdUnchanged: <pre>yum info httpd
Unchanged: </pre>Unchanged: </pre>
Unchanged: <p class="article- content__paragraph">Now you should have everything set up to install the latest Apache package.</p>Unchanged: <p class="article- content__paragraph">Now you should have everything set up to install the latest Apache package.</p>
Unchanged: </div>Unchanged: </div>
Unchanged: <pre>yum install httpd</pre>Unchanged: <pre>yum install httpd</pre>
Unchanged: <pre>systemctl start httpdUnchanged: <pre>systemctl start httpd
Unchanged: </pre>Unchanged: </pre>
Unchanged: <p class="article- content__paragraph">Finally, tell <strong> systemd</strong> to start the Apache service automatically at boot.</p>Unchanged: <p class="article- content__paragraph">Finally, tell <strong> systemd</strong> to start the Apache service automatically at boot.</p>
 Added: <pre>systemctl enable httpd
 Added: </pre>
 Added: <div class="article-content">
 Added: <p class="article- content__paragraph">That’s all if you have any troubles, please feel free to leave comments below.</p>
 Added: Hope it is useful to you :)</div>

Note: Spaces may be added to comparison text to allow better line wrapping.

No comments yet.

Leave a Reply