bootstrap-rocky-8/install-lamp.sh

59 lines
1.1 KiB
Bash
Raw Permalink Normal View History

2024-08-27 00:46:46 +03:00
#!/usr/bin/env bash
set -x
dnf install -y epel-release
crb enable
dnf install -y epel-release
dnf install -y atop htop iptstate conntrack-tools
dnf -y module reset php
dnf -y module install php:8.2
dnf -y module reset mariadb
dnf -y module install mariadb:10.11
dnf -y module reset ruby
dnf -y module install ruby:3.1
2024-08-27 01:18:50 +03:00
dnf install -y ruby ruby-devel rubygem-mysql2
2024-08-27 00:46:46 +03:00
dnf install -y $( cat lamp-packages.txt )
true | pecl install redis
cat <<EOF > /etc/php.d/99-redis.ini
; Enable REDIS extension module
extension=redis.so
EOF
2024-08-27 01:18:50 +03:00
mkdir /etc/httpd/sites-enabled
mkdir /etc/httpd/sites-available
egrep "^Include\ /etc/apache2/sites-enabled/\*\.conf" /etc/httpd/conf/httpd.conf
if [ "$?" -gt "0" ]
then
echo "Include /etc/apache2/sites-enabled/*.conf" >> /etc/httpd/conf/httpd.conf
fi
sed -i -e "s@AllowOverride\ none@AllowOverride all@g" \
-e "s@AllowOverride\ None@AllowOverride All@g" /etc/httpd/conf/httpd.conf
2024-08-27 00:46:46 +03:00
firewall-cmd --add-service=http
firewall-cmd --add-service=https
firewall-cmd --reload
systemctl restart httpd
systemctl restart php-fpm
systemctl restart redis
systemctl restart mariadb
systemctl enable httpd php-fpm redis mariadb
set +x