Install the NVM

wget -qO- https:/ / raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
Copy the code
curl -o- https:/ / raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
Copy the code

source ~/.bashrc

2. Run the NVM –version command to view the version, indicating that the installation is successful

3. Use NVM ls-remote to view all versions of nodes

4. Run NVM install (version number). For example, run NVM install v10.6.0

5. After the installation, run node -v and NPM -v to check the version, indicating that the installation is successful

Mysql installation

Check whether there is any residual mysql on the server

rpm -qa|grep -i mysql

Delete operation

Yum remove ‘yum remove’

View about mysql files

find / -name mysql

Mandatory delete

Rm -rf Specifies the file name

Install wget

yum -y install wget

Download mysql

1. The wget dev.mysql.com/get/mysql57…

Install yum repository

yum localinstall mysql57-community-release-el7-11.noarch.rpm

Check whether the installation is successful

yum repolist enabled | grep “mysql.-community.

When y/n is encountered during mysql installation, enter y

yum install -y mysql-community-server

Start the mysql service

systemctl start mysqld.service

Close the mysql:

systemctl stop mysqld

Check whether to start:

systemctl status mysqld

Restart the mysql:

systemctl restart mysqld

The first installation will have a random password view random password

grep ‘temporary password’ /var/log/mysqld.log

Change the password Use the previous password to log in to the mysql database and change the password

mysql -u root -p

Type the command

ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘your password’;

Enable port 3306 on the server security group

Package the local egg and package the transport

  1. CD to the project
  2. npm install –production
  3. tar -zcvf .. /release.tgz .

So it’s packaged and it’s sent up to your server via file transfer and in this case I’m using FashFXP and then it’s transferred up there

Tar -zxvf release.tgz

$ npm i egg-scripts –save

Add NPM scripts to package.json:

{
  "scripts": {
    "start": "egg-scripts start --daemon"."stop": "egg-scripts stop"}}Copy the code

This allows us to start or stop the application with the NPM start and NPM stop commands.

Change the current database password

Importing a Database

Mysql -h host address -u username -p password mysql -h host address -u username -p password

mysql -u root -p

Enter the password

pwd

To view the document

show databases; Create a database name

create database ljm_egg; Accessing the database

use ljm_egg;

Source specifies the location of the mysql database to be transmitted.

show databases;

* * # * * command

Systemctl restart Nginx. service Restarts