Please check out my Udemy courses! Coupon code applied to the following links.
Reading Time: < 1minuteThe Apache web server is one of the most popular and powerful web servers in the world, due to its ease of administration and flexibility. In this tutorial, we will install Apache on a server that doesn’t have a web server or database server already installed.
- These instructions are intended for installing Apache on a single CentOS 7 node.
- I’ll be working from a Liquid Web Self Managed CentOS 7 server, and I’ll be logged in as non-root user. If you need more information then visit our tutorial on How to Add a User and Grant Root Privileges on CentOS 7.
- Install Apache:
- First, clean-up yum:
sudo yum clean all
- As a matter of best practice we’ll update our packages:
sudo yum -y update
- Installing Apache is as simple as running just one command:
sudo yum -y install httpd
- First, clean-up yum:
- Allow Apache Through the Firewall
- Allow the default HTTP and HTTPS port, ports 80 and 443, through firewalld:
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
- And reload the firewall:
sudo firewall-cmd --reload
- Allow the default HTTP and HTTPS port, ports 80 and 443, through firewalld:
- Configure Apache to Start on Boot
- And then start Apache:
sudo systemctl start httpd
- Be sure that Apache starts at boot:
sudo systemctl enable httpd
- And then start Apache:
- Other useful commands for Apache
- To check the status of Apache:
sudo systemctl status httpd
- To stop Apache:
sudo systemctl stop httpd
- To check the status of Apache:
Video Update By Jake Wright
Related Articles:
On this page
- Downloading and untaring
Intrusion Detection With BASE And Snort
This tutorial shows how to install and configure BASE (Basic Analysis and Security Engine) and the Snort intrusion detection system (IDS) on a Debian Sarge system. BASE provides a web front-end to query and analyze the alerts coming from a Snort IDS system. With BASE you can perform analysis of intrusions that Snort has detected on your network.
Scenario: A linux server running Debian Sarge 3.1 setup according to Falko's - The Perfect Setup - Debian Sarge (3.1).
Let's assume we have one working website (www.example.com) and that the document root is: /var/www/www.example.com/web
The IP of the server is 192.168.0.5 and it's using eth0 as network interface name.
Let's assume we have one working website (www.example.com) and that the document root is: /var/www/www.example.com/web
The IP of the server is 192.168.0.5 and it's using eth0 as network interface name.
Needed programs and files
- Snort
- Snort rules
- PCRE (Perl Compatible Regular Expressions)
- LIBPCAP
- BASE (Basic Analysis and Security Engine)
- ADOdb (ADOdb Database Abstraction Library for PHP (and Python).)
Downloading and untaring
We need a temporary place for all the files that we are going to download, and untar.
To keep things simple we will create a directory in the /root named snorttemp. (It's obvious that this download directory can be any name and in anyplace)
To keep things simple we will create a directory in the /root named snorttemp. (It's obvious that this download directory can be any name and in anyplace)
cd /root
mkdir snorttemp
cd snorttemp
mkdir snorttemp
cd snorttemp
Now you need to get Snort.
The latest version at the time of writing this is 2.6.0
The latest version at the time of writing this is 2.6.0
When the download is finished untar the file:
And let’s remove the tar file:
![How How](https://1.bp.blogspot.com/-Yprmvo23jN4/UfXU2BWgqgI/AAAAAAAACXo/1dxVYrsDcFY/w1200-h630-p-k-no-nu/Screen+Shot+2013-07-27+at+18.10.41+.png)
We also need the Snort rules!
Go to: http://www.snort.org/pub-bin/downloads.cgi and scroll down till you see the 'Sourcefire VRT Certified Rules - The Official Snort Ruleset (unregistered user release)' rules
(If you are a member of the forum you can also download the - registered user release):
Go to: http://www.snort.org/pub-bin/downloads.cgi and scroll down till you see the 'Sourcefire VRT Certified Rules - The Official Snort Ruleset (unregistered user release)' rules
(If you are a member of the forum you can also download the - registered user release):
Move the snortrules-pr-2.4.tar.gz into the snort-2.6.0 map:
and cd into snort-2.6.0:
Untar the snortrules-pr-2.4.tar.gz file:
Remove the tar file:
We are done downloading the files needed to get Snort to work.
To make snort work with BASE, we need more!
To make snort work with BASE, we need more!
PCRE - Perl Compatible Regular Expressions.
Go to: http://www.pcre.org/ and select a download link for the pcre-6.3tar.gz file to download PCRE (at time of writing this it is pcre-6.3.tar.gz)
cd back to the snorttemp map:
cd back to the snorttemp map:
and download the pcre-6.3.tar.gz file:
Untar the file:
Remove the tar: