-
-
Save JeffreyWay/9244714 to your computer and use it in GitHub Desktop.
sudo apt-get update | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' | |
sudo apt-get install -y vim curl python-software-properties | |
sudo add-apt-repository -y ppa:ondrej/php5 | |
sudo apt-get update | |
sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug | |
cat << EOF | sudo tee -a /etc/php5/mods-available/xdebug.ini | |
xdebug.scream=1 | |
xdebug.cli_color=1 | |
xdebug.show_local_vars=1 | |
EOF | |
sudo a2enmod rewrite | |
sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php5/apache2/php.ini | |
sed -i "s/display_errors = .*/display_errors = On/" /etc/php5/apache2/php.ini | |
sed -i "s/disable_functions = .*/disable_functions = /" /etc/php5/cli/php.ini | |
sudo service apache2 restart | |
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/composer |
Hey Jeffery,
This is not my wheelhouse so some of this may not sound correct. When running this script as directed from https://premium.wpmudev.org/blog/wordpress-development-beginners-php/
The script errors out. On inspecting the errors I see that there is a 404 for accessing a directory from Ondřej Surý on https://launchpad.net/~ondrej
404 errors:
Failed to fetch http://ppa.launchpad.net/ondrej/php5/ubuntu/dists/precise/main/source/Sources 404 Not Found
Failed to fetch http://ppa.launchpad.net/ondrej/php5/ubuntu/dists/precise/main/binary-amd64/Packages 404 Not Found
Failed to fetch http://ppa.launchpad.net/ondrej/php5/ubuntu/dists/precise/main/binary-i386/Packages 404 Not Found
On checking these links I see that there is no php5/ubuntu/ folder.
As I said this is not my type of thing. I am just learning to read some of this. Hope what I posted helps.
Have a good one.
-David
Hi Jeffrey,
Thanks for this little file. It really helped me setup my Vagrant. :-)
I've added a few sudo in front of the sed commands that helped them to work properly I think.
Also added a few more xdebug configuration so I can debug properly with PHPStorm followin Juan tutorial here :
https://jtreminio.com/2012/07/xdebug-and-you-why-you-should-be-using-a-real-debugger/
Juan tutorial is great, super simple and work perfectly simple using a few bookmarklets in your browser.
My modified install.sh : https://gist.github.com/EricJeker/1631d5a69af1f5323a6c
Hope you don't mind ! ;-)
Cheers,
Eric