{"id":5639,"date":"2023-12-07T10:24:04","date_gmt":"2023-12-07T10:24:04","guid":{"rendered":"https:\/\/natsav.com\/blog\/?p=5639"},"modified":"2024-01-25T12:26:04","modified_gmt":"2024-01-25T12:26:04","slug":"install-nginx-on-centos-7","status":"publish","type":"post","link":"https:\/\/natsav.com\/blog\/install-nginx-on-centos-7\/","title":{"rendered":"How To Install NGINX On Centos 7"},"content":{"rendered":"<p><strong><span style=\"color: #000000;\">Step 1: Update System Packages.<\/span><br \/>\n<\/strong>Ensure that your system packages are up-to-date<br \/>\n# [ sudo yum update ]<\/p>\n<p><span style=\"color: #000000;\"><strong>Step 2: Install NGINX.<\/strong><\/span><br \/>\nUse the following command to install NGINX:<br \/>\n# [ sudo yum install nginx ]<\/p>\n<p><strong><span style=\"color: #000000;\">Step 3: Start NGINX.<\/span><\/strong><br \/>\nOnce the installation is complete, start the NGINX service<br \/>\n# [ sudo systemctl start nginx ]<\/p>\n<p><strong><span style=\"color: #000000;\">Step 4: Enable NGINX to Start on Boot.<\/span><\/strong><br \/>\nTo ensure NGINX starts automatically upon system boot:<br \/>\n# [ sudo systemctl enable nginx ]<\/p>\n<p><strong><span style=\"color: #000000;\">Step 5: Check NGINX Status.<\/span><\/strong><br \/>\nVerify that NGINX is running without errors.<strong><br \/>\n<\/strong># [ sudo systemctl status nginx ]<br \/>\nIf NGINX is running correctly, you should see an active (running) status<\/p>\n<p><strong><span style=\"color: #000000;\">Step 6: Configure Firewall.<\/span><\/strong><br \/>\nIf the firewall is enabled on your system, you may need to allow traffic on the default HTTP port (80). Use the following commands:<br \/>\n# [sudo firewall-cmd &#8211;permanent &#8211;add-service=http ]<br \/>\n# [ sudo firewall-cmd &#8211;reload ]<br \/>\nThis allows HTTP traffic through the firewall.<\/p>\n<p><strong><span style=\"color: #000000;\">Step 7: Access the Default NGINX Page.<\/span><\/strong><br \/>\nOpen a web browser and navigate to your server&#8217;s IP address or domain name. You should see the default NGINX welcome page, indicating a successful installation.<br \/>\n# [ http:\/\/your_server_ip ]<br \/>\nIf you see the NGINX welcome page, then NGINX is installed and working.<\/p>\n<p><span style=\"color: #000000;\"><strong>Step 8: Configure NGINX<\/strong><\/span><br \/>\nYou can now start configuring NGINX for your specific needs. The main NGINX configuration file is usually located at &#8220;\/etc\/nginx\/nginx.conf &#8220;, and the default server block configuration is in &#8220;\/etc\/nginx\/conf.d\/default.conf &#8220;. Edit these files as needed for your web application.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1: Update System Packages. Ensure that your system packages are up-to-date # [ sudo yum update ] Step 2: Install NGINX. Use the following command to install NGINX: # [ sudo yum install nginx ] Step 3: Start NGINX. Once the installation is complete, start the NGINX service # [ sudo systemctl start nginx [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5640,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[256],"tags":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/natsav.com\/blog\/wp-content\/uploads\/2023\/12\/Nginx.png?fit=518%2C298&ssl=1","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5639"}],"collection":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/comments?post=5639"}],"version-history":[{"count":5,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5639\/revisions"}],"predecessor-version":[{"id":5645,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5639\/revisions\/5645"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media\/5640"}],"wp:attachment":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media?parent=5639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/categories?post=5639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/tags?post=5639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}