Last active
April 19, 2019 20:06
-
-
Save arjus/9d569629969e3d39ac3a8de27b267e6f to your computer and use it in GitHub Desktop.
TODO magento 2 lemp stack bash command for CentOS 7 with redis and composer
This file contains 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
#bash script | |
#Arjus | |
#lemp stack for CentOS 7 with redis and composer | |
#linux | |
#nginx | |
#mariadb | |
#php7.2 TODO | |
#redis | |
#composer | |
sudo yum install -y epel-release | |
sudo yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm | |
sudo yum-config-manager --enable remi-php72 | |
sudo yum -y update | |
sudo yum install -y yum-utils | |
#install and enable nginx | |
sudo yum install -y nginx | |
sudo systemctl start nginx | |
sudo systemctl enable nginx | |
#install mariadb | |
sudo yum install -y mariadb-server mariadb | |
sudo systemctl start mariadb | |
sudo systemctl enable mariadb | |
#TODO install php7.2 with fpm and opcache | |
sudo yum install -y php php-mysql php-fpm php-opcache wget unzip | |
sudo systemctl start php-fpm | |
sudo systemctl enable php-fpm | |
#install and enable redis | |
sudo yum-config-manager --enable remi | |
sudo yum install -y redis | |
sudo systemctl start redis | |
sudo systemctl enable redis | |
#install and enable composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer | |
php -r "unlink('composer-setup.php');" | |
sudo systemctl restart php-fpm | |
sudo systemctl restart nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment