Created
November 23, 2017 08:49
-
-
Save jonhy81/1b3feabc3fe3cffbb8a0a98a249223c1 to your computer and use it in GitHub Desktop.
Cloud9 configuration to use with ec-europa/toolkit.
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
# Install phpbrew | |
sudo apt-get update | |
sudo apt-get install libmcrypt-dev | |
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew | |
chmod +x phpbrew | |
sudo mv phpbrew /usr/local/bin/ | |
phpbrew init | |
[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc | |
# Install php7 | |
phpbrew lookup-prefix ubuntu | |
phpbrew install 7.0 +default | |
phpbrew switch php-7.0.1 | |
phpbrew use php-7.0.1 | |
# Install php7 module for apache | |
sudo add-apt-repository ppa:ondrej/php -y | |
sudo apt-get update -y | |
sudo apt-get install php7.0-curl php7.0-dev php7.0-gd php7.0-intl php7.0-mcrypt php7.0-json php7.0-mysql php7.0-opcache php7.0-bcmath php7.0-mbstring php7.0-soap php7.0-xml -y | |
sudo apt-get install libapache2-mod-php7.0 -y | |
sudo apt-get install php-xdebug -y | |
# Enable xDebug extension | |
sudo sed -i -e '$a\xdebug.remote_enable=1' /etc/php/7.0/mods-available/xdebug.ini | |
# Update docroot to match with toolkit setup | |
sudo sed -i 's/DocumentRoot\ \/home\/ubuntu\/workspace/DocumentRoot\ \/home\/ubuntu\/workspace\/build/' /etc/apache2/sites-available/001-cloud9.conf | |
# Switch apache module | |
sudo a2dismod php5 | |
sudo a2enmod php7.0 | |
# Restart apache | |
apachectl restart | |
# Install MySQL and phpMyAdmin | |
mysql-ctl install | |
phpmyadmin-ctl install | |
mysql-ctl start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment