to start successfully:MongoDB starting:pid=232 port=27017 dbpath=e:/mongodb/data 64-bit host=xxx-pcTargetminos:windows 7/windows Server R2DB version v2.6.3, pdfile version 4.5Git version:0eb017e9b2828155a67c5612183337b89e12e291Waiting for connections on port 27017Modify Port:You can modify the database port by adding the parameter--port:E:/mongodb/bin>mongod.exe
enterprise-class reliability and operational flexibility.The installation of MongoDBMongoDB provides the installation package on the Linux platform, which can be downloaded from the official website. This experiment installs the latest version of MongoDB 4.0.0 on CentOS 7, the package used is: mongodb-linux-x86_64-rhel70-4.0.0.tgz1. Unpack the Packagetar xzvf
generated, but the system will crash.
1 NSString *hello = @”hello”;2 [hello shoot];3 Ship *helloShip = (Ship *)hello;4 [helloShip shoot];5 [(id)hello shoot];
Dynamic binding may cause serious errors (such as uncontrolled type conversion)
Thoughts on solving the dynamic binding problem: Introspection mechanism and Protocol
Introspection: The NSObject base class provides a series of methods such as isKindOfC
numbers: ↑ Last used command: Nohl highlighted words, not highlighting hints: x save exit, change file is similar to Wq; File Open is not operational, change mtime: 1,100s/dnsmasq/aminglinux/g from line 1th to line 100, s means start substitution, replace DNSMASQ with aminglinux,g to replace all1, $s/\/etc\/hosts\//aminglinux/g replace/etc/hosts/with Aminglinux, escape with \ or 1, $s #/etc/hosts/#aminglinux/g or @ symbol delimitedSet NU Display line number
5.7 Vim Practice#cp/etc/
Common MongoDB operations-set 3 and mongodb-Set
1. Update the document in the set. The syntax is as follows:
Db. collection. update (criteria, objNew, upsert, multi)
Parameter description:Criteria: the object used to set query ConditionsObjNew: the object used to set the update contentUpsert: if the record already exists, update it. Otherwise, a new record is add
numbers.
5. The default number type of the 64-bit floating point MongoDB console, for example, {"one": 2.02} {"one": 10}
6. String: {"one": "Hello World "}
7. the symbol is not supported in the MongoDB console and is automatically converted to a string;
8. the Object id is the unique 12-bit id in the document,
When MongoDB
Installing and uninstalling MongoDB 3.4 using the Yum source on CentOS 71. Configure the Yum sourceVim/etc/yum.repos.d/mongodb-org-3.4.repo[mongodb-org-3.4]Name=mongodb Repositorybaseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/Gpgcheck=1Enabled
, useradmin;3. Cluster Management role: Clusteradmin, Clustermanager, Clustermonitor, Hostmanager;4. Backup Restore role: backups, restore;5. All database roles: Readanydatabase, Readwriteanydatabase, Useradminanydatabase, dbadminanydatabase6. Super User role: Root7. Internal role: __system 6. Close the two Command prompt window and Create a text file that modifies the name: Install.bat; Text file content
, guess./mongod can start the server, but naturally we will first focus on such a few issues.1 The default listening port is how much, if set my own want to use the port number2 run log where to see3 where is the persisted data file4 whether there is a configuration file to support more details of the configuration
Start command
./mongod--port 27017--dbpath/mongodb/data--logpath/logs/mongodb.log-f/mongodb/s
]# rm-rf/usr/lib/mysql/[Email protected] lib]# Rm-rf/usr/share/mysqlThrough the steps above, MySQL should have been completely uninstalled "MongoDB" according to the official website tutorial: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/ First create a Mongodb-org-3.4.repo fileMove the file to/etc/yum.repos.d/Enter the file and edit the fi
The previous article toss the node.js, this time toss down Redis and MongoDB, so basically install a good nodejs of the whole development environment.
Redis
CentOS under the installation of Redis is also relatively simple, follow the steps step-by-step operation, basic will not be wrong.
1, switch to the /usr/src directory (if you are installed in another directory, note that some of the following path to be modified), download Redis, currently th
Java programming ideology version 4 * Chapter 7 * personal exercises and programming ideology version 4Welcome to group: 239063848Notice on entering the Group: This group is only used for technology sharing and communication, issue and answerNo chat, no advertisement, no recruitment ...... If You Are the OneExercise 1: (2) create a simple class. In the second class, a reference is defined as the object of t
Mongodb entry-7 query 2 array query $ all $ in $ all the elements of all Given Queries must be included in the array $ in. The following two codes can be viewed as long as the given query elements are included in the array.: [html] db. phone. find () {_ id: ObjectId (5198e20220c9b0dc40419385), num: [519, 3]} {_ id: ObjectId (
following roles for backing up and restoring dataBackup permissionsRestore Restoration PermissionsAll-database rolesThe admin data provides the following roles, which are valid for all databases.Readanydatabase provides read access to all databasesReadwriteanydatabase provides write access to all databasesUseradminanydatabase provides administrative rights to all database usersDbadminanydatabase dbadmin permissions on all databasesSuper characterRole descriptionRoot has the highest privilegesIn
From the Administrator's perspective, as an administrator, we often see four main aspects:
1. installation and deployment
2. Status Monitoring
3. Security Authentication
4. backup and recovery,
Next we will explain it.
I. installation and deployment
My previous articles are carried by the console program, but this is not the best practice in the production environment. No one wants to look for
only rows with prices below $1000 ./bin/mongoexport-d test-c goods-f goods_id,goods_name,shop_price-q ' {shop_price:{$lt: +} '-O Goods.json Note: _id columns are always exported Mongoimport Import -D database to import -c table to be imported (does not exist to be created by itself) --type Csv/json (default) --file backup File path Example 1: Importing JSON ./bin/mongoimport-d test-c goods--file./goodsall.json Example 2: Importing CSV ./bin/mongoimport-d test-c Goods--type csv-f goods_id,good
only browsing a document is OK. N: Direct position return. Millis: Look at this time really can't believe, seconds seconds to kill. By this example, I believe you have a sensory understanding of the index. Three: Unique index As with SQL Server, you can create a unique index, and duplicate key values cannot be inserted naturally, and the use in MongoDB is as follows: Db.person.ensureIndex ({"Name": 1},{"unique": true}). Four: Combined index Somet
Install Redis and MongoDB in CentOS 7
The previous article recorded Node. js. This time we talked about installing Redis and MongoDB in CentOS 7, so we basically installed the entire development environment of Node. js.Redis
Installing apsaradb for Redis in CentOS is also relatively simple. You can perform the operatio
:> Use blog switched to DB blogInsert a collection and document:> Db.post.insert ({"Geeting": 3}); Writeresult ({"ninserted": 1})To view the databases and collections created:> Show DBS admin (empty) blog 0.078GB local 0.078GB > show Collections Post system.indexesDeleting a database> Db.dropdatabase (); {"Dropped": "blog", "OK": 1} > Show DBS admin (empty) Local 0.078GBThis article is from the "Margin with Wish" blog, please be sure to keep this sour
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.