1. Domain name purchase

2. Purchase a server.

Japanese nodes of Vultr are used. You can also build ss; You can also hang your own site. Very comfortable; Build ss: juejin. Cn/post / 684490…

3. Server environment installation (difficult here)

The vultr system is installed with CentOS7. Download with yum

  • 1. With the hardware and software applications in place, let’s talk about what’s the minimum amount of software you need to install to get the service running. The software we need is: nginx, NodeJS, PM2, git.

    • Nginx: serves as an HTTP server to accept requests from the Internet and forward the requests to the corresponding ports according to the configured rules.

    • Nodejs: provides the JS running environment on cloud hosts

    • PM2: process manager for node applications

    • Git: Pull git repository code remotely to a cloud host

  • 2 installation (Since the online machine system used in this paper is Ubuntu, the software installation is apt-get. Yum yum yum yum yum yum yum yum

    Sudo apt-get update sudo apt-get install build-essential libssl-dev NVM curl-o - https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash or wget -- qO https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash restart command source ~ /. Bashrc NVM install version < node > eg: NVM install 8.9.1 node -v check whether node is successfully installed 2. Install git sudo apt-get install git 3 NPM install -g PM2 NPM install -g PM2 NPM install -g PM2 Install openssl libssl-dev sudo apt-get install libpcre3 libpcre3-dev sudo apt-get install zlib1g-dev then install nginx wget manually http://nginx.org/download/nginx-1.12.2.tar.gz tar ZXVF nginx - 1.12.2. Tar. Gz. / configure -- prefix = / server/runtime/nginx / 1.12.2 (prefix parameters is set up your installation target path) make && make installCopy the code

Nginx is not installed globally but is installed in a separate folder because. There may be multiple projects that can set multiple profiles. (I installed it globally anyway.)

  • /etc/nginx/nginx.conf (nginx/nginx.conf)

  • Commands used

    Lsof -i:[prot] 1, copy and paste the file &emsp; &emsp; Cp [option] source file or directory Destination file or directory 2, cut and paste file &emsp; &emsp; Mv [Option] Source file or directory Target file or directory 3, delete the file rm file with caution rm -rfCopy the code

4. The pit

  • After nginx is installed, access through IP address is unavailable. Cause CentOS7.0 uses the iptables firewall as the default firewall.

5. Upload the file to the server

So far I've just uploaded an index.html file. SSH [root]@[IP address] change the password of the server: passwd commandCopy the code
    1. Brew install LRZSZ;
    1. Configuration item2 github.com/xmvper/iter… Download two files
    1. ITem-> Preferences -> Profiles -> Advanced -> Triggers -> Edit -> + -> Add two configurations
        Regular expression: \*\*B0100
        Action: Run Silent Coprocess
        Parameters: /usr/local/bin/iterm2-send-zmodem.sh 
        Regular expression: \*\*B00000000000000
        Action: Run Silent Coprocess
        Parameters: /usr/local/bin/iterm2-recv-zmodem.sh
    Copy the code
    1. Enter rZ and a dialog box will pop up asking you to select the file to upload. Done!
Reference article:
  • Part of the environment zhuanlan.zhihu.com/p/31017897 installation
  • Close the firewall blog.csdn.net/libaineu200…
  • Firewall installation www.cnblogs.com/lemon-flm/p…
  • Part of the reference https://space.bilibili.com/18436433?spm_id_from=333.788.b_765f7570696e666f.2

To be continued