sql 双节点安装
将mongodb-linux-x86_64-4.0.4.tgz复制到chinaskill-sql-1和chinaskill-sql-2
解压缩
[root@chinaskill-sql-1 ~]# tar -zxf mongodb-linux-x86_64-4.0.4.tgz -C /usr/local
存放
[root@chinaskill-sql-1 ~]# cd /usr/local
[root@chinaskill-sql-1 local]# mv mongodb-linux-x86_64-4.0.4/ mongodb
写配置文件
[root@chinaskill-sql-1 local]# vi /etc/profile
export PATH=$PATH:/usr/local/mongodb/bin
启用文件
[root@chinaskill-sql-1 local]# source /etc/profile
创建数据库目录
[root@chinaskill-sql-1 local]# mkdir -p /data/db
[root@chinaskill-sql-1 local]# mongo --version
解压缩
[root@chinaskill-sql-2 ~]# tar -zxf mongodb-linux-x86_64-4.0.4.tgz -C /usr/local
存放
[root@chinaskill-sql-2 ~]# cd /usr/local
[root@chinaskill-sql-2 local]# mv mongodb-linux-x86_64-4.0.4/ mongodb
写配置文件
[root@chinaskill-sql-2 local]# vi /etc/profile
export PATH=$PATH:/usr/local/mongodb/bin
启用
[root@chinaskill-sql-2 local]# source /etc/profile
创建数据库的目录
[root@chinaskill-sql-2 local]# mkdir -p /data/db
[root@chinaskill-sql-2 local]# mongo --version
- 点赞
- 收藏
- 关注作者
评论(0)