Site icon Learning & Doing

Cara Install LAMP Stack di Arch Linux

“Cara Install LAMP Stack di Arch Linux”

Pengantar

Secara teknis, tumpukan LAMP terdiri dari modul Linux, Apache, MySQL, dan PHP. Lingkungan tumpukan LAMP sangat ideal untuk pengembang perangkat lunak web yang ingin merasakan bagaimana aplikasi web mereka cenderung berperilaku di lingkungan yang dihosting server/produksi.

Cara Install LAMP Stack dengan PhpMyAdmin di Arch Linux

 sudo pacman -Syu
sudo pacman -Syu apache
sudo systemctl start httpd 
sudo systemctl enable httpd
sudo systemctl status httpd
 sudo pacman -S php php-apache
sudo pacman -S mysql
sudo systemctl start mysqld 
sudo systemctl enable mysqld
sudo systemctl status mysqld
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
masuk ke root user 

#sudo su

delete file

# cd /var/lib/mysql
# rm -r *

Jalankan command

# mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
$ sudo systemctl start mysqld 
$ sudo systemctl enable mysqld
$ sudo systemctl status mysqld
$ sudo mysql_secure_installation
$ mysql -u root -p
$ sudo nano /etc/httpd/conf/httpd.conf
- Uncommand

LoadModule mpm_prefork_ 

- tambahkan script di paling bawah

LoadModule php_module modules/libphp.so
AddHandler php-script php
Include conf/extra/php_module.conf
$ sudo systemctl restart httpd 
$ sudo nano /srv/http/index.html

<!DOCTYPE html>
<html>

<head>
  <title>Welcome</title>
</head>

<body>

  <h1>Welcome to LinuxShellTips</h1>
   <p>Linux Command Line Tips, Tricks, Hacks, Tutorials, and Ideas in Blog</p>

</body>
</html>
http://localhost
Or
http://IP-Address
$ sudo nano /srv/http/test.php

<?php
phpinfo()
?>

- akses browser

http://localhost/test.php
Or
http://IP-Address/test.php

Penutup

Sahabat Blog Learning & Doing demikianlah penjelasan mengenai Cara Install LAMP Stack di Arch Linux. Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.

Exit mobile version