Last active
October 19, 2022 08:53
-
-
Save hasibomi/2c7fa0eb869a79ccfa121d2dd8bb5aaa to your computer and use it in GitHub Desktop.
LAMP Stack installation script. It will work on linux environment & has been tested on Ubuntu 20.2. Download `lamp-stack.sh` file. & run `chmod 755 lamp-stack.sh` to make it executable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Author: Hasibur Rahman Omi | |
# Email: [email protected] | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get -y install curl | |
sudo apt-get -y install apache2 | |
sudo apt-get -y install mysql-server | |
sudo apt-get -y install php8.1 | |
sudo apt-get -y install php8.1-fpm | |
sudo apt-get -y install php8.1-mysql | |
sudo apt-get -y install php8.1-curl | |
sudo apt-get -y install php8.1-simplexml | |
sudo apt-get -y install php8.1-mbstring | |
sudo apt-get -y install php8.1-gd | |
sudo apt-get -y install php8.1-imap | |
sudo apt-get -y install php8.1-cli | |
sudo a2enmod rewrite | |
sudo a2enmod proxy_fcgi setenvif | |
sudo a2enconf php8.1-fpm | |
sudo systemctl restart apache2 | |
# Install composer (https://getcomposer.org/) | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" | |
sudo mv composer.phar /usr/local/bin/composer | |
# Install wpcli (http://wp-cli.org/) | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp | |
# Install other programs | |
sudo apt-get install -y zip |
Updated to PHP 7.4
Updated to PHP 8.1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated to PHP 7.3