苏童 发表于 2017-12-16 18:16:31

Ubuntu14.04下Mongodb(在线安装方式

root@zhouls-virtual-machine:~# sudo apt-getinstall mongodb  
Reading package lists... Done
  
Building dependency tree      
  
Reading state information... Done
  
mongodb
is already the newest version.  

0 upgraded, 0 newly installed, 0 to remove and 338 not upgraded.  
root@zhouls
-virtual-machine:~# mongo -version  
MongoDB shell version:
2.4.9  
root@zhouls
-virtual-machine:~# sudo apt-get --purge remove mongodb mongodb-clients mongodb-server  
Reading package lists... Done
  
Building dependency tree      
  
Reading state information... Done
  
The following packages were automatically installed and are no longer required:
  
libboost
-dev libboost-filesystem1.54.0 libboost-program-options1.54.0  
libboost
-thread1.54.0 libboost1.54-dev libgoogle-perftools4 libpcrecpp0  
libsnappy1 libstdc
++-4.8-dev libtcmalloc-minimal4 libunwind8 libv8-3.14.5  
mongodb
-dev  
Use
'apt-get autoremove' to remove them.  
The following packages will be REMOVED:
  
mongodb
* mongodb-clients* mongodb-server*  
0 upgraded, 0 newly installed, 3 to remove and 338 not upgraded.
  
After this operation, 107 MB disk space will be freed.
  
Do you want to continue? y
  
(Reading database ... 180474 files and directories currently installed.)
  
Removing mongodb (1:2.4.9-1ubuntu2) ...
  
Removing mongodb-server (1:2.4.9-1ubuntu2) ...
  
arg: remove
  
mongodb stop/waiting
  
Purging configuration files for mongodb-server (1:2.4.9-1ubuntu2) ...
  
dpkg: warning: while removing mongodb-server, directory '/var/log/mongodb' not empty so not removed
  
dpkg: warning: while removing mongodb-server, directory '/var/lib/mongodb' not empty so not removed
  
Removing mongodb-clients (1:2.4.9-1ubuntu2) ...
  
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
  
root@zhouls-virtual-machine:~# clear
  

  
root@zhouls-virtual-machine:~# sudo apt-get install mongodb
  
Reading package lists... Done
  
Building dependency tree      
  
Reading state information... Done
  
The following extra packages will be installed:
  
mongodb-clients mongodb-server
  
The following NEW packages will be installed:
  
mongodb mongodb-clients mongodb-server
  
0 upgraded, 3 newly installed, 0 to remove and 338 not upgraded.
  
Need to get 0 B/12.9 MB of archives.
  
After this operation, 107 MB of additional disk space will be used.
  
Do you want to continue? y
  
Selecting previously unselected package mongodb-clients.
  
(Reading database ... 180427 files and directories currently installed.)
  
Preparing to unpack .../mongodb-clients_1%3a2.4.9-1ubuntu2_amd64.deb ...
  
Unpacking mongodb-clients (1:2.4.9-1ubuntu2) ...
  
Selecting previously unselected package mongodb-server.
  
Preparing to unpack .../mongodb-server_1%3a2.4.9-1ubuntu2_amd64.deb ...
  
Unpacking mongodb-server (1:2.4.9-1ubuntu2) ...
  
Selecting previously unselected package mongodb.
  
Preparing to unpack .../mongodb_1%3a2.4.9-1ubuntu2_amd64.deb ...
  
Unpacking mongodb (1:2.4.9-1ubuntu2) ...
  
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
  
Processing triggers for ureadahead (0.100.0-16) ...
  
ureadahead will be reprofiled on next reboot
  
Setting up mongodb-clients (1:2.4.9-1ubuntu2) ...
  
Setting up mongodb-server (1:2.4.9-1ubuntu2) ...
  
mongodb start/running, process 3594
  
Processing triggers for ureadahead (0.100.0-16) ...
  
Setting up mongodb (1:2.4.9-1ubuntu2) ...
  
root@zhouls-virtual-machine:~#
页: [1]
查看完整版本: Ubuntu14.04下Mongodb(在线安装方式