Skip to content

shahedfardous/lamp-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

🚀 Ubuntu LAMP Stack Installer

LAMP Stack

License: MIT Ubuntu 22.04 Bash

🚀 One-Line Installation

curl -sSL https://raw.githubusercontent.com/shahedfardous/lamp-installer/master/install_lamp.sh | sudo bash

📖 Overview

Quick 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+)

✨ Features

Component Features
Apache - SSL Support
- ModRewrite
- Optimal Configs
MySQL - Secure Installation
- Performance Tuning
- Root Password Setup
PHP - Latest Stable
- Common Extensions
- Security Configs

🔧 What's Installed

Click to expand installed components

Apache Modules

  • mod_rewrite
  • mod_ssl
  • mod_security

PHP Extensions

  • php-mysql
  • php-curl
  • php-gd
  • php-mbstring
  • php-xml
  • php-json
  • php-zip

MySQL Configuration

  • Secure defaults
  • InnoDB optimizations
  • Performance settings

🚦 Requirements

  • 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

📝 Usage

1. Quick Install (Recommended)

curl -sSL https://raw.githubusercontent.com/shahedfardous/lamp-installer/master/install_lamp.sh | sudo bash

2. Manual Installation

git clone https://github.com/shahedfardous/lamp-installer.git
cd lamp-installer
chmod +x install_lamp.sh
sudo ./install_lamp.sh

⚙️ Default Paths

📂 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

🔍 Verification Steps

  1. Check Apache:
http://your_server_ip
  1. Verify PHP:
http://your_server_ip/info.php
  1. Test MySQL:
mysql -u root -p

🛡️ Security Checklist

✅ 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

🐛 Troubleshooting

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]

🤝 Contributing

  1. Fork the repo
  2. Create feature branch
    git checkout -b feature/amazing-feature
  3. Commit changes
    git commit -m 'Add amazing feature'
  4. Push to branch
    git push origin feature/amazing-feature
  5. Open Pull Request

📄 License

MIT License - See LICENSE for details

📬 Support

🙏 Acknowledgments


Made with ❤️ by Md Shahed Fardous (Samy)

About

Automated bash script for installing and configuring a LAMP stack (Linux, Apache, MySQL, PHP) on a Linux server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages