畢業(yè)設(shè)計采用 Python 寫電影個性化推薦,于是切換到Linux,安裝了Ubuntu 16.04。
數(shù)據(jù)儲存選用MongoDB,記一下安裝配置。
很多時候不必要找教程,官方指南能給予很好的指引。
安裝
基于ubuntu 16.04 & MongoDB 3.4
在 MongoDB官方網(wǎng)站 文檔頁面找到 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 0C49F3730359A14518585931BC711F9BA15703C6Create 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.listReload local package database.
sudo apt-get updateInstall the MongoDB packages.
sudo apt-get install -y mongodb-orgrun and stop.
sudo service mongod start
sudo service mongod stopVerify 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.
配置
待補充 現(xiàn)在暫時使用默認端口27017 無賬號密碼