Instalando LAMP no Manjaro

Tutorial básico

Update

Check if your system has updates available before run the commands.

sudo pacman -Syyu

Install

Apache

sudo pacman -S apache

Mysql

sudo pacman -S mysql

PHP

sudo pacman -S php php-apache

phpmyadmin

sudo pacman -S phpmyadmin

All

sudo pacman -S apache mysql php php-apache phpmyadmin

Config

Apache

sudo nano /etc/httpd/conf/httpd.conf 

Comment this line

#LoadModule unique_id_module modules/mod_unique_id.so

Enable and restart

sudo systemctl enable httpd
sudo systemctl restart httpd
sudo systemctl status httpd

Check if status is active (running)

● httpd.service - Apache Web Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
     Active: active (running) 

MySQL

initialize the MariaDB

sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

After enable and start

sudo systemctl enable mysqld 
sudo systemctl start mysqld
sudo systemctl status mysqld 

Check if status is active (running)

● mariadb.service - MariaDB 10.4.12 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
     Active: active (running)

PHP

sudo nano /etc/httpd/conf/httpd.conf

Comment this line

#LoadModule mpm_event_module modules/mod_mpm_event.so

Remove the comment from this line

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so 

Add this lines at the bottom

LoadModule php7_module modules/libphp7.so
AddHandler php7-script php
Include conf/extra/php7_module.conf

Create the test file

sudo nano /srv/http/test.php
<?php
  phpinfo();
?>

Restart httpd

sudo systemctl restart httpd

phpmyadmin

...

Comentários