Last active
          May 25, 2017 18:39 
        
      - 
      
- 
        Save smijar/85a5823ebbaf1764363325a4cd82319f to your computer and use it in GitHub Desktop. 
    Installing nginx on centos 7
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # from https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-centos-7 | |
| sudo yum install epel-release | |
| sudo yum update | |
| sudo yum install nginx | |
| # start nginx | |
| sudo systemctl start nginx | |
| # If you are running a firewall, run the following commands to allow HTTP and HTTPS traffic: | |
| sudo firewall-cmd --permanent --zone=public --add-service=http | |
| sudo firewall-cmd --permanent --zone=public --add-service=https | |
| sudo firewall-cmd --reload | |
| # verify | |
| curl http://localhost | |
| # to find the public IP of the server | |
| ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//' | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment