Upload the Nuxt project to run on the Alibaba Cloud linux server

First, you need to package some Nuxt projects. For details, you can refer to the article
Nuxt packaging and deployment to run in the local environment.
Then you need to buy a set of Alibaba Cloud server. You can refer to the article
Buying an Alibaba Cloud server and access it
. Then you need to install SSH on your computer. You can refer to the article
Windows system installation SSH
then zip the installed Nuxt project folder into a package

Log in to the server remotely
insert image description here
and then you need to install a node on the server. You can refer to the article
Alibaba Cloud Linux cloud server to install the specified version of node.js.
Go back to our own computer and open the command line tool in the directory where the Nuxt project is packaged.

insert image description here
Enter commands in the command window

scp -r ./nuxdom.zip 用户名@服务器公网地址:/root

Here I specify that the file to be uploaded is nuxdom.zip in the current directory, and then the server user name@server public network address public network address. You have to go to the instance management to check the user name. If you haven’t touched it, it is usually root and then: Which directory to transfer to the server? I chose root
insert image description here
to connect for the first time. He will let us confirm that we enter y and press Enter.

Then the system will ask us to enter the password, and we can enter it normally. If it
insert image description heresucceeds, the location will output the file information. insert image description here
We will remotely connect to the server again and enter ll in the command window to check it.
insert image description here
Doesn’t he have it?
We enter pwd to come to the root directory and
insert image description here
then we Introduce the unzip command
input

sudo yum update

insert image description here
There is no way to use it here, you have to agree to
enter y and press Enter
and then execute

sudo yum install unzip

Ask if you agree or want to use it, just press y obediently and then press Enter

Then unzip the file

unzip nuxdom.zip

It means that after decompressing the nuxdom.zip in the current directory, it is
insert image description here
decompressed

cd nuxdom

Enter the nuxdom directory,
insert image description here
first you need to confirm your node server and computer version have been
entered

npm i

Install the dependencies
insert image description here
and run the project in Poison Ang

npm run start

insert image description here
Here we enter y and press Enter

The project is running on the server
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45966674/article/details/130131417