毕业设计采用 Python 写电影个性化推荐,于是切换到Linux,安装了Ubuntu 16.04。
数据储存选用MongoDB,记一下安装配置。
很多时候不必要找教程,官方指南能给予很好的指引。
安装
基于ubuntu 16.04 & MongoDB 3.4
在 MongoDB官方网站 文档页面找到 Install MongoDB Community Edition on Ubuntu,按照其安装方法进行安装(懒得翻译了...):
-
Import the public key used by the package management system.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
-
Create a list file for MongoDB.(16.04)
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
-
Reload local package database.
sudo apt-get update
-
Install the MongoDB packages.
sudo apt-get install -y mongodb-org
-
run and stop.
sudo service mongod start
sudo service mongod stop
-
Verify that MongoDB has started successfully
Verify that the mongod process has started successfully by checking the contents of the log file at **/var/log/mongodb/mongod.log ** for a line reading
[initandlisten] waiting for connections on port <port>
where <port> is the port configured in /etc/mongod.conf, 27017 by default.
配置
待补充 现在暂时使用默认端口27017 无账号密码
网友评论