I have the habit of taking notes, but have not released some content, now want to learn the summary of their own knowledge points released at ordinary times, but also the review of the previous knowledge points, or a long time to forget again. Today we talk about server deployment in Linux environment, as far as my own front-end is concerned, simple server deployment, not very comprehensive, can only be accumulated in the future according to the time to enrich these notes…

Get started!!

Ali cloud ECS server, CentOS preinstalled environment.

1. After the server is purchased, locate the purchased instance in the console

2. Set the server password and remote connection password

3. You can choose to use the command line tool locally, SSH login method, remote login, SSH root@ip address, then will remind you to enter the password, enter the server password is OK

Welcome to Alibaba Cloud Elastic Compute Service!

Dependent Node environment

1. Run the CD /usr/local command to create a server folder

2. Download the Linux installation package from the Node official website and save the nodeJS package to /usr/local/server

3. Unzip

Gz end, run tar xf XXX. - If xxx.tar.xz end, run tar -xvf XXXCopy the code

4. Decompress and change its name: mv node- XXX node(want to change the name)

5. Set the global soft connection

ln -s /usr/local/server/node/bin/npm /usr/local/bin

ln -s /usr/local/server/node/bin/node /usr/local/bin

If an error occurs, go to /usr/local/bin and delete the soft connection

6. Test node -v NPM -v

Install the mongo

1. Download the Linux installation package from the mongodb official website

2. Create a mongodb folder in /usr/local and save the compressed package to the folder

3. Use tar ZXVF XXX to decompress the package

4. Mv XXX Mongo (Want to change the name)

5. CD /, create a data folder in the root directory, and create a DB folder in the data folder

6. Create a logs folder in the root directory and run touch Mongo.log

7. In the bin directory, run

/ mongod-dbpath =/ data-logpath =/logs/mongo. log-logappend-port = 27017-fork, this command is to execute mongo service in the background

8. A dialog box is displayed after success

forked process: 3881

child process started successfully, parent exiting