杂记

1:npm卸载安装特定版本node-gyp 命令如下:

npm uninstall -g node-gyp
npm install -g node-gyp@7.1.2

2:centos安装mongodb 命令如下:

vim /etc/yum.repos.d/mongodb-org-4.2.repo

[mongodb-org-4.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc

yum -y install mongodb-org

systemctl status mongod.service  # 查看mongod状态
systemctl start mongod.service    # 启动
systemctl stop mongod.service     # 停止
systemctl enable mongod.service    # 自启

3:centos关闭防火墙命令

执行关闭命令: 
systemctl stop firewalld.service

再次执行查看防火墙命令:
systemctl status firewalld.service

执行开机禁用防火墙自启命令  : 
systemctl disable firewalld.service

启动:
systemctl start firewalld.service

防火墙随系统开启启动  : 
systemctl enable firewalld.service

  

 

上一篇:mongodb服务停止启动以及自启动-linux


下一篇:Vue—11—网络通信axios;