If you are into the Linux platform, you might have definitely heard about the Apache webserver. Apache was the most popular open-source web server project for a few decades. Even today, Apache holds a share of around 30% in webserver. If you own a website running on an Apache web server, then it is your responsibility to keep the web server healthy. To keep the health, you should update, patch, configure, or install the latest version of Apache. However, the problem in installing the latest Apache on the Linux system is no Linux distributions will release the compelled and built package for Apache as soon as the new package is released. To install the latest Apache either you should wait until your distribution release the latest compelled package for Apache or you should download the latest version of the source code, build and install it on your Linux server. In this post, we will show you the step-by-step procedure to install the latest version of Apache from the source code on Ubuntu.
Run this command to see the Operating System distribution, version, build, and architecture. Make a note of this information for your reference.
# lsb_release -a ; getconf LONG_BIT
Download the Apache source code under the /usr/local/src/ directory. Unzip the archive file and get inside the directory.
Change the directory to src
# cd /usr/local/src/
Use wget to download the Apache source code package
# wget https://dlcdn.apache.org//httpd/httpd-2.4.50.tar.bz2
Unzip the downloaded package. Package will be unzipped into a directory
# tar -xf httpd-2.4.50.tar.bz2
Change the directory
# cd httpd-2.4.50
Build the installation package from the source using the configuration command as shone here.
Create a new directory for the installation. We can’t install Apache in the same directory we have the source.
# mkdir /usr/local/apache2.4.50
Use the configure command to build the installation package. Specify the installation directory with the –prefix parameter.
# ./configure –prefix=/usr/local/apache2.4.50 –enable-shared=max
If you get the Apr error “checking for ARP… no”. Some packages are not installed on your server. You can fix the error by installing these packages.
1. build-essential
2. libssl-dev
3. libexpat-dev
4. libpcre3-dev
5. libapr1-dev
6. libaprutil1-dev
# apt install build-essential libssl-dev libexpat-dev libpcre3-dev libapr1-dev libaprutil1-dev
You can install the package upon the successful build. You should see the summary of the build after the successful completion.
Run this make and make install commands to install the Apache server on Ubuntu.
# make && make install
You can start, stop, and restart the Apache server with apachectl command from its bin directory.
# /usr/local/apache2.4.50/bin/apachectl start
# /usr/local/apache2.4.50/bin/apachectl stop
# /usr/local/apache2.4.50/bin/apachectl restart
Run this command to check the status of the Apache service.
# ps -ef | grep apache2
That’s it. This is how you can install the latest version of Apache from source code on Ubuntu.
We hope this tutorial post will help you in installing Apache from the source code. Thanks for reading this threat post. Please share this post and help to secure the digital world. Visit our social media page on Facebook, LinkedIn, Twitter, Telegram, Tumblr, & Medium and subscribe to receive updates like this.
You may also like these articles:
Arun KL is a cybersecurity professional with 15+ years of experience in IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.
“Knowledge Arsenal: Empowering Your Security Journey through Continuous Learning”
"Cybersecurity All-in-One For Dummies" offers a comprehensive guide to securing personal and business digital assets from cyber threats, with actionable insights from industry experts.
BurpGPT is a cutting-edge Burp Suite extension that harnesses the power of OpenAI's language models to revolutionize web application security testing. With customizable prompts and advanced AI capabilities, BurpGPT enables security professionals to uncover bespoke vulnerabilities, streamline assessments, and stay ahead of evolving threats.
PentestGPT, developed by Gelei Deng and team, revolutionizes penetration testing by harnessing AI power. Leveraging OpenAI's GPT-4, it automates and streamlines the process, making it efficient and accessible. With advanced features and interactive guidance, PentestGPT empowers testers to identify vulnerabilities effectively, representing a significant leap in cybersecurity.
Tenable BurpGPT is a powerful Burp Suite extension that leverages OpenAI's advanced language models to analyze HTTP traffic and identify potential security risks. By automating vulnerability detection and providing AI-generated insights, BurpGPT dramatically reduces manual testing efforts for security researchers, developers, and pentesters.
Microsoft Security Copilot is a revolutionary AI-powered security solution that empowers cybersecurity professionals to identify and address potential breaches effectively. By harnessing advanced technologies like OpenAI's GPT-4 and Microsoft's extensive threat intelligence, Security Copilot streamlines threat detection and response, enabling defenders to operate at machine speed and scale.