Last active
November 6, 2016 17:14
-
-
Save lotterfriends/e2fef322a220e8c6b92abc09ca6271bc to your computer and use it in GitHub Desktop.
install php5, php7, mysql, phpmyadmin with linux (ubunut 16 based systems and up)
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
# apache | |
sudo apt-get install apache2 apache2-doc | |
# header module | |
sudo a2enmod headers | |
# rewrite module | |
sudo a2enmod rewrite | |
# php | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 | |
# add alias switch | |
echo "alias set_php_5='sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart'" >> ~/.bash_aliases | |
echo "alias set_php_7='sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart'" >> ~/.bash_aliases | |
# link project folder | |
cd /var/www && sudo mv html _html && sudo ln -s ~/projekte html | |
# MySQL | |
sudo apt-get install mysql-server | |
sudo apt-get install php-mysql | |
# phpMyAdmin | |
sudo apt-get install phpmyadmin php-mbstring php-gettext | |
sudo phpenmod mcrypt | |
sudo phpenmod mbstring | |
sudo systemctl restart apache2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment