Skip to content

Instantly share code, notes, and snippets.

@revathskumar
Last active August 29, 2015 14:20
Embed
What would you like to do?
PHP, Apache deployment setup
apt-get install -y build-essential git-core libyaml-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -L get.rvm.io | bash -s stable
source /home/lookup/.rvm/scripts/rvm
rvm reload
rvm install 2.2.2
gem install capistrano --no-ri --no-rdoc
sudo addgroup www
sudo adduser deploy
sudo adduser deploy www
sudo adduser www-data www
# open /etc/sudoers
deploy ALL=(ALL:ALL) ALL
# Set the ownership of the folder to members of `www` group
sudo chown -R :www /var/www
# Set folder permissions recursively
sudo chmod -R g+rwX /var/www
# Ensure permissions will affect future sub-directories etc.
sudo chmod g+s /var/www
apt-get install -y php5 php5-mysql libapache2-mod-php5 apache2 php5-cli
service apache2 restart
a2enmod rewrite
a2enmod headers
a2enmod expires
ssh-keygen
# Add local public key to ~/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment