curl -sSL https://raw.githubusercontent.com/shahedfardous/lamp-installer/master/install_lamp.sh | sudo bashQuick and secure LAMP stack installer for Ubuntu 22.04 LTS or Later Versions [ also on any debian based distros].
Sets up:
- 🐧 Linux (Ubuntu 22.04)
- 🌐 Apache (Latest version)
- 🗄️ MySQL (8.0+)
- 🐘 PHP (8.1+)
| Component | Features |
|---|---|
| Apache | - SSL Support - ModRewrite - Optimal Configs |
| MySQL | - Secure Installation - Performance Tuning - Root Password Setup |
| PHP | - Latest Stable - Common Extensions - Security Configs |
Click to expand installed components
- mod_rewrite
- mod_ssl
- mod_security
- php-mysql
- php-curl
- php-gd
- php-mbstring
- php-xml
- php-json
- php-zip
- Secure defaults
- InnoDB optimizations
- Performance settings
- Ubuntu 22.04 LTS or Later Versions [ also on any debian based distros]
- Root/Sudo access
- 1GB+ RAM
- 2GB+ free disk space
- Active internet connection
curl -sSL https://raw.githubusercontent.com/shahedfardous/lamp-installer/master/install_lamp.sh | sudo bashgit clone https://github.com/shahedfardous/lamp-installer.git
cd lamp-installer
chmod +x install_lamp.sh
sudo ./install_lamp.sh📂 Document Root: /var/www/html/
📂 Apache Config: /etc/apache2/apache2.conf
📂 PHP Config: /etc/php/8.1/apache2/php.ini
📂 MySQL Config: /etc/mysql/mysql.conf.d/mysqld.cnf
- Check Apache:
http://your_server_ip- Verify PHP:
http://your_server_ip/info.php- Test MySQL:
mysql -u root -p✅ Remove info.php:
sudo rm /var/www/html/info.php✅ Configure Firewall:
sudo ufw enable
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp✅ Secure MySQL:
sudo mysql_secure_installation| Issue | Solution |
|---|---|
| Apache not starting | sudo systemctl status apache2 |
| MySQL connection failed | Check /var/log/mysql/error.log |
| PHP modules missing | sudo apt install php-[module_name] |
- Fork the repo
- Create feature branch
git checkout -b feature/amazing-feature
- Commit changes
git commit -m 'Add amazing feature' - Push to branch
git push origin feature/amazing-feature
- Open Pull Request
MIT License - See LICENSE for details
- 📧 Email: shahed.fardous26@gmail.com
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
Made with ❤️ by Md Shahed Fardous (Samy)