In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, I took some time to install the Mongodb database under Ubuntu 13.10. Now I write down the installation operation method and the automatic startup method:
1. apt-get update Update Library 2. apt-get install mongodb
3. After installation, you need to modify the relevant configuration file to modify the data storage path
vi /etc/mongodb.conf dbpath=/www/mongodbvi /etc/init.d/mongodb DATA=/www/mongodbmkdir /www/mongodb/ chown -R mongodb:nogroup /www/mongodb/
4. Start Mongodb
/etc/init.d/mongodb start,
It is started by default when it is installed at the beginning. This step is not required.
5. Confirm if startup is successful
netstat -antup cat /var/log/mongodb/mongodb.log
6. Testing the mongo client
mongo db.foo.save({a:1}) db.foo.findOne()
7. Operation Mongodb service background automatic start
Enter the following command under/usr/bin/
./ mongod --dbpath /var/lib/mongodb/ --logpath /var/log/mongodb/mongodb.log --logappend &
background running program
At this point, the Mongodb database is installed.
Additional information:
How to open Mongodb extensions in PHP?
1. Install php mongo
sudo pecl install mongo
2. enablement module
vi /etc/php5/cli/conf.d/mongodb.ini
extension=mongo.so
3. Confirm successful installation
php -m
4. restart Apache
Done!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.