Giter Site home page Giter Site logo

vagrant-lamp-stack's Introduction

Vagrant LAMP stack

A dead-simple LAMP stack without any bells and whistles for your basic Linux/Apache/MySQL/PHP install, using Chef Solo for provisioning.

The idea is for developers to fork this and add additional software and configuration that suits the needs of their project.

Requirements

Note: Vagrant 1.0.x compatible stack is also available.

Installation

Clone this repository

$ git clone [email protected]:MiniCodeMonkey/Vagrant-LAMP-Stack.git

Place your website in the public folder

Usage

Start the VM

$ cd Vagrant-LAMP-Stack
$ vagrant up

You can now access your project at http://projectname.local

Screenshot of up-and-running server

Database dump import

Chef will automatically try to import the database dump specified by the filename set in the :db_dump option of your Vagrantfile.

If you are using the default configuration, just create a dump.sql file in the root directory with your table structure and/or content and it will be imported automatically when you run vagrant up.

Installed software

  • Apache 2
  • MySQL
  • PHP 5.4 (with mysql, curl, mcrypt, memcached, gd)
  • memcached
  • postfix
  • vim, git, screen, curl, composer

Default credentials

MySQL

  • Username: root
  • Password: root
  • Host: localhost
  • Port: 3306

Note: Remote MySQL access is enabled by default, so you can access the MySQL database using your favorite MySQL client with the above credentials (and using e.g. projectname.local as hostname).

Memcached

  • Port: 11211

Bitdeli Badge

vagrant-lamp-stack's People

Contributors

bitdeli-chef avatar caoer avatar ilyar avatar minicodemonkey avatar paul-vg avatar tomcoonen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vagrant-lamp-stack's Issues

could not find recipe server for cookbook mysql

After running vagrant up I get an error about mysql cookbook, but I don't know how to fix it.

==> projectname: Recipe Compile Error
==> projectname: ================================================================================
==> projectname: 
==> projectname: Chef::Exceptions::RecipeNotFound
==> projectname: --------------------------------
==> projectname: could not find recipe server for cookbook mysql
==> projectname: 
==> projectname: [2015-01-30T07:51:08+00:00] ERROR: Running exception handlers
==> projectname: [2015-01-30T07:51:08+00:00] ERROR: Exception handlers complete
==> projectname: [2015-01-30T07:51:08+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

vagrant up missing configuration.

mini:Vagrant-LAMP-Stack max$ vagrant up
Bringing machine 'projectname' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

Vagrant:

  • Unknown configuration section 'berkshelf'.

PHP doesn't get installed

Just getting errors. 2 month before it was working :(

  1. ==> tuto: stdin: is not a tty
  2. ==> tuto: Error executing action install on resource 'package[php5-dev]'
    ...
  3. ==> tuto: Ran apt-get -q -y install php5-dev=5.4.32-1~dotdeb.0 returned 100
  4. ==> tuto: [2014-08-23T22:09:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
    Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.

Anyone know how to fix it? Thank you.

Php 5.3

Hi,
I would like to know how use php 5.3 instead of php 5.4 ?
Thanks

Won't Boot

I get the following error when trying to vagrant up. Any ideas what is going wrong?

Generating chef JSON and uploading...
Running chef-solo...
stdin: is not a tty
[2013-11-15T08:21:34+00:00] INFO: *** Chef 10.14.2 ***
[2013-11-15T08:21:34+00:00] INFO: Setting the run_list to ["recipe[app::packages]", "recipe[app::web_server]", "recipe[app::vhost]", "recipe[memcached]", "recipe[app::db]", "recipe[postfix]"] from JSON
[2013-11-15T08:21:34+00:00] INFO: Run List is [recipe[app::packages], recipe[app::web_server], recipe[app::vhost], recipe[memcached], recipe[app::db], recipe[postfix]]
[2013-11-15T08:21:34+00:00] INFO: Run List expands to [app::packages, app::web_server, app::vhost, memcached, app::db, postfix]
[2013-11-15T08:21:34+00:00] INFO: Starting Chef Run for projectname.local
[2013-11-15T08:21:34+00:00] INFO: Running start handlers
[2013-11-15T08:21:34+00:00] INFO: Start handlers complete.
[2013-11-15T08:21:35+00:00] ERROR: Running exception handlers
[2013-11-15T08:21:35+00:00] ERROR: Exception handlers complete
[2013-11-15T08:21:35+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-11-15T08:21:35+00:00] FATAL: SyntaxError: compile error
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix/metadata.rb:19: syntax error, unexpected ':', expecting $end
display_name: 'postfix/main',
             ^
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Error while installing berkshelf plugin

Hi,

There's an error with the berkshelf plugin. I'm on Ubuntu 13.10 and Vagrant 1.5.1, and Ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux] {gem : 1.8.23} :

$ vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
The plugin(s) can't be installed due to the version conflicts below.
This means that the plugins depend on a library version that conflicts
with other plugins or Vagrant itself, creating an impossible situation
where Vagrant wouldn't be able to load the plugins.

You can fix the issue by either removing a conflicting plugin or
by contacting a plugin author to see if they can address the conflict.

Vagrant could not find compatible versions for gem "celluloid":
  In Gemfile:
    vagrant-berkshelf (>= 0) ruby depends on
      celluloid (~> 0.13.0) ruby

    vagrant (= 1.5.1) ruby depends on
      celluloid (0.15.2)

Regards
Fabrice

Permission Denied when Attempting to run Submodule Update

When I attempt to complete the installation of this repo via the git submodule update --init command, I get permission denied errors for each of the submodules. If I manually clone the submodules into the repo everything works fine. Am I missing something?

Variable projectname?

I'm pretty new to Vagrant, and was wondering if there's an easy way to implement a different projectname. From what I can gather now I have to change it everywhere in the Vagrantfile, isn't there like an option to set it as a variable at the start of the file?

Any pointers would be greatly appreciated!

Error executing action `install` on resource 'package[php5-cgi]'

I think I almost got this thing working, but right at the end, it fails:

Error executing action `install` on resource 'package[php5-cgi]'
==> cider: [2014-10-18T13:41:18+00:00] INFO: Forking chef instance to converge...
==> cider: [2014-10-18T13:41:18+00:00] INFO: *** Chef 11.6.0 ***
==> cider: [2014-10-18T13:41:19+00:00] INFO: Setting the run_list to ["recipe[app::packages]", "recipe[app::web_server]", "recipe[app::vhost]", "recipe[memcached]", "recipe[app::db]"] from JSON
==> cider: [2014-10-18T13:41:19+00:00] INFO: Run List is [recipe[app::packages], recipe[app::web_server], recipe[app::vhost], recipe[memcached], recipe[app::db]]
==> cider: [2014-10-18T13:41:19+00:00] INFO: Run List expands to [app::packages, app::web_server, app::vhost, memcached, app::db]
==> cider: [2014-10-18T13:41:19+00:00] INFO: Starting Chef Run for ciderdev
==> cider: [2014-10-18T13:41:19+00:00] INFO: Running start handlers
==> cider: [2014-10-18T13:41:19+00:00] INFO: Start handlers complete.
==> cider: [2014-10-18T13:41:19+00:00] ERROR: Running exception handlers
==> cider: [2014-10-18T13:41:19+00:00] ERROR: Exception handlers complete
==> cider: [2014-10-18T13:41:19+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> cider: [2014-10-18T13:41:19+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Fatal: Could not read from repository

The error message and

Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
Permission denied (publickey).

appear, when trying to clone the repo to a local folder. Is that my fault? Or where does the ID come from? (And how could I remove it from that "list of known hosts"...)

Auto Database Creation

Feature Request:

Be able to specify a database name and a path to an .sql dump so on Vagrant Up it automatically will build the database

Error executing action `create` on resource 'mysql_service[default]'

mysql_service[default](mysql::server line 20) had an error: Chef::Exceptions::Exec: service[mysql](/tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb line 59) had an error: Chef::Exceptions::Exec: /sbin/start mysql returned 1, expected 0

there's an error during vagrant up for a new environment. php5.conf modified

==> projectname: Configuration file `/etc/apache2/mods-available/php5.conf'
==> projectname:  ==> Modified (by you or by a script) since installation.
==> projectname:  ==> Package distributor has shipped an updated version.
==> projectname:    What would you like to do about it ?  Your options are:
==> projectname:     Y or I  : install the package maintainer's version
==> projectname:     N or O  : keep your currently-installed version
==> projectname:       D     : show the differences between the versions
==> projectname:       Z     : start a shell to examine the situation
==> projectname:  The default action is to keep your current version.
==> projectname: *** php5.conf (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing libapache2-mod-php5 (--configure):
==> projectname:  EOF on stdin at conffile prompt
==> projectname:
==> projectname: Creating config file /etc/php5/cgi/php.ini with new version
==> projectname: Errors were encountered while processing:
==> projectname:  libapache2-mod-php5
==> projectname: E: Sub-process /usr/bin/dpkg returned an error code (1)
==> projectname: ---- End output of apt-get -q -y install php5-cgi=5.4.33-1~dotdeb.0 ----
==> projectname: Ran apt-get -q -y install php5-cgi=5.4.33-1~dotdeb.0 returned 100
==> projectname: [2014-10-13T17:47:54+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Vagrant 1.5

Special request for Vagrant 1.5 compatible version without Berkshelf.

Do you take donations?

403 Forbidden - Missing "Require all granted" in virtualhost for Apache > 2.4

Hi,

Thank you for sharing it helped me a lot. I'm testing the project on a Ubuntu 14.04 and the web_app.conf.erb misses a "Require all granted", else the vhost displays a 403 Forbidden.

  <Directory <%= @params[:docroot] %>>
    EnableSendfile Off
    Options FollowSymLinks
    AllowOverride <%= [@params[:allow_override] || "All" ].flatten.join " " %>
    Require all granted
    Order allow,deny
    Allow from all
  </Directory>

PHP 5.4 would be better

I really like this setup, it has almost everything I would need in my dev env. But I think PHP 5.4 would be a better fit then the 5.3 version you have in there now.

Running provisioner: hostmanager

I keep getting this message when I try to run vagrant up and don't see anything in the instructions on what to put in for a password.

PHP cookbook fails on FFI gem dependency

The latest version of the PHP cookbook, v1.3.1, now includes support for Windows, which causes Vagrant-LAMP-Stack setup to fail when provisioned. It is due to the following cookbook dependency chain: PHP -> Windows -> IIS -> ffi

Provisioning fails on the missing FFI gem. This can be resolved by requiring PHP v1.2.6 in the Berksfile or by ensuring the ffi gem is installed before hand.

# Berksfile
cookbook "php", "~> 1.2.6"

Error for "git clone" from the manual.

mini:lamp max$ git clone [email protected]:MiniCodeMonkey/Vagrant-LAMP-Stack.git
Cloning into 'Vagrant-LAMP-Stack'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Can't access projectname.local?

Vagrant v.1.3.5. Virtualbox v.4.2.18.
I've installed Berkshelf (both the ruby gem & vagrant plugin) and vagrant hostmanager.
Running vagrant up works okay and I can ssh into the VM.

Yet when navigating to http://projectname.local/ I see "Oops! Google Chrome could not connect to projectname.local".

Interestingly when I ssh into the VM and run $ service apache2 or $ service apache it says it's an unrecognized service.

Any ideas/help would be great.

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.