Выполняем команды:
yum install httpd
apachectl configtest
apachectl start
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl restart firewalld
Добавление репозиториев RHSCL repo (Добавятся версии php)
sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo subscription-manager repos --enable rhel-7-server-optional-rpms
sudo subscription-manager repos --enable rhel-server-rhscl-7-rpms
https://access.redhat.com/discussions/3232341
rh-php71-php-gd rh-php71-php-mbstring rh-php71-php-mysqlnd rh-php71-php-intl rh-php71-php-ldap
yum install php php-mysql php-pdo php-gd php-mbstring
cp /opt/rh/rh-php70/enable /etc/profile.d/rh-php70.sh
source /opt/rh/rh-php70/enable
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php56.off
mv /etc/httpd/conf.modules.d/10-php.conf /etc/httpd/conf.modules.d/10-php56.off
cp /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php70-php.conf /etc/httpd/conf.d/
cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/15-rh-php70-php.conf /etc/httpd/conf.modules.d/
cp /opt/rh/httpd24/root/etc/httpd/modules/librh-php70-php7.so /etc/httpd/modules/
service httpd restart
Если есть более старая версия Mariadb делаем дамп базы данных.
Делаем бєкап:
mysqldump -u root -p zabbix > /home/pavlenkoss/zabbix.sql
yum remove mariadb-server mariadb mariadb-libs
yum clean all
Создаем репозиторий mcedit /etc/yum.repos.d/mariaDB10.2.repo
:
MariaDB 10.2 RedHat repository list - created 2018-02-26 14:58 UTC
# http://downloads.mariadb.org/mariadb/repositories/
Файл будет следующего содержания:
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/rhel7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
###########
#https://downloads.mariadb.org/mariadb/repositories/#mirror=cnrs&distro=RedHat&distro_release=rhel7-amd64--rhel7&version=10.2
#https://www.liquidweb.com/kb/how-to-upgrade-mariadb-5-5-to-mariadb-10-0-on-centos-7/
yum install mariadb-server mariadb
Если у нас до этого была старая mariadb то сделать дамп базы, после установки новой базы делаем обновления.
Следующей командой:
mysql_upgrade -u root -p
Стартуем базу:
systemctl start mariadb
Настраиваем безопасность:
mysql_secure_installation