Build the basic process of the virtual site after the Nginx environment is built

Source: Internet
Author: User
Tags ftp create database

Because I hung an empty disk on the home ... Recommended do not hang in home directory ...

cd/home/wwwroot/(go to Site Directory)

mkdir xxx.xxx (Create a folder, generally named after the domain name folder)

CD xxx.xxx (go to the folder you just created)

1. Download form:

wget xxx.xxx/xxx.xxx

Can directly, download directly to the directory below, and then unzip ...

2, upload the form:

You must first build an FTP

Puredb This form:

PURE-PW useradd xxx.xxxftp-u ftpgroup-d/home/wwwroot/xxx.xxx-m # xxx.xxxftp is user name Ftpgroup is an FTP user (non-virtual user)-D followed by xxx.xx Xftp User Directory-M direct generation Puredb not MKDB

The same decompression after the good pass.

Create a MySQL Account

Mysql-u root-p # Enter password

Create Database xxx.xxx; # Create the database (Xxx.xxx is the database name).

Create user ' xxx.xxx ' @ ' localhost ' identified by ' password '; # CREATE DATABASE username xxx.xxx username password The password corresponding to the username;

Grant all privileges in xxx.xxx.* to ' xxx.xxx ' @ ' localhost; # Specify the database username for this database for xxx.xxx and specify all permissions for the xxx.xxx;

OK exit;

To test whether a new account is available

Mysql-u Xxx.xxx-p # Enter just the password;

show databases; # Check to see if there is a xxx.xxx this database;

After extracting the root directory of the newly created site file:

To import a database:

Log in with the newly created database account and import;

Source/home/wwwroot/xxx.xxx/xxx.xxx.sql;

Ok

To create a virtual site configuration file

CD/USR/LOCAL/NGINX/CONF # This path has environmental decisions

Do not know the path can whereis Nginx

CP default.conf xxx.xxx.conf

VI xxx.xxx.conf

Modify the server_name after the site named Www.xxx.xxx; Or xxx.xxx is determined by the request;

The root directory of the virtual site after modifying root is/home/wwwroot/xxx.xxx full path

Ok

modifying data/com.inc.php files

Corresponding database, account, password.

The final step is to parse

Over

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.