nganhtuan63 / ansible-lemp-centos7

Full webstack for PHP developing - LEMP - Centos 7, Nginx, Percona Database, PHP-FPM 5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ansible-lemp-centos7

Full webstack for PHP developing - LEMP - Centos 7, Nginx, Percona Database, PHP-FPM 5

  • Requirements

    • Vagrant with Virtual Box
    • Ansible
  • Get Centos 7 Box

  • Check out this git. Type this command:

     	git clone git@github.com:gxcsoft/ansible-lemp-centos7.git
    
  • Local vagrant developement machine

    • Move to check out folder
    • vagrant box add gxc your_centos_7_box_location
    • vagrant up
    • vagrant provision (to run ansible if vagrant up is not run provision automatically)
    • vagrant ssh (access to your new virtual machine)
  • Production server

    • Move to check_out_folder/ansible
    • Create your_server_role_config.yml. Here is an example:
     	---
     	- hosts: host_config_name
     	  sudo: yes
     	  roles:
     	  - common
     	  - percona
     	  - nginx
     	  - php-fpm-55
     	  - nginx-conf
    
    • Add server ip address in to hosts. Here is an example:
     	[host_config_name]
     	128.199.179.xx
    
    • Type this command to run ansible (ansible must be installed)
     	ansible-playbook -i ./hosts -u your_server_ssh_account your_server_role_config.yml
    
  • Any questions? Please add new issue or send me an email tung@gxccms.com

About

Full webstack for PHP developing - LEMP - Centos 7, Nginx, Percona Database, PHP-FPM 5


Languages

Language:Shell 98.9%Language:PHP 1.1%