Establish ZFS highly reliable file storage system in sinox2014Hanao sinox2014 can be installed with a relatively small solid state drive, and the file system can be stored in ZFS.Prepare some hard disks, such as three SCSI hard disks: da0, da1, and da2.Start nowAdd the following line to your/etc/rc. conf file.# Echo 'zfs _ enable = "yes" '>/etc/rc. confUse raidz1 to create a zpool named Tank# Zpool create tank
Said earlier, Coreseek Sphinx mmseg MySQL and so on installation, below say how to use.One, the Coreseek Sphinx boot, will have one more port, and can login like MySQL, but not login MySQL
The code is as follows
Copy Code
[Root@localhost tank]# mysql-h 127.0.0.1-p 9306//is not really connected to MySQL, while the Sphinx index is connectedWelcome to the MySQL Monitor. Commands End With; Or\g.Your MySQL Connection ID is 1Serv
[[emailprotected] mongodb]# mongodump -h 192.168.1.108 -d tank -o /home/zhangy/mongodb/ connected to: 192.168.1.108 Tue Dec 3 06:11:41.618 DATABASE: tank to /home/zhangy/mongodb/tank Tue Dec 3 06:11:41.623 tank.system.indexes to /home/zhangy/mongodb/tank/system.indexes.bson Tue Dec 3 06:11:41.623 2 objects T
; select * from users;+------------+------------+| user_id | Username |+------------+------------+| 1311895262 | John || 1311895263 | Tank Zhang Yi || 1311895264 | Tank Zhang || 1311895265 | Tank Zhang |+------------+------------+4 rows in Set (0.00 sec)mysqlgt; desc orders;+--------------+-------------+------+-----+---------+----------------+| Field | Type | Nul
Label:One, Mongodump backup database 1, Common command grid
1
mongodump -h IP --port 端口 -u 用户名 -p 密码 -d 数据库 -o 文件存在路径
If there is no user who can remove-u and-P. If you export the native database, you can remove-H. If it is the default port, you can remove--port. If you want to export all databases, you can remove-D. 2. Export all databases
1 2 3 4 5 6 7 8 9 10
[[emailprotected] mongodb]# mongodump -h 127.0.0.1 -o /home/zhangy/mongodb/ con
One, Mongodump backup database
1, Common command grid
Mongodump-h IP--port Port-u user name-p password-d database-o file existence path
If there are no users who can remove-u and-P.If you export the database for this computer, you can remove-H.If it is the default port, you can remove the--port.If you want to export all databases, you can remove-D.
2, export all databases
[Root@localhost mongodb]# mongodump-h 127.0.0.1-o/home/zhangy/mongodb/
connected to:127.0.0.1
Tue
15-status Mode
There are more than one kind of sub-categories in Starcraft. For example, a tank can be mounted, a gun can play doping, or even some passive ones. For example, after being sprayed with green liquid by the Queen of worms, the enemy's actions are slowing down.If we operate a soldier every time, like a tank, we need to use if to judge his status.CodeThere will be a lot of IF, else or swith.How
As mentioned above, the installation of coreseeksphinxmmsegmysql and so on will explain how to use it. One, coreseeksphinx start, there will be an extra port, and can log on like mysql, but not login mysql [root @ localhosttank] # mysql-h127.0.0.1-P9306 is not really connected to mysql, but connected to sphinxin
As mentioned above, the installation of coreseek sphsf-mmseg mysql and so on will explain how to use it. 1. After coreseek sphek is started, an additional port is added and can be logged
, declares the method of producing automobiles.Car: Car realization class.Trunk: Truck implementation class.Iengine: Engine product interface, declares the method of producing the engine.Carengine: Car engine implementation class.Trunkengine: Truck engine implementation class.Itank: Fuel tank Product Interface, declare the method of producing tank.Cartank: Car fuel tank products.Trunktank: Truck fuel
is specific ),ExpThe corresponding type. The same rule applies to concept * or concept .
Concept conversion. It is similar to performing conversions on the inheritance structure of classes. Refined concept can be implicitly converted to base concept. In turn, it must be performed explicitly and executed using the concept_cast operator. The concept must also be converted using concept_cast.
Concept-based overload can also be executed at runtime to implement generalized dynamic-dispatch operati
> Db.adduser (' Tank ', ' test '); Add an administrator account
{
"user": "Tank",
"readOnly": false,
"pwd": "988432606980d0695e4f668f6bbc643a",
"_id": ObjectId ("529e5d543b6a4608ac833429")
}
Third, open the user authority to start authentication
[Root@localhost zhangy]# vim/etc/mongodb.conf //Remove the comments in front of Auth=true
[root@localhost zhangy]#/etc/init.d/ Mongod
The three php functions used to parse the url are used to pass values through the url, which is an important means of passing values in php. Therefore, we often need to parse the parameters in the url. if we know the url passing parameter name, such as/index. php? Name = tank amp; sex = 1 # top we can use $ _ GET ['name'], $ _ GET ['sex'] to obtain the three php functions to parse the url
Passing values through URLs is an important means of passing
// Add the prefix number-d, -- repeated, indicating the number of occurrences of the corresponding row in front of each row. // only duplicate rows-D are output, -- all-repeated // only outputs duplicate rows, but several rows output the number of-f, -- skip-fields = N //-f ignored segments, -f 1 ignores the first section-I, -- ignore-case // case insensitive-s, -- skip-chars = N // The root-f is a bit like, however,-s is ignored. When-s 5 is followed, the next five characters www.2cto.com-u, -
(Host), the pool has a lot of water (4GB of physical memory), there are 2 tanks (configured 2 VMS), the water tank has a certain capacity (configuration memory is 4GB), originally was empty (no boot).But now the tank 1 to raise fish, must put some water in so that the fish can survive (boot up). Minimum 1GB of memory is required. So the Tank 1 (VM1) to the pool
To:tank
> Use admin//Switch to admin database
Switched to DB admin
> Show Collections;
System.indexes
System.users//user table
> Db.system.users.find (); User table has no data
> Db.adduser (' Tank ', ' test '); Add an Administrator account
{
"User": "TestUser",
"ReadOnly": false,
"pwd": "988432606980d0695e4f668f6bbc643a",
"_id": ObjectId ("529e5d543b6a4608ac833429")
}
Third, open the user authority to start authenticat
// display the version information and exit it -z doesn't know how to use it.
3, test the text file uniqtestthis is a test this is a test I am tank I love tank this is a test whom have a try WhoM have a try you have a try I want to abroad those are good men we are good men
IV, instance details [zhangy @ BlackGhost mytest] $ uniq-c uniqtest 3 this is a test 1 I am tank
restoration of all databases
1. All Database backups
Copy codeThe Code is as follows:# Innobackupex -- defaults-file =/etc/my. cnf -- user = root/home/tank/backup/
If the following error is reported:
Copy codeThe Code is as follows:InnoDB: Error: log file./ib_logfile0 is of different size 5242880 bytesInnoDB: than specified in the. cnf file 50331648 bytes!Innobackupex: Error: The xtrabackup child process has died at/usr/bin/innobackupex line 2679.
So
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.