centos – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Wed, 07 Sep 2022 12:53:27 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 Top 10 Best Linux Server Distributions in 2022 https://tecadmin.net/best-linux-server-distributions/ https://tecadmin.net/best-linux-server-distributions/#comments Wed, 30 Jun 2021 13:50:37 +0000 https://tecadmin.net/?p=26403 Though Windows is the well-known operating system among the common masses, the majority of developers and tech specialists prefer Linux because of its stability, security, and flexibility of customization. Linux has not been performing well in personal Desktop Computers, but it is the preferred operating system when it comes to powering servers and supercomputers. Even [...]

The post Top 10 Best Linux Server Distributions in 2022 appeared first on TecAdmin.

]]>
Though Windows is the well-known operating system among the common masses, the majority of developers and tech specialists prefer Linux because of its stability, security, and flexibility of customization. Linux has not been performing well in personal Desktop Computers, but it is the preferred operating system when it comes to powering servers and supercomputers. Even Microsoft uses Linux for its cloud environments.

Linux is a free, open-source, and very lightweight operating system. It is highly customizable and can easily be optimized to perform specific tasks very quickly. It is more stable, secure, and scalable than the other operating systems, making it the best option when it comes to choosing an operating system for Servers.

The variety of options Linux provides makes it very unique. There are hundreds of different Linux distributions available on the web, which makes the already difficult process of choosing the correct distribution even more confusing.

The first question the IT administrators face is which distribution they will be using for their Servers. This question has no single correct answer. Most of the time, it just comes down to personal choice/preference. But there are other factors you need to look at while choosing the right distribution, like flexibility, reliability, and the task at hand.

10 Best Linux Server Distributions
10 Best Linux Server Distributions

This post will discuss the top ten Linux distributions for servers. We will discuss why these options are one of the best out there. So let’s begin.

1. UBUNTU Server

We’ll start with Ubuntu as it is the most popular and well-known distribution of Linux. It needs no introduction as most people who are familiar with Linux also know about Ubuntu. This distribution is based on Debian and is mostly composed of open-source software. It is free and accessible for everyone.

It has three different editions:

  • Server
  • Desktop
  • Core

Ubuntu Linux Server

Ubuntu also has an LTS version which offers five years of Long Term Support. By using this version, you’ll get essential security updates every five years and you won’t even have to upgrade to a newer version. Moreover, it supports a variety of processors like x86 and ARM64. It comes with many pre-installed features and tools that make it suitable for various types of servers such as files, email, and media servers.

The company behind Ubuntu, Canonical, has now released Ubuntu Cloud, which supports various cloud-based platforms.

Website: https://ubuntu.com/server

Minimum Requirements

  • RAM: 1 GB
  • Hard Drive: of 2.5 GB
  • CPU: 1 GHz

Key Features

  • Regular Updates
  • 5 Years Support of LTS
  • High Scalability
  • Ubuntu Cloud

2. DEBIAN Server

The second distribution on our list is Debian. It is one of the oldest Linux distributions which has stood the test of time. Many distributions such as Ubuntu, use Debian as their base.

This distribution lacks the latest features, but its unparalleled stability covers up the shortcomings. It has a powerful software packaging system and comes with 50000+ packages. Debian supports many computer architectures such as amd64 and Aarch64.

Debian Linux Server

Debian also offers Long term and Extended Long term versions. It also has three different editions:

  • Stable
  • Unstable
  • Testing

As the name suggests, the stable version offers stability and security. The unstable version has the latest features but can break down at any point. The testing version also has up-to-date software but breaks less often than the unstable version.

Website: https://www.debian.org/

Minimum Requirements

  • RAM: 256MB
  • Recommended RAM: 512MB
  • Hard Drive: 2 GB
  • Processor: 1GHz

Key Features

  • Stability
  • Security
  • Strong Package manager with a high number of Packages
  • Extensive Hardware Support
  • Smooth Upgrades

3. FEDORA Server

The third distribution on our list is Fedora. It is a community-developed distribution that delivers the latest in open-source, free software. It serves as the testing ground for RHEL distribution. It has various editions for different user types, such as desktop computer users, servers, IoT devices, and cloud computing. It has all the latest features but those come at the cost of a short life cycle.

Website: https://getfedora.org/

Fedora Linux Server

Minimum Requirements

  • RAM: 128MB
  • Hard Drive: 1 GB
  • Processor: 2GHz

Key Features

  • Latest Software
  • Dynamic Firewall
  • Active Development

4. Red Hat Enterprise Linux (RHEL)

RHEL, short for Red Hat Enterprise Linux, is an open-source Linux distribution developed by Red Hat, Inc. based on Fedora and does not offer the cutting-edge software that Fedora provides. But it does offer more stability and an LTS version with a 10-year lifespan.

RHEL was made for commercial purposes and provided enterprise-level support. It is a paid Linux distribution, unlike almost all other distributions in this list. However, Red Hat Inc does freely provide its source code.

Redhat Enterprise Linux Server

This Linux distribution offers one of the longest long-term support. With this distribution, you get a ton of exclusive tools and software.

This distribution is best suited for cloud-based servers and data centers.

Minimum Requirements

  • RAM: 512 MB
  • Hard Drive: 1 GB
  • Processor: 2GHz

Key Features

  • 10 Years of LTS (Long Term Support)
  • Kernel Patching Without Reboot

5. OpenSUSE Leap

The next distribution on our list is famous for its adaptability and flexibility. It is available for desktop computers, laptops, servers, and notebooks. It has two different releases:

  • Leap
  • Tumbleweed

OpenSUSE Linux Server

Leap is the standard release, while Tumbleweed is the rolling release of OpenSUSE. Most people prefer Leap for its stability. It has a cloud-agnostic design and has multi-mode architecture. This distribution has a great community that can help the users if they face any problems.
OpenSUSE does not have a separate ISO image for servers. Instead, its default installer has the option for server installation.

Website: https://www.opensuse.org/

Minimum Requirements

  • RAM: 1 GB
  • Hard Drive: 10 GB
  • Processor: 1.6 GHz

Key Features

  • Stable
  • Variety of Tools

6. SUSE Linux Enterprise Server

The sixth distribution on our list is SLES. It is based on OpenSUSE, just like RHEL is based on Fedora. OpenSUSE and SUSE Linux Enterprise Server have the same parent company, SUSE, a Germany-based open-source software company.
SLES is a commercial product of SUSE, while OpenSUSE is their non-commercial distro.

SLES has long gaps between new releases. SLES products undergo intense testing, and only the most stable and mature components are added to the final product.

Suse Linux Enterprise Server

It is very stable and secure and is used by major companies like Amazon and Google. This distro is suitable for all types of servers.

Website: https://www.suse.com/products/server/

Minimum Requirements

  • Hard Drive: 3.5 GB
  • RAM: 512
  • Processor: 1GHz

Key Features

  • LTS
  • Flexible and Configurable
  • Powerful Tools

7. Oracle Linux

Next up, we have Oracle Linux, which is an open-source Linux distribution compiled from RHEL source code. This distribution is packaged and distributed by Oracle and is compatible with RHEL’s application library. It offers powerful tools which make it suitable for memory management and file organization. It can be used for virtual environments and data systems.

Oracle Linux Server

This distribution is entirely free. However, Oracle does offer paid premium support. It is a competitor of RHEL and is best for small to large-scale enterprises.

Minimum Requirements

  • Hard Drive: 1 GB
  • RAM: 1 GB
  • Processor: 1 GHz

Key Features

  • RHEL compatibility
  • Tools for network stacking

8. Arch Linux

The eighth distribution on our list has been decreasing in popularity in recent times. It is not beginner-friendly and is suitable for experienced users as it does not offer the level of supporting the other distributions in this list do.

ArchLinux is a general-purpose distribution and can be heavily customized according to one’s needs.

Arch Linux Server

If you’re looking for secure, lightweight distribution, and can be customized according to one’s needs, then ArchLinux is the best option out there.

Minimum Requirements

  • Hard Drive: 2 GB
  • RAM: 512 MB
  • Processor: 1GHz

Key Features

  • Heavily Customizable
  • For Experienced Users
  • Extremely lightweight and Stable

9. Slackware OS

This is another distribution that is suitable for experienced Linux users. It does not offer any official support.

This distribution is mainly suited for people who are comfortable with using the terminal as it does not offer graphical installation. It does not have auto-dependency resolution as well. These characteristics make it extremely lightweight and stable, enabling it to run on even a decade-old system.

Slackware Linux Server

The administration and configuration of Slackware are handled mainly by simple text files and shell scripts.

Although this distribution is extremely lightweight, it still comes with a lot of powerful development tools.

Minimum Requirements

  • 64MB RAM (1GB+ suggested)
  • Hard Drive: 100MB (1GB recommended)
  • Processor: 486 processor

Key Features

  • For experienced users
  • Extremely lightweight and stable
  • It runs on older systems
  • Thriving community

10. Mageia Linux

The last distribution on our list is a fork of Mandriva called Mageia. It is known for its user-friendly environment and graphic driver support. It is a community-driven simple, secure, stable, and flexible distribution.

Mageia Linux Server

This distribution is relatively new and comes with lots of powerful tools and packages.

Minimum Requirements

  • Any AMD, Intel, or VIA processor
  • 512 MB RAM
  • 5 GB Hard Drive

Key Features

  • Support for various types of servers and databases
  • Community-based

Conclusion

As you can see, each Linux distribution is unique and is customized and optimized for a certain task.

If you want to go with a thriving community, then going with Ubuntu is the best option. On the other hand, ArchLinux and SlackwareOS are preferred by experienced users. Fedora and OpenSUSE are famous for their latest and cutting-edge features. While the RHEL and SUSE are the paid commercialized distributions used by the big companies like Google, Amazon, and other Fortune 500.

So the decision of choosing the right Linux server just comes down to two things, i.e., personal preference and the task at hand.

The post Top 10 Best Linux Server Distributions in 2022 appeared first on TecAdmin.

]]>
https://tecadmin.net/best-linux-server-distributions/feed/ 2
How To Install Security Updates on CentOS 8 (Manual + Automatic) https://tecadmin.net/how-to-install-security-updates-on-centos-8/ https://tecadmin.net/how-to-install-security-updates-on-centos-8/#respond Wed, 09 Jun 2021 08:38:35 +0000 https://tecadmin.net/?p=25705 Updates are essential in any operating system environment because it allows application, processes and the operating system itself to be in a consistent working condition. That’s also the reason that most of the updates include security compatibility and enhancements. Why are security updates so important to install? Your computer’s vulnerabilities are fixed with the help [...]

The post How To Install Security Updates on CentOS 8 (Manual + Automatic) appeared first on TecAdmin.

]]>
Updates are essential in any operating system environment because it allows application, processes and the operating system itself to be in a consistent working condition. That’s also the reason that most of the updates include security compatibility and enhancements.

Why are security updates so important to install?

Your computer’s vulnerabilities are fixed with the help of security updates. These updates protect your system from local and remote threats. When developers found any vulnerability, they try to fix it quickly and then distribute the “quick fix” as a security update for you to install it as soon as possible. As those vulnerabilities become public, permitting the potential attackers to exploit them. This statement declares that an outdated system is vulnerable, but it is also recognized as a vulnerable system for attackers.

Security updates also play a significant role in the Linux environment since they give the administrator complete control over performance expectations. Therefore, it’s usually a good idea to keep your Linux software up to date, especially when we talk about its security. Users should generally install security updates in Linux systems within 30 days of their release date. This post will demonstrate the manual and automatic installation method of security update on your CentOS 8. So let’s head towards this journey!

Manual Installation Method of Security Updates:

Now you will look at the procedure of checking and installing security updates manually. Additionally, this section comprises checking system updates and manually updating a particular package on your system.

1. First of all, open up your terminal and write out the below-given command to note down your current kernel version of CentOS 8.

uname -r 

Check Kernal Version on CentOS 8

2. Next, we will check for the security updates on the system. For that, execute the following command:

dnf check-update 

DNF Check Packages Update CentOS 8

3. To install the available security updates for installed packages on your CentOS 8, utilize this command:

sudo dnf update --security 

DNF Check Security Update CentOS 8

4. The output declares that the system doesn’t need any security updates. In other cases, execute the below-given commands:

sudo dnf upgrade --security 

DNF Upgrade Security Packages CentOS 8

5. You can also verify if there exists any notice related to security updates.

$ sudo dnf updateinfo 

DNF Check Update Info CentOS 8

6. To manually a single package, specify the name of the package in the “check-update” command. For instance, we will try to update the “firewalld.noarch” package manually.

sudo dnf check-update firewalld.noarch 

DNF Upgrade Specific Package Manually CentOS 8

Automatic Installation method of Security Updates:

Although security updates can be checked and installed manually, the automatic way is safer. Unfortunately, sometimes, we may forget about the security updates, making our system vulnerable to inadvertent attacks.

1. In this regard, “dnf-automatic” is utilized to run automatic security updates and regularly using cron tasks and system timers. This also minimizes the need for ongoing engagement by the system administrator.
Write out the following command to install “dnf-automatic” on your CentOS 8.

sudo dnf install dnf-automatic  

Install dnf-automatic Package on CentOS 8

Enter “y” for giving permission to the installation process.

2. Execute the below-given command to verify if everything is correctly installed or not.

rpm -qi dnf-automatic  

The output will provide you lots of information about the installed “dnf-automatic” which includes its version, group, size, packager, architecture, etc.

3. Now, we will update the configuration file of dnf-automatic.

sudo nano /etc/dnf/automatic.conf 

On your system, the dnf-configuration file will be edited:

4. In the commands section modify the “upgrade_type” as follows:

upgrade_type = security

DNF Set Automatic Upgrade to Security

5. Also, you have to add your system name in the “emitters” section and set its mode to “motd”.

system_name = CentOS 8

emit_via = motd

DNF Automatical Upgrade Settings on CentOS 8

6. To begin the execution of the whole procedure, start and enable the “dnf-automatic” on your CentOS 8 system.

sudo systemctl enable --now dnf-automatic.timer 

DNF enable automatic timer service CentOS 8

7. Check the “dnf-automatic” service status.

sudosystemctl list-timers * dnf- * 

You will see the “no timer listed” output if you haven’t created any timer task. Otherwise, the output will let you know the details about the assigned tasks and their specific time.

Conclusion

Always be aware of the procedures to protect your system against threats and vulnerabilities. The first step is to keep your Linux-based system up-to-date. In this post, we have shared the methods of manual and automatic installation of security updates on your CentOS 8.

The post How To Install Security Updates on CentOS 8 (Manual + Automatic) appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-security-updates-on-centos-8/feed/ 0
How to Install Python 3.9 on CentOS/RHEL 8 https://tecadmin.net/install-python-3-9-on-centos-8/ https://tecadmin.net/install-python-3-9-on-centos-8/#comments Mon, 30 Nov 2020 17:59:09 +0000 https://tecadmin.net/?p=23473 Recently, the Python development team released the latest stable version of Python 3.9. You can download it from its official pages. The new version comes with multiple new features and security updates. Python 3.9 uses a new more flexible parser, based on PEG, which replaces the LL parser. In the next Python versions, the old [...]

The post How to Install Python 3.9 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
Recently, the Python development team released the latest stable version of Python 3.9. You can download it from its official pages. The new version comes with multiple new features and security updates. Python 3.9 uses a new more flexible parser, based on PEG, which replaces the LL parser. In the next Python versions, the old parser will be deleted.

This tutorial describes how to install Python 3.9 on CentOS 8 and RHEL 8 systems. In this tutorial, we will install Python from the source code.

Prerequisites

This Python installation required the GCC compiler on your system. Login to your server using ssh or shell access. Now, use the following command to install prerequisites for Python before installing it.

sudo dnf install wget yum-utils make gcc openssl-devel bzip2-devel libffi-devel zlib-devel 

Step 1 – Download Python 3.9

Visit the official download site https://www.python.org/ftp/python to download the latest or required version of the Python.

Command line users can download Python 3.9 via command line:

wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz 

Then, extract the archive file on your system

tar xzf Python-3.9.6.tgz 

This will create a directory named Python-3.9.6 in the current directory containing all source files for Python 3.9.

Step 2 – Install Python on CentOS 8

Change directory to Python-3.9.6. Then prepare the source code with the required values before compiling it.

cd Python-3.9.6 
sudo ./configure --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions 

Next, compile the source code with make. Here nproc will provide the number of CPU cores available on system. So that make can perform well.

sudo make -j ${nproc} 
sudo make altinstall 
make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

Now, we don’t need the downloaded archive file, so delete it to free space.

sudo rm Python-3.9.6.tgz 

Step 3 – Test Python Version

At this step, you have successfully installed Python 3.9 on CentOS/RHEL system. Now, check the installed versions of Python and PIP.

Check Python Version:

python3.9 -V  

Python 3.9.6

Check PIP Version:

pip3.9 -V  

pip 20.2.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)

Step 4 – Create Virtual Environment

It is a good idea to create a separate virtual environment for each Python application. Which provides an isolated environment where the Python project has its own modules and set of dependencies.

To create Python virtual environment, run:

sudo /usr/local/bin/python3.9 -m venv /home/rahul/python-app/venv 

All the files will be generated under /home/rahul/python-app/venv directory. You can active the environment by running command:

source /home/rahul/python-app/venv/bin/activate 

Do your stuff with isolated environment here. Once you finish with your work, deactivate the environment by typing:

deactivate 

This will return you back to the main system prompt.

Conclusion

This tutorial described you to install Python 3.9 on CentOS 8 and RHEL 8 systems using source code.

The post How to Install Python 3.9 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-python-3-9-on-centos-8/feed/ 3
How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 34/33 https://tecadmin.net/install-python-3-9-on-centos/ https://tecadmin.net/install-python-3-9-on-centos/#comments Mon, 02 Nov 2020 15:23:10 +0000 https://tecadmin.net/?p=23349 Recently, the Python development team released the latest stable version of Python 3.9. You can download it from its official pages. The new version comes with multiple new features and security updates. This tutorial will help you to install Python 3.9 on CentOS/RHEL 7 & Fedora systems. We will compile Python from the source code. [...]

The post How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 34/33 appeared first on TecAdmin.

]]>
Recently, the Python development team released the latest stable version of Python 3.9. You can download it from its official pages. The new version comes with multiple new features and security updates.

This tutorial will help you to install Python 3.9 on CentOS/RHEL 7 & Fedora systems. We will compile Python from the source code.

Prerequisites

This Python installation required the GCC compiler on your system. Login to your server using ssh or shell access. Now, use the following command to install prerequisites for Python before installing it.

sudo yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel 

Step 1 – Download Python 3.9

Download Python using following command from python official site. You can also download the latest version in place of the specified below.

wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz 

Then, extract the archive file on your system:

tar xzf Python-3.9.6.tgz 

This will create a directory named Python-3.9.6 in the current directory.

Step 2 – Install Python 3.9 on CentOS

Change directory to Python-3.9.4 and use the following commands to compile Python source code on your system using altinstall.

cd Python-3.9.6 
sudo ./configure --enable-optimizations 
sudo make altinstall 
make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

Now remove downloaded source archive file from your system

sudo rm Python-3.9.6.tgz 

Step 3 – Test Python Version

Check the latest version installed of python using the below command

python3.9 -V  

Python 3.9.6

Conclusion

In this tutorial, you have learned to install Python 3.9 on CentOS 7 and Fedora systems using source code.

The post How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 34/33 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-python-3-9-on-centos/feed/ 3
How to Install Angular CLI on CentOS/RHEL 8/7/6 https://tecadmin.net/install-angular-cli-on-centos/ https://tecadmin.net/install-angular-cli-on-centos/#comments Sat, 22 Jun 2019 04:58:35 +0000 https://tecadmin.net/?p=18779 Angular is an frameworks, libraries, assets, and utilities. It keeps track of all the components and checks regularly for their updates. This tutorial will help you to install the Angular CLI tool on CentOS 8/7/6 and RHEL 8/7/6 Linux operating systems. Step 1 – Install Node.js First of all, you need to install node.js on [...]

The post How to Install Angular CLI on CentOS/RHEL 8/7/6 appeared first on TecAdmin.

]]>
Angular is an frameworks, libraries, assets, and utilities. It keeps track of all the components and checks regularly for their updates. This tutorial will help you to install the Angular CLI tool on CentOS 8/7/6 and RHEL 8/7/6 Linux operating systems.

Step 1 – Install Node.js

First of all, you need to install node.js on your system. Use the following set of commands to configure node.js yum repository in your CentOS system and install it.

curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
sudo yum install nodejs

Make sure you have successfully installed node.js and NPM on your system

node --version
npm --version

Step 2 – Install Angular/CLI

After installation of node.js and npm on your system, use the following commands to install the Angular CLI tool on your system.

npm install -g @angular/cli

This will install the latest available Angular CLI version on your system. To install specific Angular version run command as following with version number.

npm install -g @angular/cli@6     #Angular 6
npm install -g @angular/cli@7     #Angular 7
npm install -g @angular/cli@8     #Angular 8
npm install -g @angular/cli@9     #Angular 9

Using the -g above command will install the Angular CLI tool globally. So it will be accessible to all users and applications on the system. Angular CLI provides a command ng used for command-line operations. Let’s check the installed version of ng on your system.

ng --version



    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 9.0.7
Node: 12.16.1
OS: linux x64

Angular:
...
Ivy Workspace:

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.900.7
@angular-devkit/core         9.0.7
@angular-devkit/schematics   9.0.7
@schematics/angular          9.0.7
@schematics/update           0.900.7
rxjs                         6.5.3

Step 3 – Create New Angular Application

Now, create a new application named hello-angular4 using the Angular CLI tools. Execute the commands to do this:

ng new hello-angular

Output:

...
...
added 1011 packages from 1041 contributors and audited 19005 packages in 55.774s
found 0 vulnerabilities

    Successfully initialized git.

This will create a directory named hello-angular4 in your current directory, and create an application.

Step 4 – Serve Angular Application

Your basic Angular application is ready to serve. Change directory to hello-angular4 and run your Angular application using ng serve command.

cd hello-angular
ng serve

You can access your angular application on localhost port 4200, Which is the default host and port used by Angular application.

  • http://localhost:4200

You can change host and port for running Angular application by providing –host and –port command line arguments.

ng serve --host 0.0.0.0 --port 8080

The IP address 0.0.0.0 listens on all interfaces and publically accessible.

The post How to Install Angular CLI on CentOS/RHEL 8/7/6 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-angular-cli-on-centos/feed/ 3
How To disable SELinux on CentOS 7 https://tecadmin.net/disable-selinux-on-centos7/ https://tecadmin.net/disable-selinux-on-centos7/#respond Thu, 20 Sep 2018 11:22:30 +0000 https://tecadmin.net/?p=19341 SELinux (Security-Enhanced Linux) is a Linux kernel security module that provides enhanced security for Linux systems. SELinux provides a mechanism for supporting access control security policies. This specifies how the processes communicate with each other and interact with the files. SELinux Modes: SELinux has three modes to run. By default, SELinux runs in Enforcing mode [...]

The post How To disable SELinux on CentOS 7 appeared first on TecAdmin.

]]>
SELinux (Security-Enhanced Linux) is a Linux kernel security module that provides enhanced security for Linux systems. SELinux provides a mechanism for supporting access control security policies. This specifies how the processes communicate with each other and interact with the files.

SELinux Modes:

SELinux has three modes to run. By default, SELinux runs in Enforcing mode on CentOS 7

  • Enforcing – SELinux security policy is enforced.
  • Permissive – SELinux allows access but prints warnings on rules voilation.
  • Disabled – No SELinux policy is loaded.

Check SELinux Status

You can use getenforce command to view the status of SELinux. Another command sestatus gives you more details about SELinux status.

Press CTRL+ALT+T to launch a terminal and type:

sestatus 
Output:
SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 31

The above status shows that SELinux is enabled and enforcing.

How to disable SELinux on CentOS 7

You can disable SELinux permanently by edition the /etc/selinux/config file in CentOS 7 and RHEL 7 systems. Edit the SELinux configuration file and set SELINUX=disabled to permanently disable the SELinux on a CentOS 7 system. This will completely disable all the SELinux context.

sudo nano /etc/selinux/config 

Set SELINUX value to disabled:

SELINUX=disabled

Disable SELinux on CentOS/RHEL 8

Reboot your instance to apply changes.

You can again activate the SELinux by setting SELINUX=enforcing in configuration file. Instead of disabling SELinux, you can set it to permissive mode.

Set SELinux in Permissive Mode (Temporary)

The permissive mode means the SELinux policy is not enforced. SELinux does not deny any operations even they do policy violations. It only creates logs, which is helpful for debugging.

You can set the SELinux in permissive mode temporarily by using one of the below commands.

sudo setenforce 0 
sudo setenforce Permissive 

Once the system rebooted, the temporary mode will be disabled and SELinux will again in enforcing. Use the next method to apply changes permanently.

Set SELinux in Permissive Mode (Permanent)

You can also Configure SELinux Permissive Mode Permanently by editing the configuration file. Edit the configuration in in your favorite text edit:

sudo nano /etc/selinux/config 

Set the SELINUX value to permissive.

SELINUX=permissive

Set SELinux in Permissive Mode

Save your file and close. Then reboot your system to apply changes.

Concusion

In this tutorial, you have learned how to disable SELinux on CentOS 7. Additionally discussed disabling SELinux permanently or set this to permissive mode on CentOS 7 or RHEL 7 Linux systems.

You can read more about SELinux on its official site: What is SELinux?

The post How To disable SELinux on CentOS 7 appeared first on TecAdmin.

]]>
https://tecadmin.net/disable-selinux-on-centos7/feed/ 0
How to Install Redis Cache Server on CentOS 7/6 https://tecadmin.net/install-redis-centos/ https://tecadmin.net/install-redis-centos/#comments Thu, 22 Mar 2018 15:52:01 +0000 https://tecadmin.net/?p=15527 Redis is an in-memory data structure store, used as a database server, cache, and message broker. It also provides a PHP module for communication between PHP script with the Redis server. Redis is written in C programming language. This tutorial will help you with the installation of the Redis server along with PHP Redis PHP [...]

The post How to Install Redis Cache Server on CentOS 7/6 appeared first on TecAdmin.

]]>
Redis is an in-memory data structure store, used as a database server, cache, and message broker. It also provides a PHP module for communication between PHP script with the Redis server. Redis is written in C programming language.

This tutorial will help you with the installation of the Redis server along with PHP Redis PHP extensions on a CentOS 7/6 server.

Step 1 – Prerequisites

First of all, log in to your server using shell access with the root account.

ssh root@remote

Redis packages are not available under default yum repositories. You need to enable EPEL yum repository on your server first. Execute below command to enable:

### CentOS/RHEL 7 
yum install epel-release

### CentOS/RHEL 6 
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Step 2 – Install Redis Server

Now, You can use the yum package manager to install the Redis server on a VPS. Execute command to install Redis on your systems:

yum install redis

After successfully installation start Redis service and enable auto-start on system reboot.

### CentOS/RHEL 7 
systemctl enable redis
systemctl start redis

### CentOS/RHEL 6 
chkconfig redis on
service redis restart

Redis server is up and running on your system.

Step 3 – Install Redis PHP extension

We assume you already have PHP installed on your system. You must have PHP pear package installed on your system.

yum install php-pear php-devel

Now, execute commands to enable Redis PHP extension on your CentOS server.

pecl install igbinary igbinary-devel redis

After that execute a command to verify Redis PHP extension is enabled:

php -m | grep redis

Redis server has been installed on your system along with the PHP extension.

Step 4 – Configure Redis as a Cache Server

Redis can be started without a configuration file using a built-in default configuration. But to make any extra parameter changes you can use its configuration file that is: /etc/redis/redis.conf. Edit the Redis configuration file in a text editor to make changes

vim /etc/redis/redis.conf

Update the following values in the Redis configuration file according to your requirement. You can increase the max memory limit as per available on your server.

maxmemory 256mb
maxmemory-policy allkeys-lru

The above configuration tells Redis to remove any key using the LRU algorithm when the max memory of 256mb is reached. Save the configuration file and restart the Redis service:

Step 5 – Test Connection to Redis Server

Use redis-cli tool to verify the connection between the Redis server and redis-cli.

redis-cli

127.0.0.1:6379> ping
PONG
127.0.0.1:6379>

The post How to Install Redis Cache Server on CentOS 7/6 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-redis-centos/feed/ 2
Download CentOS 7 – DVD ISO Images https://tecadmin.net/download-centos-7/ https://tecadmin.net/download-centos-7/#comments Fri, 01 Sep 2017 07:13:28 +0000 https://tecadmin.net/?p=13521 CentOS is a Linux operating system, which is a 100% compatible rebuild of the Red Hat Enterprise Linux. A user can download and use this enterprise-level operating system free of cost. The CentOS project has announced a new update to the distribution, releasing CentOS 7.9 which is derived from Red Hat Enterprise Linux 7.9. You [...]

The post Download CentOS 7 – DVD ISO Images appeared first on TecAdmin.

]]>
CentOS is a Linux operating system, which is a 100% compatible rebuild of the Red Hat Enterprise Linux. A user can download and use this enterprise-level operating system free of cost.

The CentOS project has announced a new update to the distribution, releasing CentOS 7.9 which is derived from Red Hat Enterprise Linux 7.9. You can also use this tutorial to upgrade your CentOS 7 to the latest version.

CentOS 7 Download Links

Use the following links to download the latest CentOS 7.9 ISO images from CentOS official download page or its mirror pages. A torrent link is also available for all ISO images to download images using the torrent software.

All the above links are linked to the official download page. The are not a direct download links. The above link will redirect your to the download mirrors list page. Where you can download images from your nearest mirror servers.

The post Download CentOS 7 – DVD ISO Images appeared first on TecAdmin.

]]>
https://tecadmin.net/download-centos-7/feed/ 12
How To Install Go 1.19 on Fedora 36/35 & CentOS/RHEL 8/7 https://tecadmin.net/install-go-on-centos/ https://tecadmin.net/install-go-on-centos/#comments Mon, 15 Aug 2016 09:37:20 +0000 https://tecadmin.net/?p=10756 Go is an open source programming language developed by a team at Google. It provides easy-to-build simple, reliable, and efficient software. This language is designed for writing servers, that’s why it is used widely these days. Go has released the latest version 1.19 in February 2022. This tutorial will help you to install Go 1.19 [...]

The post How To Install Go 1.19 on Fedora 36/35 & CentOS/RHEL 8/7 appeared first on TecAdmin.

]]>
Go is an open source programming language developed by a team at Google. It provides easy-to-build simple, reliable, and efficient software. This language is designed for writing servers, that’s why it is used widely these days. Go has released the latest version 1.19 in February 2022.

This tutorial will help you to install Go 1.19 on your Fedora 36/35/34/33 & CentOS/RHEL 8/7 systems. You can also use tutorials to install Go lang on Ubuntu and Debian systems.

Prerequisites

Log in to your Red Hat or its derivative system using ssh and upgrade to apply the latest security updates there. Execute the following command on the terminal.

yum update 

Step 1 – Installing Go

Now download the Go language binary archive file using the following link. To find and download latest version available or 32 bit version go to official download page.

wget https://go.dev/dl/go1.19.linux-amd64.tar.gz 

Now extract the downloaded archive and install it to the desired location on your system. For this tutorial, I am installing it under the /usr/local directory. You can also put this under the home directory (for shared hosting) or other locations.

tar -xzf go1.19.linux-amd64.tar.gz 
mv go /usr/local 

Step 2 – Setup Go Environment

Now you need to set up Go language environment variables for your project. Commonly you need to set 3 environment variables as GOROOT, GOPATH and PATH.

  • GOROOT is the location where Go package is installed on your system.
    export GOROOT=/usr/local/go 
    
  • GOPATH is the location of your work directory. For example my project directory is ~/Projects/Proj1 .
    export GOPATH=$HOME/Projects/Proj1 
    
  • Now set the PATH variable to access go binary system wide.
    export PATH=$GOPATH/bin:$GOROOT/bin:$PATH 
    

All the above environments will be set for your current session only. To make it permanent add the above commands in ~/.bash_profile file.

Step 3 – Verify Installation

At this step, you have successfully installed and configured go language on your system. First, use the following command to check the Go version.

go version 

go version go1.19 linux/amd64

Now also verify all configured environment variables using the following command.

go env 

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/Projects/Proj1"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build764105058=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

Conclusion

In this tutorial, you have learned to install Golang on Fedora & CentOS/RHEL Linux systems.

The post How To Install Go 1.19 on Fedora 36/35 & CentOS/RHEL 8/7 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-go-on-centos/feed/ 12
How to Upgrade CentOS 7.8 from CentOS 7.7-7.0 https://tecadmin.net/upgrade-centos-7-to-latest-release/ https://tecadmin.net/upgrade-centos-7-to-latest-release/#comments Tue, 22 Dec 2015 09:40:45 +0000 https://tecadmin.net/?p=9433 The Latest version CentOS 7.8 is available to upgrade. All the CentOS 7.7, 7.6, 7.5, 7.4, 7.3, 7.2 7.1 and 7.0 users can upgrade their system to the latest release. All the users running with WHM/cPanel don’t need to do anything. WHM/cPanel will automatically upgrade its operating system to the next scheduled upgrade. This article [...]

The post How to Upgrade CentOS 7.8 from CentOS 7.7-7.0 appeared first on TecAdmin.

]]>
The Latest version CentOS 7.8 is available to upgrade. All the CentOS 7.7, 7.6, 7.5, 7.4, 7.3, 7.2 7.1 and 7.0 users can upgrade their system to the latest release. All the users running with WHM/cPanel don’t need to do anything. WHM/cPanel will automatically upgrade its operating system to the next scheduled upgrade.

This article will help to upgrade your current CentOS 7.x to the latest CentOS 7.8.

Upgrade Centos 7

Step 1 – Check Current CentOS Version

CentOS systems keep version details in /etc/redhat-release and /etc/centos-release. You just need to check content of one of these files.

cat /etc/centos-release

CentOS Linux release 7.6.1810 (Core)

Step 2 – Backup Important Data

Before upgrading centos make sure you have taken a backup of all your data to the remote location. Below are a few suggested items to backup.

  • Backup all databases ( MySQL, PostgreSQL, etc.. )
  • Backup all configuration files ( Apache, PHP, MySQL, DNS and Other services )
  • Backup all websites data running in webserver
  • Backup other service if any running on system

Step 3 – Upgrade to CentOS 7.8

The following are the steps to help you to upgrade CentOS to the latest release. Use yum upgrade command to upgrade your current running system.

yum clean all
yum update

After successful completion of above command just reboot your system.

# reboot

Step 4 – Verify Upgrade

Finally, verify that your system has been upgraded successfully. To confirm it check the /etc/redhat-release file content.

cat /etc/redhat-release

CentOS Linux release 7.8.2003 (Core)

Conclusion

In this tutorial, you have found the instruction’s to upgrade CentOS 7 to the latest version.

The post How to Upgrade CentOS 7.8 from CentOS 7.7-7.0 appeared first on TecAdmin.

]]>
https://tecadmin.net/upgrade-centos-7-to-latest-release/feed/ 1