Many do not even suspect that all the services and services that we use on the Web are based on exactly the same computers that work in our apartments, they are only set up completely differently, they cannot boast of a beautiful graphical interface and are controlled using specialized commands. These computers are called servers. Informed people, of course, know how to configure and “raise” their own server. Those who are new to this business need to study more than one forum in order to finally get comfortable. One thing is certain for sure: to set up an inexpensive and stable server, you must choose the same inexpensive and stable basis, namely the Linux-based operating system. The choice of the majority falls on CentOS 7. This material contains brief information abouthow to install CentOS 7 and create a base server based on it.
CentOS?
CentOS - Linux, . , Fedora, Red Hat Linux. , , , , .
CentOS , Fedora, , Fedora «», CentOS . CentOS 7, .
CentOS 7
CentOS 7 .
:
- ISO- – ;
- ISO- USB- – ;
- ISO – ( «» , ).
«» (KDE Gnome). , .
CentOS 7
CentOS 7 .
6 :
- – , .
- – , .
- – , .
- – , .
- – , , .
- – .
Root. .
CentOS 7
, CentOS 7 , .
, . ( 250 ), . , , – SSH, . root@centos.com c centos.
:
- useradd centos;
- – passwd centos;
- root- – vi /etc/aliases;
- sudo visudo ( ).
. hostnamectl set-hostname server1.centos.net.
Firewall SeLinux. , . Firewall , systemctl stop firewalld systemctl disable firewalld. SeLinux : Vi vi /etc/selinux/config, SELINUX=enabled SELINUX=disabled. .
SSH.
:
- ssh-copy-id root@centos.com.
- /etc/ssh/sshd_config Port 222.
- Root, PermitRootLogin without-password.
- systemctl restart sshd.
epel rpmforge. :
- yum update.
- yum -enablerepo=cr update.
- , epel rpmforge, yum -y install * , * ( ).
, Apache PHP
MTA-.
:
- , , systemctl -t service.
- , postfix systemctl stop postfix systemctl disable postfix.
Apache PHP, .
, :
- Apache yum -y install httpd.
- ( , , ).
- Apache systemctl start httpd systemctl enable httpd.
- PHP yum -y install php php-mbstring php-near.
- Apache systemctl restart httpd.
MySql
MySql CentOS 7, , Yum MariaDB, CentOS .
MySql :
- MySql wget * MySql*.
- sudo rpm –ivh * rpm MySql* sudo yum install mysql-server.
- , Y.
Zabbix
Zabbix CentOS 7 .
:
- rpm Uvh * rpm- Zabbix*.
- yum update.
- Zabbix yum install zabbix-agent.
- ( ) , Y .
Zimbra
Zimbra CentOS 7, .
, :
- etc/hosts hostname.
- iptables Zimbra.
- SeLinux.
- MTA-.
- yum update -y.
- yum install perl perl-core ntpl nmap sudo libidn gmp.
- - Zimbra wget * Zimbra *.
- tar cd.
- ./install.sh —platform-override.