About the new Linux server

CentOS may lack some support libraries during software installation, causing an error. Start by installing your system’s common support libraries. There will be fewer errors during installation. (I don’t understand it either. I copied it online, but it’s useful.)

Command:

    # yum install -y gcc gdb strace gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs patch e2fsprogs-devel krb5-devel libidn libidn-devel openldap-devel nss_ldap openldap-clients openldap-servers libevent-devel libevent uuid-devel uuid mysql-devel
Copy the code

Configuring the Node Environment

First go to the official website to download the Code, here must be noted that there are two kinds of installation, one is the Source Code, one is the compiled file.

1. Compiled files

After decompression, node and NPM already exist in the bin folder. If you go to the corresponding file to execute the command line

There’s no problem at all, but it’s not global, so I’ll just set this to global.

# CD node-v0.10.28- Linux -x64/bin go to the bin folder # ls can view the files in this folder #./node -v can view the node version, but can only run node in this folderCopy the code

Setting global, that is, establishing soft links

# ln -s/home/kun/mysofltware/node - v0.10.28 - Linux - x64 / bin/node/usr/local/bin/node # ln -s / home/kun/mysofltware/node - v0.10.28 - Linux - x64 / bin/NPM/usr/local/bin/NPM/home/here kun/mysofltware/this path is you put, Wherever you unzip the Node file.Copy the code

2. Compile from Source code. This way you download the file Source code

# tar XVF node-v0.10.28.tar.gz decompress the node package # CD node-v0.10.28 into the folder #./configure execute the configuration file # make compile # make install # Node -v Check the node version. If the version number is displayed, the installation is successfulCopy the code

Configuration mongo

  • 1. Download the installation package, I downloaded the 3.6.17, try not to be too new and not too old, the following 2.6 best forget, if you want to upgrade later annoying you (downloadable historical version: www.mongodb.org/dl/linux).

  • 2. Decompress the installation package

      # tar zxf mongodb
    Copy the code
  • 3. Then create a database storage location and log file for mongodb. I set up a data folder under mongodb for storing data and a logs folder for storing logs.

  • 4. Pre-start the mongodb database (if the mongodb database is not disconnected, it is successfully started. If the mongodb database fails, go to the bin folder

    #./mongod -- dbpath /usr/local/mongodb/data -- logpath /usr/local/mongodb/logsCopy the code
  • Mysql > select * from ‘fork’ where ‘fork’ = ‘fork’

    /mongod -- dbpath /usr/local/mongodb/data -- logpath /usr/local/mongodb/logs --forkCopy the code