-
-
Save tawanda/fe04d279cad8b8262a71 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
# First, Install Vagrant and Virtualbox then: | |
# Create new project directory | |
mkdir -p ~/Sites/newproject # Create new project directory | |
mk ~/Sites/newproject # Go into your new project directory | |
# Setup Vagrant | |
vagrant init | |
# Edit vagrant file box and box url to install Ubuntu, just like https://gist.github.com/fideloper/dab171a2aa646e86b782#file-vagrantfile-share-var-www-rb-L6-L8 | |
# Edit Vagrantfile to create a static IP address, just like https://gist.github.com/fideloper/dab171a2aa646e86b782#file-vagrantfile-share-var-www-rb-L10 | |
# Edit Vagrantfile to share webserver's folder with your computer's folder, just like https://gist.github.com/fideloper/dab171a2aa646e86b782#file-vagrantfile-share-var-www-rb-L12 | |
# Save those changes, then... | |
vagrant up # Start your new server | |
vagrant ssh # Get into your new server to run commands in it | |
# Install LAMP stack - Apache, MySQL, PHP | |
# as per http://fideloper.com/ubuntu-install-php54-lamp and/or http://fideloper.com/ubuntu-12-04-lamp-server-setup | |
sudo apt-get update # Update package repositories | |
sudo apt-get install -y git-core wget vim curl build-essential python-software-properties # Install basics | |
sudo add-apt-repository -y ppa:ondrej/php5 # Add repository for php5.5 and Apache 2.4 | |
sudo apt-get update # Update package repositories again after adding repository | |
sudo apt-get install -y php5 php5-mcrypt php5-gd php5-curl php5-mysql # Install PHP and common modules | |
sudo apt-get install -y apache2 libapache2-mod-php5 # Install Apache2 | |
sudo apt-get install -y mysql-server # Install MySQL | |
# Finally view your new webserver at http://192.168.33.10.xip.io! | |
# Any files you add to ~/Sites/newproject will be available in your web server at http://192.168.33.10.xip.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment