vue - blog the development of science 7

The basic project deployed to linux (front and back just to achieve the basic functions, this record just some of the basic development process, improve, and other follow-up)

1, linux environment ready (I use Ali cloud server)

  ①jre, mysql, Nginx Basically these on it

  Installation jdk:

// pre-downloaded 8u211-Linux-the JDK x64.rpm 
RPM -ivh the JDK-8u211-Linux-x64.rpm

This appears to have been completed on behalf of

[root@nxz ~]# java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

 

Install mysql:

 // advance download good-Community Community-Release-mysql80 el7-3.noarch.rpm 

[root @ NXZ ~] # RPM -Uvh mysql80-Community Community-Release-el7-3.noarch.rpm
[root @ nxz ~ ] #
[root@nxz ~]# rpm -Uvh mysql80-community-release-el7-3.noarch.rpm 
warning: mysql80-community-release-el7-3.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql80-community-release-el7-3  ################################# [100%]

After the completion of execution: executing the following command, and follow the prompts to install some other stuff

yum install mysql-community-server

Until the output:

After the installation is complete, start mysql:

service mysqld start
[root @ nxz ~] # Ps -ef | grapefruit MySQL
mysql      2855 1 3 21:30? 00:00:00 / usr / sbin / mysqld // This code has already started mysql
root      2917  1937  0 21:31 pts/0    00:00:00 grep --color=auto mysql

Queries temporary password generated during the installation of:

grep "password" /var/log/mysqld.log
2019-06-12T13:30:49.812989Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: lqpRNIw7QB_5

Login mysql:

mysql -uroot -p***

After logging in to modify mysql password:

ALTER USER 'root' @ 'localhost' IDENTIFIED BY '123'; modify the MySQL database password (It should be noted here that the new password must start with an uppercase, include upper and lower case letters, numbers, special characters, etc.)

For example, I would like to connect to the MySQL database server on the cloud Ali just configured with Navicat on this machine, you also need this step:

. * * to Grant All ON ADMIN @ '%' IDENTIFIED by'123456 'with the Option Grant;     // [ADMIN] [username] is remotely connected, [123456] remote connections] [password (the same password must is the beginning of a capital, include upper and lower case letters, special symbols, etc.)

(On top of that some version of mysql is not supported, root user can not be used outside the network access), and therefore need to create a user other

mysql> use mysql;
Database changed
mysql> create user 'admin'@'%' identified by '******';
Query OK, 0 rows affected (0.01 sec)

// authorized to access 
MySQL> Grant All ON * * to 'ADMIN' @ '%'. ;
Query OK, 0 rows affected (0.01 sec)

mysql> 

Another: the need to open firewall ports 3306 and 8080

View: Firewall-cmd = --zone public --list-the ports

[root@nxz ~]# firewall-cmd --state
running
[root@nxz ~]# firewall-cmd --zone=public --add-port=3306/tcp --permanent
success
[root@nxz ~]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
success
[root@nxz ~]# firewall-cmd --reload

Use Navicat link:

 

Authentication plugin 'caching_sha2_password' cannot be loaded

 :( encountered this problem on top of each such user must perform once))

1 to modify and update the account password user password encryption rules

   The USER the ALTER 'the root' @ 'localhost' the IDENTIFIED BY 'password' PASSWORD the EXPIRE NEVER; # modify the encrypted rules 

   The USER the ALTER 'root' @ 'localhost' IDENTIFIED the WITH mysql_native_password BY 'password' ; # update about the user's password 


   FLUSH PRIVILEGES; # refresh permission 

or:

It appears the problem is to verify the plug-in, under investigation:

SELECT `user`, `host`, `authentication_string`, `plugin` FROM mysql.user;



+------------------+-----------+------------------------------------------------------------------------+-----------------------+

| user             | host      | authentication_string                                                  | plugin                |

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

| archiver         | %         | $A$005$==t@l=SP'G{U[1})D8yLwA6ti2uHtmUKNuHxQSUggrBRMBR2CheCw0Oxad9 | caching_sha2_password |

| mysql.infoschema | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| mysql.session    | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| mysql.sys        | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| root             | localhost | $A$005$==t@l=SP'G{U[1})D8yLwA6ti2uHtmUKNuHxQSUggrBRMBR2CheCw0Oxad9 | caching_sha2_password |

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

5 rows in set (0.06 sec)


Modify arhiver account password authentication plug-in type:

ALTER USER 'archiver'@'%' IDENTIFIED WITH mysql_native_password BY 'archiver';

flush privileges;





Look again,

SELECT `user`, `host`, `authentication_string`, `plugin` FROM mysql.user;

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

| user             | host      | authentication_string                                                  | plugin                |

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

| archiver         | %         | *13D295FD7B8108ABBC89FCDDD342FFBFF5DA803C                              | mysql_native_password |

| mysql.infoschema | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| mysql.session    | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| mysql.sys        | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| root             | localhost | $A$005$==t@l=SP'G{U[1})D8yLwA6ti2uHtmUKNuHxQSUggrBRMBR2CheCw0Oxad9 | caching_sha2_password |

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

5 rows in set (0.06 sec)

After modifications are complete, you can use Navicat links:

https://yq.aliyun.com/articles/636568

 

 

Configuration ngnix:

Nginx can install this: https://www.runoob.com/linux/nginx-install-setup.html

After the configuration:

Nginx start command is as follows:

[root@bogon conf]# /usr/local/webserver/nginx/sbin/nginx

View :( process has started)

[root@nxz conf]# /usr/local/webserver/nginx/sbin/nginx 
[root @ nxz conf] # Ps -ef | grapefruit nginx
root     16340     1  0 22:43 ?        00:00:00 nginx: master process /usr/local/webserver/nginx/sbin/nginx
www      16341 16340  0 22:43 ?        00:00:00 nginx: worker process
www      16342 16340  0 22:43 ?        00:00:00 nginx: worker process
root     16351  1937  0 22:43 pts/0    00:00:00 grep --color=auto nginx
[Root @ nxz conf] # 

Other commands:

/ usr / local / webserver / nginx / sbin / nginx - S # reload reload the configuration file
 / usr / local / webserver / nginx / sbin / nginx - S Reopen # restart Nginx
 / usr / local / webserver / nginx / sbin / stop Nginx nginx -s stop #

 

2, Server Configuration security group

 3, the above configuration is complete, the front and rear ends on the item to the server

Packed into the distal end ngnix / html in to (put away after the required reload), a random background

After the placement, direct access to the server ip to see:

 

Guess you like

Origin www.cnblogs.com/nxzblogs/p/11013433.html