In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The deployment of yapi depends on node.js and mongodb
First install node
Execute the following command:
Curl-silent-location https://rpm.nodesource.com/setup_10.x | bash-yum install-y nodejs
After the installation is complete, install mongodb next.
Install mogodb
First go to mogodb to download the latest installation package. Download address:
Https://www.mongodb.com/download-center#community
Now extract the compressed package when you are finished.
Tar zxf mongodb-linux-i686-1.8.2.tgz
Installation preparation:
Move mongodb to the / usr/local/server/mongdb folder
Mv mongodb-linux-i686-1.8.2 / usr/local/mongodb
Create a location and log for data file storage
Cd / usr/local/server/mongodbmkdir datatouch logs
Start mongodb
Cd / usr/local/server/mongodb/mongodb-linux-i686-1.8.2/bin## does not require authentication startup. / mongod-- dbpath=/usr/local/server/mongodb/data-- logpath=/usr/local/server/mongodb/logs-- logappend-- fork## requires authentication startup. / mongod-- dbpath=/usr/local/server/mongodb/data-- logpath=/usr/local/server/mongodb/logs-- auth-- logappend-- fork
If you need to set boot up, you can do this:
Echo "/ usr/local/server/mongodb/mongodb-linux-i686-1.8.2/bin-- dbpath=/usr/local/server/mongodb/data-- logpath=/usr/local/server/mongodb/logs-- auth-- logappend-- fork" > / etc/rc.local
Parameter explanation:
-- dbpath database path (data file)
-- logpath log file path
-- master designated as the master machine
-- slave specified as slave machine
-- source specifies the IP address of the host machine
-- pologSize specifies that the log file size does not exceed 64m. Because resync is very heavy and time-consuming, it is best to avoid resync by setting a large enough oplogSize (the default oplog size is 5% of the free disk size).
-- add at the end of the logappend log file
-- port enable port number
-- fork runs in the background
-- only specifies which database to replicate
-- slavedelay refers to the time interval detected from replication
-- whether auth needs to verify permission login (username and password)
After mongodb is installed, you can install yapi.
Visual deployment of YAPI
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, click Login to enter the administrator mailbox you just set, and log in to the system with the default password (ymfe.org) (the default password can be changed in the personal Center)
Npm install-g yapi-cli-- registry https://registry.npm.taobao.orgyapi server
When the run is complete, you will be prompted to open http://0.0.0.0:9090 access in the browser. Non-local server, please replace 0.0.0.0 with the specified domain name or ip
At this point, you need to open: http://ip:9090 in the browser for visual installation. If the access is not available, it may be due to the fact that the firewall is not open, and then the port needs to be opened.
Firewall port open
First of all, query whether port 9090 is open.
Firewal-cmd-- if query-port=9090/tcp## prompts no at this time, the port is not open.
Open port
Firewall-cmd-zone=public-add-port=9090/tcp-permanent
Parameter description:
Zone: scope
Tcp: indicates the use of tcp protocol
Permanent: indicates permanent effect
Whether the query is successful
Firewal-cmd-- query-port=9090/tcp## prompts Success to indicate that the port is open
Then restart the firewall
Systemctl restart firewalld
In the process of running, it is found that the node app.js command is not started with a daemon thread during execution, and the service is terminated after the thread exits. So you need to use a daemon thread to start nodejs. You can use the forver plug-in to start it.
First install the forever plug-in
Npm install-g forever
Start the service after the installation is complete:
# # app.js refers to the application forever start app.js forever stop app.js to be run
Reference article:
Https://hellosean1025.github.io/yapi/devops/index.html
Https://www.cnblogs.com/zouke1220/p/9723191.html
Https://www.cnblogs.com/phpk/p/10937534.html
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.