Beginner's introductory "ASP." 3: Preparing for CentOS and nginx environments

Source: Internet
Author: User
Tags knowledge base virtual private server

Basic software

VMware virtual Machines

Centos:http://isoredirect.centos.org/centos/7/isos/x86_64/centos-7-x86_64-minimal-1708.iso

CentOS Installation

Open a VMware virtual machine, select File----Create a new virtual machine

Generally downloaded CentOS system is placed under the VMware folder.

Select the network mode (general Nat is enough)

The next choice is the default.

And then you run it.

Language selection in English

Select Location

Then start the installation

Enter Password root123

Then wait for the installation to complete, the user does not need to fill in

Reboot once installation is complete

Enter root, root123 login

Done

Basic CentOS configuration and using Linux commands to see if the network is working properly

As shown in the network is not normal

See if there is a ifconfig (Network communication command)

The discovery does not have this command (because we have installed the minimum version of the CentOS problem, some components need to be installed manually)

Cd/ect/sysconfig

Enter the NIC settings, edit the Ifcfg-ens33 file

Input mode, you can edit the content. Enter input mode by letter I press ESC to enter command mode
Last line mode, you need to switch to the last line when exiting. Enter in command mode: Enter the last line mode
: Wq Save exit: q! Force quit does not save

Then restart the NIC

Ping Baidu (Success)

Configure Ifconfig

There's still no ifconfig command.

Installing the Net-tools Package

Install all input y

Then execute the ifconfig command.

Using putty to connect to CentOS

Open the Putty software, enter the CentOS IP, port number 22

Enter the login screen, type root, root123

Installing Nigex

Guide Installation Address: https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-centos-7

First step: Add a CentOS 7EPEL library

To open the terminal, use the following command

sudo yum install epel-release

Step Two: Install Nginx

Now that the Nginx Knowledge Base is installed on your server, install Nginx using the following Yum command

sudo yum install Nginx

After you answer "yes" prompt, Nginx will complete installation to your virtual private server (VPS)

Step Two: Start Nginx

Nginx does not start itself. Enter the following command to let Nginx run:

sudo systemctl start nginx

After the boot is complete, we can access Nginx with the CentOS IP and 80 port.

If you can't access it, there's still a problem.

If you're running a firewall, run the following commands to enable HTTP and HTTPS traffic (if you are running a firewall, run the following command to allow HTTP and https through Letter

sudo firewall-cmd--permanent--zone=public--add-service=http sudo firewall-cmd--permanent--zone=public-- Add-service=httpssudo Firewall-cmd--reload

Access Port 80 Again

Installation Successful

Beginner's introductory "ASP." 3: Preparing for CentOS and nginx environments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.