ComputersSoftware

Overview of CentOS 7: installation, settings and recommendations

Many people do not even suspect that all the services and services we use on the Internet are based on exactly the same computers that work in our apartments, they are only set up in a completely different way, they can not boast of a beautiful graphical interface and are managed with the help of specialized teams. These computers are called servers. People who know, of course, know how to configure and "raise" their own server. Those who are new to this business, it is necessary to study more than one forum in order to finally get used to it. One thing is for sure: to configure an inexpensive and stable server, you must choose the same inexpensive and stable foundation, namely, a Linux-based operating system. The choice of the majority falls on CentOS 7. This material contains a brief information on how to make the installation of CentOS 7 and create a base server on its basis.

What is CentOS?

CentOS is a Linux distribution, the main advantage of which is stability. This system, like the closest competitor Fedora, was built on the source code of the paid distribution of Red Hat Linux. The latter, in turn, is an ideal tool for system administrators, which require predictability, stable operation and convenient management.

CentOS can not boast of the latest versions of packages, unlike Fedora, but every system administrator will be happy about it when Fedora or another modern distribution with its fresh packages "drops", and CentOS will continue to work quietly, regardless of the circumstances. This article briefly describes the process of configuring and installing CentOS 7, the main features of the system and the working environment.

Download CentOS 7

Before installing CentOS 7, you must download the operating system distribution package on the official website.

There are several options for downloading:

  • ISO file for writing to disk - ideal for most with a full system and graphical interface;
  • ISO file for installation from hard disk and USB flash drive - the most complete package;
  • ISO for minimal unloading - contains only the basic operating system with a minimum set of packages and without a graphical interface (on this version of the distribution you can "raise" the server without problems, without installing anything superfluous).

Among the boot files, you can find two "live" disk images with two different working environments (KDE and Gnome). These images are suitable for those who want to try the system in the case before installing it on the hard drive.

Installing CentOS 7

Even if you select a minimal image, CentOS 7 will suggest using the graphical interface for installing the system on the hard drive.

This process takes place in 6 basic steps:

  • Setting the date and time - at this stage it is enough to select your time zone and the time will be set automatically.
  • Setting the language and layout - you must select one main language and one additional system language, as well as specify the necessary keyboard layouts for them.
  • The installation source - at this stage you can not change anything, then the files for installation will be taken from the media with the system.
  • Software for installation - at this stage it is necessary to select the minimum software package, since we need to deploy the server without a desktop and a graphical interface.
  • Installation location - at this stage, select the hard drive to be installed, as well as the markup.
  • Internet setup - here you need to enter data about the connection to the Network.

After entering the data, you will need to create a user profile and specify the Root password. After the installation process is complete, the computer restarts and prompts you to start the new operating system.

Installing CentOS 7 Server

Here in brief we will talk about how to deploy a universal server based on CentOS 7 with the minimum set of necessary tools that are required for its full operation.

So, first you need to find the server itself. It can either be hired on the Web (from 250 rubles), or configured on the local machine. The only thing you need is the SSH data that will be used to log into the server. Take, for example, the abstract mail address root@centos.com and the user name with the password, also centos.

Start the configuration by creating the user and granting him all the necessary rights:

  • Add the user with the command useradd centos;
  • Create a unique password for it - passwd centos;
  • We force the system to send root-mail to this user - vi / etc / aliases;
  • We give the user the right to sudo with the visudo command (the command line will respond with a confirmation of the operation).

Next, you must specify the host name. This can be done with the command hostnamectl set-hostname server1.centos.net.

After that you need to disable Firewall and SeLinux. It is necessary to do this in order to not accidentally deprive yourself of the rights to access the server. You can pause the Firewall operation using the systemctl stop firewalld and systemctl disable firewalld commands. The situation with SeLinux is a bit more complicated: you need to open the corresponding configuration file in the Vi text editor with vi / etc / selinux / config, find the line SELINUX = enabled there and replace it with SELINUX = disabled. Then you need to reboot the system.

The next step in the configuration is to install SSH.

For this you need:

  • Add the appropriate keys from the north with the ssh-copy-id command root@centos.com.
  • Change the port in the configuration file / etc / ssh / sshd_config on Port 222.
  • Deny access to the server without Root rights by typing the line PermitRootLogin without-password.
  • And reboot the server with systemctl restart sshd.

You also need to update all systems and install the epel and rpmforge repositories. For this you need:

  • Update all system elements with the yum update command.
  • Download the new system components with the yum -enablerepo = cr update command.
  • If there are not enough existing components, you can download more modern versions of epel and rpmforge by typing yum -y install * the repository address where the required software version is stored * (a suitable repository can be easily found on profile resources).

Verify services, configure Apache and PHP

To install additional components in an existing server frame, you need to check and disable some services and MTA services.

For this you need:

  • Check that the services are already running with the systemctl -t service command.
  • Disable all unnecessary and prevent them from starting, for example, to install mail services, you will need to disable postfix with the commands systemctl stop postfix and systemctl disable postfix.

Then you need to download Apache and PHP, necessary for the full operation of our server.

So, for this:

  • Install the Apache package with the yum -y install httpd command.
  • We make changes to the configuration file (there you must specify the server address, name, signatures, etc.).
  • Start Apache and enable the autorun function with the commands systemctl start httpd and systemctl enable httpd.
  • Then add PHP using the yum -y install php php-mbstring php-near command .
  • Reboot Apache using systemctl restart httpd.

Installing the MySql database management system

Before installing MySql in CentOS 7, it is worthwhile to clarify that when using the standard Yum download manager the system downloads an alternative version of the program under the name MariaDB, so in the case of CentOS it is necessary to go bypass.

To install MySql you need:

  • Download the MySQL client from the official utility repository using the wget command * a link to the file with the MySql client *.
  • Then install it in the system with the commands sudo rpm -ivh * the full name of the rpm file with the required version of MySql * and sudo yum install mysql-server.
  • Then, confirm the operation twice by typing Y on the command line.

Installing Zabbix Monitoring System

To install Zabbix in CentOS 7, you need to find the latest version of the client on the official developer site and then install it on the system.

For this you need:

  • Add the repository with the rpm command Uvh * a link to the rpm file with the current version of Zabbix *.
  • Update the list of available software with the yum update command.
  • Then, install the Zabbix client on the system with the yum install zabbix-agent command.
  • After that, it remains to verify the client version (you need a third one) and to answer all the queries affirmatively by typing Y on the command line.

Installing the Zimbra Mail Server

Before you install Zimbra in CentOS 7, you need to prepare a system for this.

So, you need to do the following:

  • Correctly configure the file etc / hosts and hostname.
  • Allow all ports of Zimbra in iptables.
  • Turn off SeLinux.
  • Disable all MTA services.
  • Update the operating system with the yum update -y command.
  • Then you need to load the corresponding packages with the command yum install perl perl-core ntpl nmap sudo libidn gmp.
  • Then - the Zimbra utility itself with the wget command * a link to the file with the Zimbra utility of the current version *.
  • Unzip the file with tar and go to the appropriate directory with the cd command.
  • Then you need to start the installation process using the command ./install.sh -platform-override.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.