×


Category: ModSecurity


Install Apache on CentOS 7 Server - Step by Step Process ?

This article covers how to install Apache on your CentOS 7 system. You can now ready to start deploying your applications and use Apache as a web server.

Basically, The Apache HTTP server is the most widely-used web server in the world. It provides many powerful features including dynamically loadable modules, robust media support, and extensive integration with other popular software.


To Install Apache on CentOS:

1. Update the local Apache httpd package index to reflect the latest upstream changes:

$ sudo yum update httpd

2. Once the packages are updated, install the Apache package:

$ sudo yum install httpd

3. Enable firewalld's http service with the following command:

$ sudo firewall-cmd --permanent --add-service=http

4. Configure Apache to serve content over HTTPS, you will also want to open up port 443 by enabling the https service:

$ sudo firewall-cmd --permanent --add-service=https

5. Finally, reload the firewall to put these new rules into effect:

$ sudo firewall-cmd --reload


Create a Sudo User on CentOS - How to do it ?

This article covers how to create a user with sudo privileges. You can now log in to your CentOS server with this user account and use sudo to run administrative commands.

Performing server administration as a non-root user is a best practice.

For security, your first task when deploying a CentOS instance is to create a non-root user with sudo access.


How to Add a New User Account on CentOS Linux System ?

1. To Create a new user account with the adduser command:

# adduser example_user

2. Set a strong password for the new user (new_user) with passwd.

# passwd new_user


Install Flameshot on CentOS 8 - Step by Step Process ?

This article covers how to install the flameshot application on CentOS 8.

You will also learn how you can remove it from your CentOS 8 if you don’t need more on your system.

Main features of flameshot includes:
1. Supports graphical and CLI mode.
2. Edit images instantly.
3. Image uploads to Imgur.
4. Export and import configuration.
5. Easy to use and customizable.

To Install Flameshot in Linux:
Flameshot can be installed using package managers. Before installing through this method make sure you verify the version that ships with your OS:

$ sudo dnf install flameshot  # Rhel, Centos, Fedora
$ sudo apt install flameshot  # Debian, Ubuntu-based distro 

OR
# Ubuntu based distribution

$ wget https://github.com/flameshot-org/flameshot/releases/download/v0.9.0/flameshot-0.9.0-1.ubuntu-20.04.amd64.deb
$ dpkg -i flameshot-0.9.0-1.ubuntu-20.04.amd64.deb

# Rhel based distribution

$ wget https://github.com/flameshot-org/flameshot/releases/download/v0.9.0/flameshot-0.9.0-1.fc32.x86_64.rpm
$ rpm -i flameshot-0.9.0-1.fc32.x86_64.rpm


Install MongoDB on CentOS 8 - Step by Step Process ?

This article covers MongoDB installation on CentOS 8 system.

Instead, it uses JSON-like documents with dynamic schemas, meaning that, unlike relational databases, MongoDB does not require a predefined schema before you add data to a database. 

You can alter the schema at any time and as often as is necessary without having to set up a new database with an updated schema.


How to Start the MongoDB Service and Test the Database on Ubuntu?

1. Run the following systemctl command to start the MongoDB service:

# sudo systemctl start mongod

2. Then check the service's status:

# sudo systemctl status mongod

This command will return output like the following, indicating that the service is up and running

3. After confirming that the service is running as expected, enable the MongoDB service to start up at boot:

# sudo systemctl enable mongod


How to Managing the MongoDB Service on Ubuntu?

1. The systemctl status command checks the status of the MongoDB service:

# sudo systemctl status mongod

2. You can stop the service anytime by typing:

# sudo systemctl stop mongod

3. To start the service when it’s stopped, run:

# sudo systemctl start mongod

4. You can also restart the server when it’s already running:

# sudo systemctl restart mongod

5. If you ever wish to disable this automatic startup, type:

# sudo systemctl disable mongod

6. Then to re-enable it to start up at boot, run the enable command again:

# sudo systemctl enable mongod


Install XAMPP on CentOS 8 - Step by Step process to do this ?

This article covers how to install XAMPP on your CentOS system. XAMPP is an easy to install and use Apache distribution packaged with MariaDB, PHP, and Perl.

XAMPP was first developed by a project team called Apache Friends. As an open-source Apache distribution of a PHP development environment, it consists of cross-platform software (X): Apache (A), MariaDB (M), PHP (P) and Perl (P). 


To install XAMPP on CentOS 8 Linux system:

1. Update system

Ensure your CentOS system is updated.

$ sudo dnf -y update
$ sudo dnf -y install libnsl

2. Download XAMPP on CentOS 8

Install wget on CentOS 8:

$ sudo dnf -y install wget

Download XAMPP installer. Choose the installer matching the PHP version you want to have.

### PHP 8.0 ###

$ wget https://www.apachefriends.org/xampp-files/8.0.1/xampp-linux-x64-8.0.1-0-installer.run

### PHP 7.4 ###

$ wget https://www.apachefriends.org/xampp-files/7.4.14/xampp-linux-x64-7.4.14-0-installer.run

### PHP 7.3 ###

$ wget https://www.apachefriends.org/xampp-files/7.3.26/xampp-linux-x64-7.3.26-0-installer.run

3. The binary installer should be executable.

### PHP 8.0 ###

$ chmod a+x xampp-linux-x64-8.0.1-0-installer.run

### PHP 7.4 ###

$ chmod a+x xampp-linux-x64-7.4.14-0-installer.run

### PHP 7.3 ###

$ chmod a+x xampp-linux-x64-7.3.26-0-installer.run

4. Then run the XAMP installer:

### PHP 8.0 ###

$ sudo ./xampp-linux-x64-8.0.1-0-installer.run

### PHP 7.4 ###

$ sudo ./xampp-linux-x64-7.4.14-0-installer.run

### PHP 7.3 ###

$ sudo ./xampp-linux-x64-7.3.26-0-installer.run


How to Start and use XAMPP on CentOS 8:

XAMPP is installed to /opt/lampp/. To start XAMPP services, run:

$ sudo /opt/lampp/lampp start

To verify installation of XAMPP on CentOS 8 visit the Apache web page:

http://localhost


Stopping and Uninstalling XAMPP on CentOS 8:

To stop XAMPP services run:

$ sudo /opt/lampp/lampp stop

To uninstall XAMPP on CentOS 8, run:

$ cd /opt/lampp
$ sudo ./uninstall
$ sudo rm-rf /opt/lampp


Install Sublime Text Editor on CentOS 8 - Step by Step process to do it ?

This article covers how to install sublime text editor on the CentOS 8 system through the terminal. Sublime text editor is quite similar to vim editor. Sublime text has a built-in Python API available in Windows, Linux, and Mac OS.


To install Sublime Text on Ubuntu:

1. Install the GPG key:

$ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

2. Ensure apt is set up to work with https sources:

$ sudo apt-get install apt-transport-https

3. Select the channel to use:

i. Stable

$ echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

ii. Dev

$ echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

4. Update apt sources and install Sublime Text:

$ sudo apt-get update
$ sudo apt-get install sublime-text


To fix yum-config-manager command not found:

You need to Install yum-utils by running the command below:

$ yum install yum-utils