软件安装

2017-08-12

ubuntu16.04安装mongodb3.4

参考

  1. Import the public key used by the package management system.
      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
    
  2. Create a list file for MongoDB.
      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
    

    上面是官方的镜像源,国内下载特别慢,故换成阿里源:

      echo "deb [ arch=amd64,arm64 ] http://mirrors.aliyun.com/mongodb/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
    
  3. Reload local package database.
      sudo apt-get update
    
  4. Install the latest stable version of MongoDB.
      sudo apt-get install -y mongodb-org
    

    Run MongoDB Community Edition

    The MongoDB instance stores its data files in /var/lib/mongodb and its log files in /var/log/mongodb by default, and runs using the mongodb user account. You can specify alternate log and data file directories in /etc/mongod.conf.

  5. Start MongoDB.
      sudo service mongod start
    
  6. erify that MongoDB has started successfully.
    查看mongodb的日志文件,最后一行会输出:
      [initandlisten] waiting for connections on port <port>
    
  7. Stop MongoDB.
      sudo service mongod stop
    
  8. Restart MongoDB.
      sudo service mongod restart
    

    Uninstall MongoDB Community Edition

  9. Stop MongoDB.
  10. Remove packages:
      sudo apt-get purge mongodb-org*
    
  11. Remove MongoDB databases and log files.

Install cuda without root

Deselect driver installation (pressing ENTERon it)
Change options -> root install path to a non-sudo directory.
Press A on the line marked with a + to access advanced options. Deselect create symbolic link, and change the toolkit install path.
Now installation should work without root permissions

安装opencv

pip install opencv-contrib-python==3.4.1.15 (版本号自定)