Sebelum melakukan instalasi webserver, pastikan update os.
sudo suapt update && apt upgradeInstal PHP
apt install -y php8.1-{bcmath,bz2,intl,gd,mbstring,mysql,zip,fpm,curl,dom,pgsql}Untuk web server saya akan menggunakan Nginx
apt install nginx -yInstall Composer
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
Install mysql
apt install mysql-client mysql-server
USE mysql;
CREATE USER 'user'@'localhost' IDENTIFIED BY 'P@ssW0rd';
GRANT ALL ON *.* TO 'user'@'localhost';
FLUSH PRIVILEGES;
Install LetsEncrypt
apt install certbot python3-certbot-nginx