本系列为新手从成功购买阿里服务后,到网站完全部署运行提供一整套解决方案。
本文介绍如何安装mongo
1、下载mongo安装包

注:这里选择的是mongodb-linux-x86_64-amazon-3.6.5版本,具体版本可以参照mongo官网进行选择


2、解压编译mongo压缩包,完成后mongo安装成功,接下来是简单配置

3、进入mongo目录

4、为mongod配置全局参数,也就是windows所讲的环境变量

5、回到local目录,进行mongo数据储存目录配置

6、在local目录下创建data目录,进入data目录创建db和log目录(注意目录层级关系)

7、mongod启动mongodb并且fork运行。(开启fork,必须输入logpath)

注:mongod安装运行稍有不顺,便会产生诸多问题,如有问题请留言
网友评论