Create a database
in the process of creating a database encountered a problem, the original library should be created with the UTF8 character set, the system default character set is latin1 format, so even if you create a library with phpMyAdmin there is still a problem. The workaround refers to a post on the network:
Http://www.ha97.com/5359.html
Login MySQL view with show VARIABLES like ' character% '; The following character set is displayed as follows:
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client |
utf8
|
| character_set_connection | UTF8 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir |/usr/share/mysql/charsets/|
+--------------------------+----------------------------+
the default character set for character_set_database and character_set_server is still latin1.
1, in[Client]field to addDefault-character-set=utf8, as follows:
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set=utf8
2, in[Mysqld]field to addCharacter-set-server=utf8, as follows:
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
character-set-server=utf8
3, in[MySQL]field to addDefault-character-set=utf8, as follows:
[mysql]
no-auto-rehash
default-character-set=utf8
after the modification is complete,Service MySQL Restart RestartMysqlThe service will take effect. Note:[Mysqld]Fields and[MySQL]The fields are different. This is no one on the internet feedback.
Useshowvariables like ' character% ';view, found that the database encoding has been changed toUTF8.
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
4, if the above are modified also garbled, then the remaining problem must be on the connection connection layer. The workaround is to execute the following sentence before sending the query (write directly to the front of the SQL file):
SET NAMES ' utf8′;
set character_set_client = UTF8;
set character_set_results = UTF8;
set character_set_connection = UTF8;
Data Import
this solves the problem of building the library character set, the other side is to write a good sql file, the import SQL file syntax is executed in MySQL source/path/*.sql file to perform the operation.
DeploymentTomcat
The way to deploy Tomcat is basically the same as the conventional one, and the difference is that because of the certificate used, the protocol accessed is not accessed via http but via https .
after you 've installed tomcat.
Cd/usr/local/apache-tomcat-8.0.22/conf
Vim Server.xml
Find the following code
<!--Define a SSL/TLS http/1.1connector on port 8443
This connector uses the NIO implementation that requires the JSSE
Style configuration. When using the apr/native implementation, the
OpenSSL style configuration is required as described in the apr/native
Documentation--
<!--
<connector port= "8443" protocol= "Org.apache.coyote.http11.Http11NioProtocol"
Maxthreads= "sslenabled=" true "scheme=" "https" secure= "true"
Clientauth= "false" sslprotocol= "TLS"/>
Add the following code after this section of the code
<connector port= "8443" protocol= "http/1.1" sslenabled= "true" maxthreads= "" scheme= "https" secure= "true"
Clientauth= "true" sslprotocol= "TLS"
Keystorefile= "./oca1web.jks" keystorepass= "111111"
Truststorefile= "./trust.jks" truststorepass= "Abcd1234"/>
Description: Here oca1web.jks,trust.jks file should be CFCA over there to make files, passwords are also they set, here is the configuration of two-way SSL.
then the war package is put under WebApp,raconfig put under Bin ,raconfig in the sys.ini file has MySQL corresponds to the user name and password of the library, the user name password modified, start Tomcat.
Test Effect
service up, the other side will send me an administrator's certificate, install this certificate, I can log on to the system to be issued. However, in the course of testing, access to https://IP:8443/RA/index.jsp
Always display network errors (you need to enter a pin before logging in , this person 's pin should be consistent with the Server.xml configuration in Tomcat ). After the other engineer to check the discovery is my IE browser problem, the other side gave a tool, through the tool import Administrator certificate, will be able to access the system, after testing certification success.
Deploy Cfca_ra Local test environment