1.4 KiB
1.4 KiB
LAMP
HTTPD
Install
# Install
dnf install epel-release
dnf install httpd httpd-tools
# Enable
systemctl start httpd
systemctl enable httpd
# Test
curl localhost
PHP
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf module enable php:remi-8.2
dnf install -y php
dnf install -y php-gd php-curl php-mysqlnd
dnf install -y php-devel php-xml php-pear php-mysql
dnf install -y php-json php-zip php-common php-xmlrpc
dnf install -y php-tidy php-soap php-bcmath
# Enable
systemctl status php-fpm
systemctl start php-fpm
systemctl enable php-fpm
systemctl restart httpd
# Test
echo "<?php phpinfo( ) ?>" > /var/www/html/info.php
php -v
curl localhost/info.php
Composer
# Install
wget https://getcomposer.org/installer -O composer-installer.php
php composer-installer.php --filename=composer --install-dir=/usr/local/bin
# Test
composer -v
MYSQL
# Install
dnf install mariadb-server mariadb
mysql_secure_installation
# Enable
systemctl start mariadb
systemctl enable mariadb
# Test
mysql -uroot -p1234 -e "show databases"
Troubleshooting HTTPD
ReWrite module
`httpd -M | grep rewrite
<Directory /var/www/html>
AllowOverride All
</Directory>
Persmissions
- check the
filedir - check the .htaccess owner and perms
ls -la
ls -la sites/default