Install LAMP pada Rocky Linux 9 (CT Proxmox)

Buat CT Pada proxmox anda





update

adduser john
passwd john

$ sudo systemctl start httpd           –> This is used to start the httpd daemon.

$ sudo systemctl enable httpd          –> Used start the apache service during reboot.

$ sudo systemctl status httpd            –>  Used to verify the status of Apache Server                                                                             (Active  or Disabled)

sudo dnf install firewalld
sudo systemctl start firewalld
sudo systemctl enable firewalld

$ sudo systemctl start mariadb

$ sudo systemctl enable mariadb

$ sudo systemctl status mariadb

<?php

phpinfo();

?

Membuat Vhost

buat direktori untuk aplikasi PHPMaker jika belum ada. Misalnya:

Atur kepemilikan direktori tersebut ke Apache:

Upload aplikasi /var/www/namadomain.com/public_html/.

Buat file konfigurasi virtual host untuk domain Anda. File konfigurasi Apache umumnya disimpan di direktori /etc/httpd/conf.d/. Misalnya, untuk domain namadomain.com:

sudo nano /etc/httpd/conf.d/namadomain.com.conf

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/namadomain.com/public_html
ServerName namadomain.com
ServerAlias www.namadomain.com

<Directory /var/www/namadomain.com/public_html>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

ErrorLog /var/log/httpd/namadomain.com-error.log
CustomLog /var/log/httpd/namadomain.com-access.log combined
</VirtualHost>

Setelah membuat file konfigurasi, periksa apakah tidak ada kesalahan dalam konfigurasi Apache:

sudo apachectl configtest

sudo systemctl restart httpd

sumber : www.linuxteck.com/install-lamp-stack-on-rocky-linux-9

henri.web.id/inisiasi-awal-server-rocky-linux-9

https://gist.github.com/alkavan/6bfe9295d1abdb4ba10ead844782e862

Leave a Reply

Your email address will not be published. Required fields are marked *