Now you can start MySQL 5.6 using the following command:
chkconfig mysqld on service mysqld start
Verify that MySQL 5.6 is running:
mysql -v
And you should see output similar to the following:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.27 MySQL Community Server (GPL)
That’s all she wrote!
Upgrading from MySQL 5.5 is a fairly easy process, and I’ll be writing a guide on that soon. However, upgrading from earlier versions of MySQL (such as MySQL 5.1) requires a bit more work. I’ll see writing on article on How to Upgrade MySQL 5.1 to MySQL 5.6 on CentOS 6.7 so stay tuned!
將產生出來的add_db_server複製貼上至db-config.php
貼到
//————————————————————————//
//—DB Servers———————————————————–//
//————————————————————————//
// Database servers grouped by dataset.
// R can be 0 (no reads) or a positive integer indicating the order
// in which to attempt communication (all locals, then all remotes)
//
// Usage: add_db_server(DS, DC, READ, WRITE, HOST, LAN_HOST, NAME, USER, PASS)
// EX: add_db_server(‘global’, ‘dc1′, 1, 1,’global.mysql.example.com:3509′,’global.mysql.example.lan:3509’, ‘global-db’, ‘globaluser’, ‘globalpassword’);
//
// Note: you can also place this section in a file called db-list.php in wp-content
// EX: add_db_server(‘global’, ‘dc1′, 1, 1,’global.mysql.example.com:3509′,’global.mysql.example.lan:3509’, ‘global-db’, ‘globaluser’, ‘globalpassword’);
這排下面
//————————————————————————//
//—Global Tables——————————————————–//
//————————————————————————//
// Do not include default global tables
// Leave off base prefix (eg: wp_)
// You don’t really have to register these, they will work fine without.
// However registering at least your busiest ones might shave a few milliseconds off by avoiding some regexes.
//
// Usage: add_global_table(TABLE_NAME)
// EX: add_global_table(‘something’);
add_global_table(‘wpmudb_global’); #設定主要網站的資料庫名稱
///DB Settings
$dbname = “原本WP的資料庫名稱”; //This is your current database
$blog_table_prefix = ‘wp_’; //Prefix of your wpmu blog tables, most likely this won’t need to be changed
$newdb_prefix = ‘新的資料庫名稱_’; //本範例應填上 wpmudb
//We need info to connect to the databases
$dbhost = ‘localhost’;
$dbuname = ‘資料庫帳號’;
$dbpass = ‘資料庫密碼’;
//How many db’s are you moving into (16, 256, or 4096)?
$db_scaling = ‘256’; #我建立256個
There are using WordPress MultiSite (WP multi-user site) owners are aware that their library is a pain!
Because when he stuffed all the user table in the same database which will cause management, light, etc. phpmyadmin all the information listed in the table, the computer crashed!
I, for one, have got probably more than a thousand users, but add up table yet there are more than thirteen thousand eight hundred! Find files on disk alone consume a lot of time, let alone efficient.
The figure 13858 is not used before the multi-db table all crowded together, after a multi-db systematic planning, you can see the list below him split into 256 databases in different categories each table move past.
multi-db allows us to establish 16/256/4096 a database, the user profile will be established when the hash included in the corresponding database, thus achieving the level of the number of users jumped.
For example, originally we are tens of thousands crowded table, thousands of users in a database, but after a multi-db its carrying capacity, theoretically gained × 16, × 256, × 4096 magnification.
Of course, we know that in fact this is not a simple multiplier effect, because the short-board system will appear at different times in different areas, such as the number of files blogs.dir theoretical limit, such as single hosts do load balancing load capacity stand-alone ceiling
For example, the static file requests generated resource consumption and so on.
However, by multi-db, we can easily span a massive database table!
In addition, for users with special needs, from the library to be built in consideration of the stability of individual repository for them separately. Because different materials can exist in different data library, all this can be set.
But the current multi-db is not free, you must purchase to https://premium.wpmudev.org/project/multi-db/.
The following are the installation experience.
1. WP without using ordinary plug mounted, he was taken to run after the file is uploaded.
2. First you have to establish a repository, for example I use this cut 256 database, so the first built 256 database through phpmyadmin, which establish rules
CREATE DATABASE `library name _00` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
until
CREATE DATABASE `library name _ff` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Probably it would look like this
CREATE DATABASE `wpmudb_ff` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Because it is hexadecimal, so 00 (2003) ~ ff 256, can write a php loop quickly generate instruction
for ($ i = 0; $ i <= 255; $ i ++) {
echo “CREATE DATABASE` library name _ “dechex ($ i)” `DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci..;
“;
}
Plus major blog repository
CREATE DATABASE `library name _global` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
※ Note that the above grammar 0 ~ e only one, in front of their own make up 0
3. After the establishment of a good database, start to modify the file, the first generation of database administrative privileges, the same generation 256
add_db_server ( ‘No’, ‘dc1’, 1, 1, ”, ‘site IP’, ‘Database name _ Number’, ‘database account’, ‘Database Password’);
Probably it would look like this
add_db_server (’00 ‘,’ dc1 ‘, 1, 1,’ ‘,’ 111.111.111.111 ‘,’ wpmudb_00 ‘,’ admin ‘,’ 123456 ‘);
Do not forget to help the main blog database also add password
add_db_server ( ‘global’, ‘dc1’, 1, 1, ”, ‘111.111.111.111’, ‘wpmudb_global’, ‘admin’, ‘123456’);
Will have to copy and paste out of add_db_server db-config.php
Paste
// ———————————————— ———————— //
// — DB Servers ——————————————- // —————-
// ———————————————— ———————— //
// Database servers grouped by dataset.
// R can be 0 (no reads) or a positive integer indicating the order
// In which to attempt communication (all locals, then all remotes)
//
// Usage: add_db_server (DS, DC, READ, WRITE, HOST, LAN_HOST, NAME, USER, PASS)
// EX: add_db_server ( ‘global’, ‘dc1’, 1, 1, ‘global.mysql.example.com: 3509’, ‘global.mysql.example.lan: 3509’, ‘global-db’, ‘globaluser ‘,’ globalpassword ‘);
//
// Note: you can also place this section in a file called db-list.php in wp-content
// EX: add_db_server ( ‘global’, ‘dc1’, 1, 1, ‘global.mysql.example.com: 3509’, ‘global.mysql.example.lan: 3509’, ‘global-db’, ‘globaluser ‘,’ globalpassword ‘);
This row below
————-
4. Other modifications breakdown
// — DB Scaling ——————————————- // —————-
// ———————————————— ———————— //
// 16,256,4096
define ( ‘DB_SCALING’, ‘256’); # 256 because I used it to fill 256
// ———————————————— ———————— //
// — Global Tables ——————————————- ————- //
// ———————————————— ———————— //
// Do not include default global tables
// Leave off base prefix (eg: wp_)
// You do not really have to register these, they will work fine without.
// However registering at least your busiest ones might shave a few milliseconds off by avoiding some regexes.
//
// Usage: add_global_table (TABLE_NAME)
// EX: add_global_table ( ‘something’);
add_global_table ( ‘wpmudb_global’); # set the main site database name
/// DB Settings
$ Dbname = “original WP repository name”; // This is your current database
$ Blog_table_prefix = ‘wp_’; // Prefix of your wpmu blog tables, most likely this will not need to be changed
$ Newdb_prefix = ‘_ new database name’; // This example should fill wpmudb
// We need info to connect to the databases
$ Dbhost = ‘localhost’;
$ Dbuname = ‘database account’;
$ Dbpass = ‘Database Password’;
// How many db’s are you moving into (16, 256, or 4096)?
$ Db_scaling = ‘256’; # I created 256
To change over to the side !!
Begin uploading,
The db.php, db-config.php uploaded to / wp-content / inside
The move-blogs.php, fix-db-encoding.php uploaded to / wp-content / script / folder inside the script to build their own
Executive http: // URL /wp-content/script/move-blogs.php will see the following figure, because I have done so on the right is a graph showing the conversion table in new db
If set up properly, the front of the library also established correctly, this page will not be any ERROR, if ERROR, then did as he had gone to ERROR.
Followed by the top 5.To start the copy process click here he’ll start running! I was more than thirteen thousand eight hundred take about 10 minutes before the end.
6. Finally
To complete the operation, after the system will be in multi-mode operation of the database, even if the increase in new users will automatically categorize not need to do other settings! Very simple and convenient.
所以步驟如下
1.更新Openssl至0.9.8j以後或最新
2.啟用SSL虛擬網站,在httpd-ssl.conf 設定NameVirtualHost
3.在httpd-ssl.conf SSLStrictSNIVHostCheck off ←這段要自己加
基本上這樣就完工前置作業了,剩下比照一般SSL網站新增即可!
慢著… 有這麼簡單的話,我還需要一周的血和淚測試嗎?當然沒有,因為你八成會遇到下列一個問題!
Q3.yum update openssl 只到0.9.8e 如何手動更新到最新?
Q4.就算openssl更新到最新了,apache也設定完了,重新啟動apache時出現「OpenSSL is not built with support for TLS extensions」 一樣GG?
This week in exchange for the blood and tears of experience to share ..
Working Background: CentOS, Apache2 (built-in self and are tested)
OpenSSL is not built with support for TLS extensions
Common Apache + mod_ssl + openssl to complete the job site SSL encryption.
But if there is a host on a virtual host, when you install the second SSL certificate, you will find what is wrong means, the host does not recognize the second or subsequent certificate!
This is because the OpenSSL default authentication method is IP-BASE, a IP on a certificate.
Want to solve this way has updated OpenSSL to 0.9.8J later, there is support SNI mode (Server Name Indication) vernacular is to use the URL to identify the certificate.
Introduction
According to the classical early SSLv2 Public Key Infrastructure PKI (Public Key Infrastructure) design, it defaults to that: a server (or an IP) will only provide a service, so the SSL handshake, the server can be sure that the client application which certificates.
But people never imagined that web hosting vigorously developed, which resulted in a situation corresponding to a plurality of IP will domain names. Some solutions, such as pan-domain certificate application, all * .yourdomain.com domain can be authenticated, but if you have a yourdomain.net domain, it is not.
In the HTTP protocol, the request of the domain name as the host header (Host) on the HTTP Header, so the server knows which domain should be directed to the request, but early SSL can not do this, because the SSL handshake process, Host will not have the information, so the server-side configuration is usually returned in the first available certificate. Thus some older environment, may produce multi-domain certificates are a good job, but the return is always the same.
Since the cause of the problem is the lack of host header information when SSL handshake, then fill it wants.
SNI (Server Name Indication, meaning “Server Name Indication”) is defined in RFC 4366, is an improvement for SSL / TLS technology is enabled in SSLv3 / TLSv1 in. It allows a client to initiate SSL handshake request (specifically, the client sends SSL requests ClientHello stage), Host submitted the requested information so that the server can switch to the correct field and returns the corresponding certificates.
To use the SNI, requires the client and the server at the same time to meet the conditions, but fortunately for modern browsers, most support SSLv3 / TLSv1, so you can enjoy the convenience brought by SNI.
Emphasis
Simple introductions, here I speak directly to the vernacular.
Q1. How to make Apache for HTTPS encryption work?
A1: openssl installed and enabled mod_ssl (teaching a bunch on the web)
Q2. There are many virtual hosts sites, each would like to have an SSL certificate, but how loaded fail, Why?
A2. Because you have not enabled the openssl SNI host function
Well, see here is to know, only Bahrain openssl and mod_ssl is not enough, but also to enable SNI functions can allow the host to support multiple SSL!
General CentOS5.X probably built openssl version 0.9.8e, but unfortunately, at least to have a later version to 0.9.8J SNI.
Therefore, the following steps
1. Update Openssl to 0.9.8j or later date
2. Enable SSL virtual website, httpd-ssl.conf set NameVirtualHost
3. httpd-ssl.conf SSLStrictSNIVHostCheck off ← This add it myself
This basically completed the pre-work, and the rest can be added cf. general SSL site!
Wait … there are so simple, I still need a week to test blood and tears? Of course not, because you’ll probably experience one problem!
Q3.yum update openssl 0.9.8e only how to update to the latest manual?
Q4. Even if the latest update to the openssl, apache also set finished, there ‘OpenSSL is not built with support for TLS extensions “as GG when you restart apache?
These two issues are relatively relations, openssl is not updated to the latest case, the set will be complete apache Q4 problems, even if the latest update to the problems still arise Q4, says opensll update untrue.
If the self-made Apache please recompile Apache again after the update finished OPENSSL
Manually update the OpenSSL teaching (here is the essence of a week in exchange for experience, here you see the article really earn, no solution on the web)
0. The first use yum install built-openssl
1. go openssl official website to download the latest zip file and unzip into the directory
2. Run “./config -prefix = / usr -openssldir = / usr / local / openssl enable-tlsext shared” Please execute verbatim contain symbols
3. then make install
4. Complete the installation view opensll version openssl version should then appear on the latest version of the version number!
Well, if you are using the built-in apache, to the side has been completed, the computer should be re-opened after it OK, but if you are self-compiled apache, then compile apache needed additional parameters, refer to the following
“-enable-Ssl -with-ssl = / usr / local / openssl”
Then recompile PHP should let him support openssl, compiled the following parameters “-with-openssl”
To be considered formally completed here!
Finally, remember to turn on the firewall 443 ah !!
Blue part is I tried out a week after the trial experience, very precious ………
To commemorate the week of brain cells I decided to write this article