Home >Operation and Maintenance >Linux Operation and Maintenance >A brief analysis of server code deployment in Linux (share)

A brief analysis of server code deployment in Linux (share)

奋力向前
奋力向前forward
2021-09-06 10:52:312551browse

In the previous article "An article explaining the installation and use of Git (with code)", we learned about the installation and use of Git. The following article will help you understand the remote login script configuration in Linux. Let's see how to do it.

A brief analysis of server code deployment in Linux (share)

##Linux, remote login script configuration, git installation configuration, node installation , mysqlInstallation configuration, nginxInstallation configuration, from 0 to 1, this article will only talk about deployment. There is nothing good to say about writing code. There is a

server aliyun

that writes live code online. Purchase the server, register the server, get

ip, user, password

domain name

Purchase a domain name, then register it, get the registration number, and resolve the domain name to the corresponding IP

Environment

TelnetScript configuration (Mac & Linux)

#!/usr/bin/expect -f
set ip 8.8.8.8 #服务器IP地址
set password 123456 #登录密码
set timeout 10 #超时时间
set user root #登录帐号

spawn ssh $user@$ip
expect {

	"*yes/no" { send "yes"; exp_continue}
	"*password:" { send "$password" }

}
interact

Login prompt

@@@@@@@@@@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ When the server-related data changes,

ssh cannot log in, just clear the local The ~/.ssh/known_hsots file related deletion can be done

Log in through the secret key

After generating the secret key, put the public key content on the server

/root/.ssh/authorized_keys ,Create if not available

Installation and use of git

Installation and use of node

Installation and use of mysql

Installation and use of nginx

【End】

Recommended Learn:

Linux Video Tutorial

The above is the detailed content of A brief analysis of server code deployment in Linux (share). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:chuchur.com. If there is any infringement, please contact admin@php.cn delete