1.安装

  1. yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh ffcd86

2.Nginx默认配置

  1. user www www;
  2. worker_processes auto;
  3. error_log /www/wwwlogs/nginx_error.log crit;
  4. pid /www/server/nginx/logs/nginx.pid;
  5. worker_rlimit_nofile 51200;
  6. events
  7. {
  8. use epoll;
  9. worker_connections 51200;
  10. multi_accept on;
  11. }
  12. http
  13. {
  14. include mime.types;
  15. #include luawaf.conf;
  16. include proxy.conf;
  17. default_type application/octet-stream;
  18. server_names_hash_bucket_size 512;
  19. client_header_buffer_size 32k;
  20. large_client_header_buffers 4 32k;
  21. client_max_body_size 50m;
  22. sendfile on;
  23. tcp_nopush on;
  24. keepalive_timeout 60;
  25. tcp_nodelay on;
  26. fastcgi_connect_timeout 300;
  27. fastcgi_send_timeout 300;
  28. fastcgi_read_timeout 300;
  29. fastcgi_buffer_size 64k;
  30. fastcgi_buffers 4 64k;
  31. fastcgi_busy_buffers_size 128k;
  32. fastcgi_temp_file_write_size 256k;
  33. fastcgi_intercept_errors on;
  34. gzip on;
  35. gzip_min_length 1k;
  36. gzip_buffers 4 16k;
  37. gzip_http_version 1.1;
  38. gzip_comp_level 2;
  39. gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
  40. gzip_vary on;
  41. gzip_proxied expired no-cache no-store private auth;
  42. gzip_disable "MSIE [1-6]\.";
  43. limit_conn_zone $binary_remote_addr zone=perip:10m;
  44. limit_conn_zone $server_name zone=perserver:10m;
  45. server_tokens off;
  46. access_log off;
  47. server
  48. {
  49. listen 888;
  50. server_name phpmyadmin;
  51. index index.html index.htm index.php;
  52. root /www/server/phpmyadmin;
  53. #error_page 404 /404.html;
  54. include enable-php.conf;
  55. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  56. {
  57. expires 30d;
  58. }
  59. location ~ .*\.(js|css)?$
  60. {
  61. expires 12h;
  62. }
  63. location ~ /\.
  64. {
  65. deny all;
  66. }
  67. access_log /www/wwwlogs/access.log;
  68. }
  69. include /www/server/panel/vhost/nginx/*.conf;
  70. }

3.MySQL默认配置

  1. [client]
  2. #password = your_password
  3. port = 3306
  4. socket = /tmp/mysql.sock
  5. [mysqld]
  6. port = 3306
  7. socket = /tmp/mysql.sock
  8. datadir = /www/server/data
  9. default_storage_engine = InnoDB
  10. performance_schema_max_table_instances = 400
  11. table_definition_cache = 400
  12. skip-external-locking
  13. key_buffer_size = 32M
  14. max_allowed_packet = 100G
  15. table_open_cache = 128
  16. sort_buffer_size = 768K
  17. net_buffer_length = 4K
  18. read_buffer_size = 768K
  19. read_rnd_buffer_size = 256K
  20. myisam_sort_buffer_size = 8M
  21. thread_cache_size = 16
  22. query_cache_size = 16M
  23. tmp_table_size = 32M
  24. sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
  25. explicit_defaults_for_timestamp = true
  26. #skip-name-resolve
  27. max_connections = 500
  28. max_connect_errors = 100
  29. open_files_limit = 65535
  30. log-bin=mysql-bin
  31. binlog_format=mixed
  32. server-id = 1
  33. expire_logs_days = 10
  34. slow_query_log=1
  35. slow-query-log-file=/www/server/data/mysql-slow.log
  36. long_query_time=3
  37. #log_queries_not_using_indexes=on
  38. early-plugin-load = ""
  39. innodb_data_home_dir = /www/server/data
  40. innodb_data_file_path = ibdata1:10M:autoextend
  41. innodb_log_group_home_dir = /www/server/data
  42. innodb_buffer_pool_size = 128M
  43. innodb_log_file_size = 64M
  44. innodb_log_buffer_size = 16M
  45. innodb_flush_log_at_trx_commit = 1
  46. innodb_lock_wait_timeout = 50
  47. innodb_max_dirty_pages_pct = 90
  48. innodb_read_io_threads = 1
  49. innodb_write_io_threads = 1
  50. [mysqldump]
  51. quick
  52. max_allowed_packet = 500M
  53. [mysql]
  54. no-auto-rehash
  55. [myisamchk]
  56. key_buffer_size = 32M
  57. sort_buffer_size = 768K
  58. read_buffer = 2M
  59. write_buffer = 2M
  60. [mysqlhotcopy]
  61. interactive-timeout