In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Environmental requirements
Nodejs (7.6 +)
Mongodb (2.6 +)
Git
Nodejs and git installation is very simple here, and only the installation process of mongodb is recorded here:
Install mongodbcurl-O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.6.tgz # download tar-zxvf mongodb-linux-x86_64-3.0.6.tgz # extract mv mongodb-linux-x86_64-3.0.6 / / usr/local/mongodb # copy the package to the specified directory
The executable file for MongoDB is located in the bin directory, so you can add it to the PATH path:
Vi / .bashrc
Add at the end of the .bashrc file:
Export PATH=/usr/local/mongodb/bin:$PATH
Save file exit, execute command
Source / .bashrc
Create a database directory
MongoDB's data is stored in the db directory of the data directory, but this directory is not automatically created during installation, so you need to manually create the data directory and create the db directory in the data directory.
In the following example, we create the data directory under the root directory (/).
Create mongod log files in the / data/db/logs/ directory
Note: / data/db is the default MongoDB startup database path (--dbpath).
Mkdir-p / data/dbtouch / data/db/logs/mongod.log
Check whether the installation is complete
Mongo-version
If the version number appears, the installation is complete at this time
Enable mongodb:
Mongod or / usr/local/mongodb/bin/mongod
The backend remains open:
Mongod-fork-logpath / data/db/logs/mongod.log or / usr/local/mongodb/bin/mongod-fork-logpath / data/db/logs/mongod.log
The mongod installation is complete.
The MongoDB runtime port uses the default 27017, and you can access the web user interface at port 28017, that is, http://localhost:28017 or http://localhost:27017.
Install Yapi (visual deployment is used here, server firewall is recommended to be turned off first, outbound rules are fully on, and the installation process is useful to other ports)
Installation
It is very easy to deploy the YApi platform using the yapi-cli tools we provide. Execute yapi server to start the visual deployment program, enter the appropriate configuration and click start deployment, you can complete the deployment of the entire site. After the deployment is complete, follow the prompts and execute node/ {Web site path / server/app.js} to start the server. Open the specified url in the browser and click Log in to enter the administrator mailbox you just set. The default password is ymfe.org login system (the default password can be changed in the personal center).
Npm install-g yapi-cli-- registry https://registry.npm.taobao.orgyapi server
Service management
Use pm2 to facilitate service management and maintenance.
Npm install pm2-g / / install pm2cd {project directory} pm2 start "vendors/server/app.js"-- name yapi / / pm2 manage yapi service pm2 info yapi / / View service information pm2 stop yapi / / stop service pm2 restart yapi / / restart service
Upgrade
Upgrading the project version is very easy and does not affect the existing project data, but only synchronizes the source files in the vendors directory.
Cd {Project Directory} yapi ls / / View version number list yapi update / / update to the latest version yapi update-v {Version} / / update to the specified version
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.