Skip to content

Instantly share code, notes, and snippets.

@daniloaldm
Forked from kelvysmoura/step-1-php-apache.sh
Last active October 7, 2020 18:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniloaldm/59b2ee66f3cce742396e2a92071087cc to your computer and use it in GitHub Desktop.
Save daniloaldm/59b2ee66f3cce742396e2a92071087cc to your computer and use it in GitHub Desktop.
Configuração de ambiente para a instalação do magento 2
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php5.6 -y
sudo apt install php7.0 -y
sudo apt install php7.1 -y
sudo apt install php7.2 -y
sudo apt install php7.3 -y
sudo apt update
sudo apt install apache2 -y
sudo a2enmod rewrite
sudo apt update
# Step 2 to configuration environment of the magento 2
sudo apt update
sudo apt install mysql-server-5.7 -y
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
FLUSH PRIVILEGES;
exit;
mysql --user="root" --password="root"
# Step 3 to configuration environment of the magento 2
echo "Qual a versão do php? "
read version;
sudo apt update;
sudo apt install php$version-dom -y
sudo apt install php$version-curl -y
sudo apt install php$version-mcrypt -y
sudo apt install php$version-intl -y
sudo apt install php$version-mbstring -y
sudo apt install php$version-zip -y
sudo apt install php$version-gd -y
sudo apt install php$version-simplexml -y
sudo apt install php$version-spl -y
sudo apt install php$version-xsl -y
sudo apt install php$version-ctype -y
sudo apt install php$version-hash -y
sudo apt install php$version-openssl -y
sudo apt install php$version-json -y
sudo apt install php$version-xmlwriter -y
sudo apt install php$version-xml -y
sudo apt install php$version-libxml -y
sudo apt install php$version-iconv -y
sudo apt install php$version-pdo -y
sudo apt install php$version-mysql -y
sudo apt install php$version-bcmath -y
sudo apt install php$version-soap -y
sudo apt install php$version-xdebug -y
sudo apt install libapache2-mod-php$version -y
sudo service apache2 restart
sudo service mysql restart
sudo apt update
sudo apt install git -y
sudo apt install git-flow
git clone https://gist.github.com/97769661d35d2252501952b5351fe573.git installcomposer
sudo chmod 777 installcomposer/installcomposer.sh
./installcomposer/installcomposer.sh
sudo rm -rf installcomposer/
sudo apt update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment