Add 'LAMP.md'
This commit is contained in:
parent
9ba11bce1b
commit
cc6566d0c0
94
LAMP.md
Normal file
94
LAMP.md
Normal file
@ -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 "<?php phpinfo( ) ?>" > /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
|
||||
```
|
||||
|
||||
```
|
||||
<Directory /var/www/html>
|
||||
AllowOverride All
|
||||
</Directory>
|
||||
```
|
||||
|
||||
### Persmissions
|
||||
|
||||
- check the `file` dir
|
||||
- check the .htaccess owner and perms
|
||||
|
||||
```
|
||||
ls -la
|
||||
ls -la sites/default
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user