yum install epel-release -y yum install tmux -y tmux hostnamectl set-hostname host_name
systemctl restart systemd-hostnamed
hostnamectl status timedatectl set-timezone Europe/Moscow yum update -y yum install net-tools vim wget man vim-enhanced screen mc telnet wget crontabs openssh-clients mailx sudo make gcc htop nmon sysstat sysbench hdparm lsof -y firewall-cmd --list-all yum install firewalld -y
systemctl enable firewalld
systemctl start firewalld
firewall-cmd --permanent --zone=public --remove-service=dhcpv6-client
firewall-cmd --permanent --zone=public --remove-service=cockpit
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload vim /etc/ssh/sshd_config
## Port 22 -> Port 22222 vim /usr/lib/firewalld/services/ssh.xml
<port protocol="tcp" port="22222"/> systemctl restart sshd && systemctl restart firewalld yum install fail2ban -y
systemctl enable fail2ban
systemctl start fail2ban
systemctl status fail2ban
echo '
[DEFAULT]
# Ban hosts for one hour:
bantime = 3600
# Override /etc/fail2ban/jail.d/00-firewalld.conf:
banaction = iptables-multiport
[sshd]
enabled = true' > /etc/fail2ban/jail.local
systemctl restart fail2ban sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux
setenforce 0 sysctl vm.swappiness=10
echo 'vm.swappiness = 10' >> /etc/sysctl.conf
//Да можно использовать sysctl -p, но мне нравится так yum install httpd -y
systemctl enable httpd
systemctl start httpd echo '
# MariaDB 12.1 RedHatEnterpriseLinux repository list - created 2026-02-02 08:22 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
# rpm.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# baseurl = https://rpm.mariadb.org/12.1/rhel/$releasever/$basearch
baseurl = https://mirror.docker.ru/mariadb/yum/12.1/rhel/$releasever/$basearch
# gpgkey = https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
gpgkey = https://mirror.docker.ru/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck = 1 ‘> /etc/yum.repos.d/MariaDB.repo
yum install MariaDB-server MariaDB-client MariaDB-devel -y [mysqld]
max_allowed_packet = 100M
………………..
[mysqldump]
max_allowed_packet = 100M systemctl start mariadb
systemctl enable mariadb
systemctl status mariadb mysql_secure_installation # Install the repository RPM:
dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql
dnf install -y postgresql17-server postgresql17-contrib
/usr/pgsql-17/bin/postgresql-17-setup initdb
systemctl enable postgresql-17
systemctl start postgresql-17 vim /var/lib/pgsql/17/data/pg_hba.conf
Меняем #host all all 127.0.0.1/32 ident
На host all all 127.0.0.1/32 md5
sudo -u postgres pqsl
alter role postgres with password ‘свой_пароль’;
\q
systemctl restart postgresql-17 yum install install tar libdb-devel perl-URI perl-LWP-Protocol-https perl-Crypt-SSLeay mod_perl perl-libwww-perl perl-Net-DNS perl-IO-Socket-SSL perl-XML-Parser perl-DBI procmail perl-core perl-Crypt-SSLeay perl-Mail-IMAPClient perl-Text-CSV_XS perl-Digest-SHA perl-LDAP perl-GDGraph perl-Encode-HanExtra perl-Text-CSV fcgi perl-Archive-Zip perl-XML-LibXSLT bash-completion perl-DBD-Pg perl perl-Mojolicious perl-DBD-MySQL -y
#Cтавим cpanm
yum install perl-App-cpanminus -y
#Обновляем cpanm
cpanm App::cpanminus
#Удаляем cpanm установленный из репо
yum erase perl-App-cpanminus
#Создаем линк для новой версии
ln -s /usr/local/bin/cpanm /bin/cpanm
#Ставим cpanoutdated
cpanm App::cpanoutdated
#Обновляем все пакеты, которые считаются устаревшими
/usr/local/bin/cpan-outdated -p | cpanm
#Поскольку outdated обновляет не все пакеты, то дальше руками
cpanm Apache::DBI Apache2::Reload Archive::Tar Archive::Zip Crypt::Eksblowfish::Bcrypt Crypt::SSLeay Date::Format DateTime DBI JSON DBD::Pg Digest::SHA Encode::HanExtra JSON::XS List::Util::XS LWP::UserAgent Mail::IMAPClient IO::Socket::SSL Authen::SASL Authen::NTLM ModPerl::Util Net::DNS Net::LDAP Net::SMTP Template Template::Stash::XS Text::CSV_XS Time::HiRes XML::LibXML XML::LibXSLT XML::Parser YAML::XS XML::LibXML DBD::File Moo Date::Calc Crypt::Random::Source Cwd Compress::Raw::Zlib Data::Dumper File::Path Storable Data::UUID File::MimeInfo File::BaseDir AnyEvent::HTTP
cd ~ && wget https://downloads.radiantsd.org/releases/RPMS/rhel/7/otrs-6.0.30-02.noarch.rpm
rpm -ivh otrs-6.0.30-02.noarch.rpm --nodeps
systemctl restart httpd
/opt/otrs/bin/Cron.sh start otrs crontab -u otrs -l