Created
July 29, 2014 11:30
-
-
Save tobalsan/c3a89c673792759ac2e1 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# Add dotdeb repos | |
echo >> /etc/apt/sources.list; | |
echo 'deb http://packages.dotdeb.org wheezy all' >> /etc/apt/sources.list | |
echo 'deb-src http://packages.dotdeb.org wheezy all' >> /etc/apt/sources.list | |
echo >> /etc/apt/sources.list; | |
echo 'deb http://packages.dotdeb.org wheezy-php55 all' >> /etc/apt/sources.list | |
echo 'deb-src http://packages.dotdeb.org wheezy-php55 all' >> /etc/apt/sources.list | |
cd /tmp | |
wget http://www.dotdeb.org/dotdeb.gpg | |
apt-key add dotdeb.gpg | |
apt-get -y update; | |
apt-get -y upgrade; | |
# Set default root password for MySQL | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password 1234' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password 1234' | |
apt-get install -y mysql-server mysql-client | |
# Web server | |
apt-get install -y nginx | |
service nginx start | |
# PHP | |
apt-get install -y php5-fpm php5-cli php5-intl php5-mcrypt php5-curl php5-gd php5-imagick php5-mysql php5-sqlite | |
apt-get install -y phpmyadmin | |
apt-get -y install vim | |
apt-get -y install git | |
# Composer | |
cd /tmp && curl -sS https://getcomposer.org/installer | php | |
mv composer.phar /usr/local/bin/composer | |
# Customize vagrant user .bash_profile | |
cat << EOF > /home/vagrant/.bash_profile | |
# Custom prompt | |
export PS1="\[\e[00;32m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[00;36m\]\h\[\e[0m\]\[\e[00;37m\][\W]\[\e[0m\] " | |
# Aliases | |
## System | |
alias ll='ls -lah --color=auto --group-directories-first' | |
## Git | |
alias gcm='git commit -m' | |
alias gcma='git commit -am' | |
alias ga='git add .' | |
alias gs='git status' | |
alias gp='git push' | |
alias gl='git log --pretty=format:"%Cred%h%Creset - %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" -n10' | |
## Symfony | |
alias sf='app/console' | |
alias sfcc='app/console cache:clear' | |
alias cc='rm -rf app/cache/*' | |
alias load-fixtures='php app/console doctrine:schema:drop --force && php app/console doctrine:schema:update --force && php app/console doctrine:fixtures:load' | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment