Anda di halaman 1dari 8

(https://engine.carbonads.com/r?

e=eyJhdiI6MjE0NTIsImF0IjoxLCJjbSI6ODIwNjksImNoIjoxMjA0L
Speed up your App
(http://w w w .launchbit.com /taz/95335050-111/) Deploy New
Relic today and get your
Nerd Life shirt free!
ads via Carbon
(http://carbonads.com )

Have an existing PuPHPet-generated manifest? Just drag your puphpet/config.yaml file into your browser and the form will be filled in with your previous values!

Deploy Target
Local

Digital Ocean

Rackspace

Amazon Web Services

Local VM Instructions

Pre-requisites
1. Download the latest version of VirtualBox from here (https://www.virtualbox.org/wiki/Downloads)
2. Download the latest version of Vagrant from here. (http://www.vagrantup.com/downloads.html)

Local VM Details
Local VM Operating System
CentOS 6.4 x64 - VirtualBox 4.3 (PHP

5.5

5.4

Debian Wheezy 7.2 x64 - Virtualbox 4.3 (PHP

)
5.5

5.4

Debian Squeeze 6.0.7 x64 - Virtualbox 4.3 (PHP

5.4

5.3

Ubuntu Precise 12.04 x64 - Virtualbox 4.3 (PHP

5.4

5.3

Ubuntu Lucid 10.04 x64 - Virtualbox 4.3 (PHP

5.4

5.3

Choose the operating system for your VM. It will be downloaded the first time you run Vagrant. More information may be found here
(http://docs.vagrantup.com/v2/getting-started/boxes.html).
Note: Listed are the PHP installs that we have confirmed as working for their respective operating system. You are welcome to attempt to install higher if you'd like, but
we cannot guarantee it will work. In fact in most cases it won't.

Local VM IP Address
192.168.56.101
IP address to use for accessing the VM. This is the IP address you will need to enter into your hosts file for every virtual hosts you create later on.
Local VM Memory
512
Memory to assign to VM in megabytes (only integers)

Local VM Forwarded Ports


Host Port
7363
Port on Host to forward to VM. Optional, more information (http://docs.vagrantup.com/v2/networking/forwarded_ports.html)
Box Port
22
Port on VM to accept from Host. Optional, more information (http://docs.vagrantup.com/v2/networking/forwarded_ports.html)

Remove this port pair

Add another local VM port pair


Sharing Folders with Local VM
Box Sync Folder Source
./
Path your files are stored on host machine, more information (http://docs.vagrantup.com/v2/synced-folders/index.html). Windows users: You must use forward-slash
c:/dev/vagrant/webroot or double back-slash c:\\dev\\vagrant\\webroot
Box Sync Folder Target
/var/www
Path your hosts' files are mounted on guest machine, more information (http://docs.vagrantup.com/v2/synced-folders/index.html)
Shared Folder Type
Default

NFS

Windows users should choose the Default option, more information (http://docs.vagrantup.com/v2/synced-folders/nfs.html).
NFS is currently buggy mostly on CentOS, and VirtualBox 4.3+. If you experience errors on $ vagrant up complaining about mounting, disable NFS
sharing. NFS performance is faster than default, but is mostly for advanced users only. You should be comfortable diving into Puppet to debug any
potential permissions issues!

Remove this shared folder

Add another local VM shared folder

Server Basics
Server Packages
Installed Packages

Packages to install via the OS package manager, separated by comma. Do not add Apache/Nginx or PHP here - you will choose those later.
Some common packages are (do not mix!):
Debian/Ubuntu:
vim

CentOS:
vim-common

Custom files

dotfiles
You can add all your dot files ( .bash_aliases, .vimrc, .gitconfig, etc), to the puphpet/files/dot/ folder that will appear after you extract your generated zip file.
During initial startup, they will automatically be copied into the VM. There is a sample .bash_aliases file there for you to start with - overwrite at will!

Script files
You can run your own custom code after the VM finishes provisioning by adding files to the puphpet/files/exec-always and puphpet/files/exec-once folders.
Files are executed in alphabetical order. Files within exec-once are run before files within exec-always.
Files within exec-always will run on initial $ vagrant up and all $ vagrant provision, while files within exec-once will run only the first time you run Vagrant, unless you
SSH into the VM and remove the /.puphpet-stuff/exec-once-ran file and re-run Vagrant.

Server Extensions
MailCatcher

MailCatcher
Install MailCatcher
MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. More information available here (http://mailcatcher.me/)
HTTP Port
1080
MailCatcher will be available at http://{SERVER_IP_ADDRESS}:{HTTP_PORT}

Webserver
Apache

Nginx

Apache Modules
Apache Modules
php rewrite
PageSpeed Module
Enable PageSpeed Module (https://developers.google.com/speed/pagespeed/module?hl=de)
Spdy Module
Enable Spdy Module (https://developers.google.com/speed/spdy/mod_spdy/)

Apache Virtual Host


Server Name
p2p.dev
Don't forget to update your computer's hosts file! (/help#update-my-hosts-file)
Server Aliases
www.p2p.dev www.awesome.dev
Separated by comma
Document Root
/var/www/p2p
Location of your site's index.php file, or other landing page.
Port
80
80 for normal browsing, if you choose another append it to the URL, ex: http://awesome.dev:1337
Environment Variables
APP_ENV dev
"name value", separated by comma
AllowOverride
All
Separated by comma, "All" is probably fine. Click here for more hardcore information. (http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride)

Remove this vhost

Add another Apache vhost

PHP
Quick Settings
PHP Version
5.5

5.4

5.3

Ubuntu appears to have occasional problems using a non-default PHP repo version. If using Ubuntu, proceed with caution and please reference the default PHP versions
outline here.
Composer
Install Composer
Composer (https://getcomposer.org) will be available as a system service:
$ composer

INI Settings
display_errors = On error_reporting = -1 session.save_path = /var/lib/php/session
PHP Timezone
America/Sao_Paulo

PHP Modules

cli intl mcrypt


If you've chosen CentOS, Some modules come pre-installed: curl, imagick, memcached, sqlite. Don't choose these here.
PEAR Modules

PECL Modules
pecl_http

PHP Extensions
Xdebug

Xhprof

Drush

XDebug
Install XDebug
CLI debugging will be automatically available. Simply run $ xdebug foo.php! Follow instructions here to setup PHPStorm to listen for a CLI connection
(http://devincharge.com/debug-cli-remote-server/). Other IDEs should be similar.
Settings
xdebug.default_enable = 1 xdebug.remote_autostart = 0 xdebug.remote_enable = 1 xdebug.remote_connect_back = 1
xdebug.remote_handler = dbgp xdebug.remote_port = 9000
Not using Xdebug? Still pounding out var_dump() and print_r() and echo?
Xdebug and You: Why You Should be Using a Real Debugger (https://jtreminio.com/2012/07/xdebug-and-you-why-you-should-be-using-a-real-debugger)

Database
MySQL

PostgreSQL

MariaDB

MySQL Quick Settings


Root Password
123
Assign a password to the root user. Database will only be installed when a password is entered here.
phpMyAdmin
Install phpMyAdmin
If installed it will be available from http://{SERVER_IP_ADDRESS}/phpmyadmin.
Adminer
Install Adminer
If installed it will be available from http://{SERVER_IP_ADDRESS}/adminer.

MySQL Create User & Database


Privileges
ALL

DB Name
p2p
DB Host
localhost
Username
p2p
At this time, one user can only be assigned to one database. You should not enter "root" here! You should not have a single user appear twice!
Password
0101001
Import Database From File
/var/www/sql/database_name.sql
Optional. Make sure this file is inside the VM before running $ vagrant up
Remove this database

Add another MySQL database

NoSQL Database
MongoDB

MongoDB Quick Settings


Install MongoDB
Port
27017

Add another MongoDB database

Work Queue
Beanstalkd

RabbitMQ

Beanstalkd Quick Settings


Install Beanstalkd
Beanstalk is a simple, fast work queue. Learn about Beanstalkd (http://alister.github.io/presentations/Beanstalkd/).
Install Beanstalk Console
Admin console for Beanstalk queue server, written in PHP. More information (https://github.com/ptrofimov/beanstalk_console). If installed, it will be available at
http://{SERVER_IP_ADDRESS}/beanstalk_console/public/

Listen Address
0.0.0.0
Listen Port

13000
Max Job Size
65535
Max Connections
1024
Binlog Directory
/var/lib/beanstalkd/binlog
Set empty to disable binlog.

Search Server
Elastic Search

Elastic Search Quick Settings


Install Elastic Search
Elastic Search is a powerful open source search and analytics engine that makes data easy to explore. Learn about Elastic Search (http://www.elasticsearch.org/).
The official Elastic Search PHP library (https://github.com/elasticsearch/elasticsearch-php)
Elastic Search will be installed and the service will start automatically. Java will also be installed if not already present on the vagrant box. The default port is 9200.

Create your Manifest


Go ahead then, make it!

Blog (https://jtreminio.com)

Twitter (https://twitter.com/juantreminio)

GitHub (https://github.com/puphpet/puphpet)

Star

Back to top

1,418

Fork

242

Made with by Juan Treminio (https://jtreminio.com). Contact him at jtreminio@gmail.com (mailto:jtreminio@gmail.com). Code licensed under the MIT License
(http://opensource.org/licenses/MIT). Bandwidth donated by:

(http://pressable.com)

Made possible thanks to contributions by


(https://github.com/jtreminio)

(https://github.com/frastel)

(https://github.com/Aristona)

(https://github.com/podarok)

(https://github.com/michaelperrin)

(https://github.com/gavroche)

(https://github.com/jaendres)

(https://github.com/adamculp)

(https://github.com/atukai)

(https://github.com/staabm)

(https://github.com/ericcholis)

(https://github.com/yearofthegus)

(https://github.com/jrobeson)

(https://github.com/pborreli)

(https://github.com/taion809)

(https://github.com/ericpoe)

(https://github.com/JCook21)

(https://github.com/kunalp)

(https://github.com/beryllium)

(https://github.com/ygerasimov)

(https://github.com/fdob)

(https://github.com/jimlind)

(https://github.com/markwilson)

(https://github.com/mfairchild365)

(https://github.com/invalid-email-address)

(https://github.com/rogeriopradoj)

(https://github.com/Hikariii)

(https://github.com/javigomez)

(https://github.com/khromov)

(https://github.com/hexmode)

(https://github.com/grahamc)

(https://github.com/ercanozkaya)

(https://github.com/johnkary)

(https://github.com/mtrenker)

(https://github.com/patrickli)

(https://github.com/Mesaph)

(https://github.com/nchagrass)

(https://github.com/ricog)

(https://github.com/dustinmoorman)

Anda mungkin juga menyukai