Skip to content

Instantly share code, notes, and snippets.

@amitavroy
Last active May 1, 2020 15:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitavroy/1507631bd7e258062a3c561a94c0b7c8 to your computer and use it in GitHub Desktop.
Save amitavroy/1507631bd7e258062a3c561a94c0b7c8 to your computer and use it in GitHub Desktop.
# Installing Apache, PHP and MySQL
sudo apt install -y apache2
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt install -y zip unzip git curl
sudo apt-get install -y php7.3-fpm php7.3-cli php7.3-gd php7.3-mysql \
php7.3-mbstring php7.3-xml php7.3-curl \
php7.3-bcmath php7.3-sqlite3 php7.3-zip
sudo apt install -y libapache2-mod-php7.3
sudo apt-get install -y mysql-server
sudo mysql_secure_installation
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php7.3-fpm
sudo a2enmod rewrite
# Get Composer
php -r "readfile('http://getcomposer.org/installer');" | sudo php -- --install-dir=/usr/bin/ --filename=composer
## Node JS
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install nodejs -y
## Mysql development user instead of root
CREATE USER 'developer'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'developer'@'localhost';
ALTER USER 'developer'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
ALTER USER 'developer'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
@amitavroy
Copy link
Author

Updated the gist with PHP 7.1 version installation as this is generally the new requirement.

@amitavroy
Copy link
Author

Updated the node version and missed the auto confirmation on node install

@amitavroy
Copy link
Author

Added git as part of the primary softwares required.

@amitavroy
Copy link
Author

Updated the gist with PHP 7.2

@amitavroy
Copy link
Author

Updated php version, node version and also added the mysql commands to create a new user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment