Buat CT Pada proxmox anda
update
sudo dnf update -y
sudo dnf install httpd
dnf install openssh-server openssh-clients
sudo systemctl start sshd
service sshd restart
Secara default, saat kita melakukan instalasi server rocky linux 9 pada virtualbox, pengguna root tidak diizinkan login dengan koneksi SSH. Jadi kita harus edit konfigurasi SSH pada bagian dibawah ini sehingga pengguna root bisa login. Edit file /etc/ssh/sshd_config.
PermitRootLogin yes
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 firewalldsudo systemctl start firewalldsudo systemctl enable firewalld
sudo firewall-cmd –permanent –add-port=80/tcp
sudo firewall-cmd –permanent –add-port=443/tcp
sudo firewall-cmd –reload
sudo firewall-cmd –list-all
sudo dnf install mariadb-server mariadb -y
$ sudo systemctl start mariadb
$ sudo systemctl enable mariadb
$ sudo systemctl status mariadb
$ sudo mariadb-secure-installation or $ sudo mysql_secure_installation
sudo dnf module list php
sudo dnf module enable php:8.2
sudo dnf install php php-mysqlnd php-pdo php-gd php-mbstring php-xml php-json php-curl php-intl -y
php -v
sudo systemctl restart httpd
sudo nano /var/www/html/info.php
<?php
phpinfo();
?
sudo rm -f /var/www/html/info.php
Membuat Vhost
buat direktori untuk aplikasi PHPMaker jika belum ada. Misalnya:
sudo mkdir -p /var/www/namadomain.com/public_html
Atur kepemilikan direktori tersebut ke Apache:
sudo chown -R apache:apache /var/www/namadomain.com/public_html
sudo chmod -R 755 /var/www/namadomain.com/public_html
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