diff --git a/LAMP.md b/LAMP.md new file mode 100644 index 0000000..c33ff07 --- /dev/null +++ b/LAMP.md @@ -0,0 +1,94 @@ +# LAMP + +### HTTPD + +Install + +```bash +# Install +dnf install epel-release +dnf install httpd httpd-tools + +# Enable +systemctl start httpd +systemctl enable httpd + +# Test +curl localhost +``` + +### PHP + +```bash +# Install +dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm +dnf module enable php:remi-7.4 +dnf install php php-opcache php-gd php-curl php-mysqlnd php-mbstring php-devel +dnf install php-xml php-pear php-fpm php-mysql php-pdo php-json php-zip +dnf install php-common php-cli php-xmlrpc php-xml php-tidy php-soap php-bcmath + +# Enable +systemctl start php-fpm +systemctl enable php-fpm + +# Test +echo "" > /var/www/html/info.php +php -v +curl localhost/info.php +``` + +### Composer + +```bash +# 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 + +```bash +# 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 +``` + +``` + + AllowOverride All + +``` + +### Persmissions + +- check the `file` dir +- check the .htaccess owner and perms + +``` +ls -la +ls -la sites/default +``` +