Deployment methodDeploy mongodb3.0.2 clusters on 3 centos6.6 systems in replica set mode.Official reference:http://docs.mongodb.org/manual/tutorial/deploy-replica-set/http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/IP address
InstallationFirst, the TAR package to install1. Baidu Network disk http://pan.baidu.com/s/1FOH2m2.https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.6.tgzSecond, the Yum source for installationConfigure the Package management system (yum).
The server uses mongoose to manipulate MongoDB, where the Date field in the schema is defined as follows:Date: {type:date, default:date.now},//operation dateINSERT INTO MongoDB adte: "Date": Isodate ("2015-08-15t03:26:36.086z"),8 hours difference
The date format for data records in MongoDB is"DateCreated":isodate ("2011-12-20t07:22:50.836z")After flipping through the MongoDB section of the PHP website, it's important to use the following key statements to manipulate the dates in
You can use time in Golang. The time data type to hold isodate times in MongoDB.GType Model struct {uploaddate time. Time ' Bson: ' uploaddate ' '}m: = model{}if Err: = C.find (nil). Select ({"_id": 0, "uploaddate": 1}). One (&m); Err! = Nil {fmt.
One installation 1.1 Download MongoDBI personally do not like to use the wget URL, before the wget download package has a problem caseHttps://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.7.tgz1.2 Upload server and unzipTAR-ZXVF mongodb-linux-x86
What to note: MongoDB replica set setupNote Date: 2018-01-09
21.33 MongoDB Replica Set Introduction
21.34 MongoDB Replica Set Build
21.35 MongoDB Replica set test
21.33 MongoDB Replica Set IntroductionA replica set (Replica set)
MongoDB Data Replication shard
I. MongoDB introduction:
MongoDB is a high-performance, open-source, and non-pattern document-based database. It is a popular NoSql database. It can be used in many scenarios to replace traditional relational databases
This is a creation in
Article, where the information may have evolved or changed.
You can use time in Golang. The time data type to hold isodate times in MongoDB.
G
Type listen to the model listen to the struct listen {Listen to hear uploaddate
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.