Code Monkey home page Code Monkey logo

basicvagrantlampsetup's Introduction

Simple Vagrant/LAMP Set Up

=====

I have use Vagrant a couple of times for projects in which it has become incredibly useful in set up and operation. Its nice for me because I like to keep my computer environment clean and not possibly filled with errors that could potentially harm my computer. Therefore, having a virtual machine environment works for me. I have also used it for some of my college classes which require the LAMP stack, in this case, I just have to run vagrant up which loads up the stack and my projects are all ready to go. But, vagrant boxes can be used for anything you can think of not just LAMP stacks. Any type of development environment can work.

I have also included a LAMP Stack set up script which I have written which works as of 3/10/15. Let me know if I have to change it. It automatically installs LAMP including phpmyadmin with default username: root and password: password. This is currently configured to be the most basic of configuration and has not been tested or meant for anything for production in terms of security etc.. Use this as a guide on how to set up a vagrant machine and LAMP stack if required.

Remember, you can take snapshots of your virtual machine in virtualbox. This way, it saves the state of the machine at that moment in time so you can revert back to it in case shit hits the fan.

Set Up Vagrant:


  1. install Vagrant
  2. install virtual box
  3. make a project directory
  4. cd into directory
  5. Go to https://atlas.hashicorp.com/boxes/search to find a box
  6. Copy name of box
  7. (If a box hasn't been added) run in project directory vagrant box add (NAME i.e. ubuntu/trusty64)
  8. While still in project directory, vagrant init
  9. Edit Vagrantfile
  10. Open up vagrant file within that project directory
    • uncomment config.vm.network "forwarded_port", guest: 80, host: 8080
    • uncomment config.vm.box = "(BOX NAME i.e. ubuntu/trusty64)"
  11. Save File
  12. vagrant up
  13. Finished (Optional Steps Below for Entering Vagrant Machine)
  14. vagrant ssh
  15. cd into /vagrant folder

Operation:


  1. cd into project directory
  2. vagrant up (if not running)
  3. vagrant halt (if running)

Commands:


  • vagrant up
  • vagrant halt
  • vagrant ssh
  • vagrant destroy
  • exit (exit vagrant ssh session)

#####How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu:

#####Or use my script to do the dirty work for you!

#####Reid's LAMP Vagrant Script:

===

  1. Make sure in Project Directory which is shared in the vagrant machine
  2. vagrant ssh
  3. cd into the /vagrant directory
  4. run sh LAMPVagrantSetupScript.sh
  5. Default Passwords for everything is root & password
  6. Restart Machine (exit, vagrant halt, vagrant up)

===

  • MYSQL: root password
  • PHPMYADMIN: root password

#####Random Notes:

#####Sources:

basicvagrantlampsetup's People

Contributors

reidcooper avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.