Notes on Installing LAMP stack with Ubuntu 26.04 LTS Linux Server

From: Date: Sat, 29 Aug 2026 03:29:39 +0000
Subject: Notes on Installing LAMP stack with Ubuntu 26.04 LTS Linux Server
Groups: php.general 
Request: Send a blank email to php-general+get-328856@lists.php.net to get a copy of this message
Subject: Notes on Installing LAMP stack with Ubuntu 26.04 LTS Linux Server Good day from Singapore, Author: Mr. Turritopsis Dohrnii Teo En Ming Date: 29 Aug 2026 Saturday Country: Singapore Download Ubuntu Server 26.04 LTS ISO. In our example, we will be installing Ubuntu Server 26.04 LTS ISO as a virtual machine in Windows Server 2025 Datacenter Evaluation Hyper-V Hypervisor.. Hyper-V Manager ================ New Virtual Machine Wizard Before You Begin: click Next Specify Name and Location: Name: Service Record - Ubuntu Click Store the virtual machine in a different location Location: F:\Virtual Hard Disks\Service Record - Ubuntu Click Next Specify Generation: Click Generation 2. Click Next Assign Memory: Startup memory: 8192 MB. Click Next Configure Networking: Connection: Broadcom NetXtreme Gigabit Ethernet - Virtual Switch. Click Next Connect Virtual Hard Disk: Click Create a virtual hard disk Name: Service Record - Ubuntu.vhdx Location: F:\Virtual Hard Disks\Service Record - Ubuntu\Service Record -Ubu.... Size: 2048 GB Click Next Installation Options: Click Install an operating system from a bootable image file Image file (.iso): C:\Users\Administrator\Documents\ubuntu-26.04-live-server-amd64.iso Click Next Summary: Click Finish Power on the virtual machine. If you encounter the following ERROR: The signed image's hash is not allowed (DB) Go to Secure Boot Click Enable Secure Boot Change the Template to: Microsoft UEFI Certificate Authority Power on the virtual machine again. Installing Ubuntu Server 26.04 LTS =================================== On the GNU GRUB page, select "Try or Install Ubuntu Server" Welcome!: English Keyboard configuration: Layout: English (US) Variant: English (US) Choose the type of installation: Click Ubuntu Server Network configuration: Choose Manual / Static Enter the following: Subnet: Address: Gateway: Name Servers: Search domains: Proxy configuration: leave blank Ubuntu archive mirror configuration: Click Done Guided storage configuration: Click Use an entire disk Uncheck Set up this disk as an LVM group Storage configuration: Click Done Confirm destructive action: Click Continue Profile configuration: Your name: Teo En Ming Your servers name: servicerecord Pick a username: teo-en-ming Choose a password: Confirm your password: Upgrade to Ubuntu Pro: Click Skip for now SSH configuration: Click Install OpenSSH server Click Allow password authentication over SSH Click Done Featured server snaps: Click Done Installing system Installation complete! Click Reboot Now sudo nano /etc/ssh/sshd_config Port 2222 Save and exit sudo systemctl disable --now ssh.socket sudo systemctl enable ssh.service sudo systemctl restart ssh.service netstat -anp | grep 22 You should see port 2222 Installing Apache Web Server ============================ sudo apt install apache2 You should now be able to see your default HTTP web page. sudo a2enmod ssl sudo mkdir -p /etc/apache2/ssl sudo openssl req -x509 -nodes -days 3650 \ -newkey rsa:2048 \ -keyout /etc/apache2/ssl/apache-selfsigned.key \ -out /etc/apache2/ssl/apache-selfsigned.crt sudo nano /etc/apache2/sites-available/selfsigned-ssl.conf <VirtualHost *:443> ServerAdmin ceo@teo-en-ming-corp.com DocumentRoot /var/www/html SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache-selfsigned.crt SSLCertificateKeyFile /etc/apache2/ssl/apache-selfsigned.key ErrorLog ${APACHE_LOG_DIR}/ssl-error.log CustomLog ${APACHE_LOG_DIR}/ssl-access.log combined </VirtualHost> sudo a2ensite selfsigned-ssl.conf sudo apache2ctl configtest Syntax OK sudo systemctl reload apache2 You should now see your default HTTPS web page. Installing MariaDB Database Server =================================== sudo apt update sudo apt install mariadb-server mariadb-client sudo mariadb CREATE USER 'mysqlroot'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'mysqlroot'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; EXIT mariadb -u mysqlroot -p Installing phpMyAdmin ======================= sudo apt-get update sudo apt install phpmyadmin Web server to reconfigure automatically: apache2 Configure database for phpmyadmin with dbconfig-common? Yes MySQL application password for phpmyadmin: Password confirmation: Password of the database's administrative user: sudo apt install php-mysql sudo systemctl restart apache2 sudo phpenmod mbstring sudo systemctl restart apache2 sudo apt update && sudo apt install -y software-properties-common Installing PHP 8.5 ==================== sudo apt install -y php php-cli php-fpm sudo apt install -y php-{curl,mbstring,xml,zip,mysql,intl} sudo apt install libapache2-mod-php8.5 sudo a2enmod php8.5 sudo systemctl restart apache2 You should now be able to access phpMyAdmin at https://IP_address/phpmyadmin/ Turning on Software Firewall in Ubuntu Server 26.04 LTS ========================================================== sudo ufw allow 2222/tcp sudo ufw allow 443/tcp sudo ufw enable sudo ufw status Miscellaneous ============== cat /etc/os-release PRETTY_NAME="Ubuntu 26.04 LTS" That's all. Regards, Mr. Turritopsis Dohrnii Teo En Ming Diehard hardcore PAP government supporter 29 Aug 2026 Saturday 11.14 am Singapore Time

« previous php.general (#328856) next »