1, the extended deployment of remote distributed database connection
- Mysql server connected to modify the system configuration related to grant permission to the remote connection and all subsequent user corresponding
- operating
use mysql;
select host,user,password from user;
grant all privileges on *.* to root@'%' identified by "password";
flush privileges;
select host,user,password from user;
- verification
2, application re-deployment of the cloud
- Re-upload the application of the jar package
- Application.properties modified arrangement, the corresponding connecting distributed database configuration file url added
- Finally start, access authentication
3, nginx reverse proxy load balancer cloud deployment
- Direct installation package on a combination openresty
- A condition precedent, to be installed in linux pcre, openssl, gcc, curl, etc.
yum install pcre-devel openssl-devel gcc curl
- Download openresty download page http://openresty.org/cn/download.html
- After the tar -xvzf openresty **. Tar.gz decompression after entering the download
- ./configure
- make
- make install
- The installation is complete, nginx is installed by default under // usr / local / openresty / nginx directory
- Modify the local path and host Ali cloud server to facilitate universal access
Ali cloud server ip -> miaoshaserver
4, nginx static resource deployment
- Nginx into the html in the root directory, and create a new store front-end resources directory for static resources
- Static resource files in the set point location in the resources directory can access the corresponding html
5, nginx reverse proxy requests dynamic
reverse proxy configuration, a backend server configuration, may be used to point to different backend server cluster configured to LAN IP content server cluster, and the weight of the weight values in rotation, and a configuration LOCATION, when hit any location access rules when a rule you can enter the reverse proxy rules
upstream backend_server{
server miaoshaserverbk1 weight=1;
server miaoshaserverbk2 weight=1;
}
location / {
proxy_pass http://backend_server;
proxy_set_header Host $http_host;
}
6, acc tomcat dynamic service log
verification log switch switch acc
#日志开关
server.tomcat.accesslog.enabled=true
#日志格式
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D
server.tomcat.accesslog.directory=/var/www/miaosha/tomcat
7, redis server installation
- Official website to download the corresponding source code package redis
- Into the src directory make make install to install the complete corresponding function redis
- Compiled by the src directory ./redis-server start the cache server