GithubHelp home page GithubHelp logo

folpindo / ansible-playbook-wordpress-nginx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alta3/ansible-playbook-wordpress-nginx

0.0 1.0 0.0 40 KB

Ansible Playbook for installing WordPress on Nginx with Ubuntu

PHP 100.00%

ansible-playbook-wordpress-nginx's Introduction

WordPress + Nginx Ansible Playbook

Ansible playbook and roles for installing WordPress + Nginx + PHP + Postfix server

Requirements

  • Ansible 2.0.0 or newer
  • Ubuntu 16.04 (installed on your web server or virtual machine)

Instructions:

  1. You have properly booted a new server on the OpenStack cloud, which means you need to gather some information.

    • Write down the IP address of your server you just booted
    • Your ~/.ssh/id_rsa.pub key is trusted by your new server
    • Your user is ubuntu, which is a passwdless sudoer, but when you check visudo, the user=ubuntu is NOT there. however you notice that there is an include directory: /etc/sudoers.d at the bottom of the file
    • You check /etc/sudoers.d and you notice that there is a file called 90-cloud-init-users.
    • You open /etc/sudoers.d/90-cloud-init-users
    • OK, so it looks like the "ansible-boxes" are checked, an RSA key is in place and ubuntu is a passwdless sudoer. You also have the IP address of your new server!
  2. Edit your /etc/hosts file, and add a new host line like the one below EXCEPT replace 10.0.0.65 with the ip address of your new server. When your are finished, your new server will look like the /etc/hosts file below with the critical exception that the IP address will be your server, not 10.0.0.65`

    student@beachhead:~$ sudo vim /etc/hosts

    10.0.0.65 alta3.local

    127.0.0.1 beachhead localhost
    172.16.1.4 beachhead
    172.16.1.5 controller
    172.16.1.6 compute1
    172.16.1.7 compute2
    172.16.1.5 block1
    172.16.1.5 object1
    10.0.0.65 alta3.local
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    
  3. Ping alta3.local and you must be back a positive response.

    student@beachhead:~$`` ping alta3.local

    PING alta3.local (10.0.0.65) 56(84) bytes of data.
    64 bytes from alta3.local (10.0.0.65): icmp_seq=1 ttl=62 time=2.25 ms
    64 bytes from alta3.local (10.0.0.65): icmp_seq=2 ttl=62 time=0.650 ms
    64 bytes from alta3.local (10.0.0.65): icmp_seq=3 ttl=62 time=0.676 ms
    64 bytes from alta3.local (10.0.0.65): icmp_seq=4 ttl=62 time=0.640 ms
    
  4. Clone the repository

    student@beachhead:~$ git clone https://github.com/alta3/ansible-playbook-wordpress-nginx.git

  5. cd into the new directory

    student@beachhead:~$ cd ansible-playbook-wordpress-nginx/

  6. Edit the hosts file to point to alta3.local's IP address. An example of your hosts file is below, so just REAPLACE 10.0.0.65 with the IP address of your cloud host.

    student@beachhead:~/ansible-playbook-wordpress-nginx$ vim hosts

    [webservers]
    alta3.local  ansible_host=10.0.0.65 ansible_ssh_user=ubuntu
    
  7. Let's run the playbook

    student@beachhead:~/ansible-playbook-wordpress-nginx$ ansible-playbook playbook.yml -i hosts

  8. Let's test our web page! Open a browser to:

    http://alta3.local

  9. You should be looking at a wordpress config page after being automatically redirected to http://alta3.local/wp-admin/install.php

  10. Totally up to you, but if you got this far, let's configure your new web site.

    Select ENGISH and continue

  11. Set up credentuals

    Site Title:  alta3 	
    Username:    ubuntu 	
    Password:    alta3 
    Confirm use of weak password:    check
    Your Email::  your spam email or whatever 	
    Search Engine Visibility: check
    

ansible-playbook-wordpress-nginx's People

Contributors

jwlms avatar sfeeser avatar

Watchers

 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.