{"id":53909,"date":"2024-10-09T15:17:16","date_gmt":"2024-10-09T07:17:16","guid":{"rendered":"https:\/\/server.hk\/cnblog\/53909\/"},"modified":"2024-10-09T15:17:16","modified_gmt":"2024-10-09T07:17:16","slug":"win2008-r2-%e4%bc%ba%e6%9c%8d%e5%99%a8-phpmysqlsql-server-2008-%e9%81%8b%e8%a1%8c%e7%92%b0%e5%a2%83%e9%85%8d%e7%bd%ae%ef%bc%88%e5%be%9e%e5%ae%89%e8%a3%9d%e3%80%81%e5%84%aa%e5%8c%96%e3%80%81%e5%ae%89","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/53909\/","title":{"rendered":"Win2008 R2 \u4f3a\u670d\u5668 PHP+MySQL+SQL Server 2008 \u904b\u884c\u74b0\u5883\u914d\u7f6e\uff08\u5f9e\u5b89\u88dd\u3001\u512a\u5316\u3001\u5b89\u5168\u7b49\uff09"},"content":{"rendered":"<h1 id=\"win2008-r2-%e4%bc%ba%e6%9c%8d%e5%99%a8-phpmysqlsql-server-2008-%e9%81%8b%e8%a1%8c%e7%92%b0%e5%a2%83%e9%85%8d%e7%bd%ae-JOtfBCpBDn\">Win2008 R2 \u4f3a\u670d\u5668 PHP+MySQL+SQL Server 2008 \u904b\u884c\u74b0\u5883\u914d\u7f6e<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u7db2\u7d61\u74b0\u5883\u4e2d\uff0c\u914d\u7f6e\u4e00\u500b\u7a69\u5b9a\u4e14\u9ad8\u6548\u7684\u4f3a\u670d\u5668\u904b\u884c\u74b0\u5883\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 Windows Server 2008 R2 \u4e0a\u914d\u7f6e PHP\u3001MySQL \u548c SQL Server 2008 \u7684\u904b\u884c\u74b0\u5883\uff0c\u5305\u62ec\u5b89\u88dd\u3001\u512a\u5316\u548c\u5b89\u5168\u6027\u8a2d\u7f6e\u7b49\u65b9\u9762\u3002<\/p>\n<h2 id=\"%e4%b8%80%e3%80%81%e5%ae%89%e8%a3%9d%e7%92%b0%e5%a2%83-JOtfBCpBDn\">\u4e00\u3001\u5b89\u88dd\u74b0\u5883<\/h2>\n<h3 id=\"1-%e5%ae%89%e8%a3%9d-windows-server-2008-r2-JOtfBCpBDn\">1. \u5b89\u88dd Windows Server 2008 R2<\/h3>\n<p>\u9996\u5148\uff0c\u78ba\u4fdd\u4f60\u7684\u4f3a\u670d\u5668\u5df2\u5b89\u88dd Windows Server 2008 R2\u3002\u5b89\u88dd\u904e\u7a0b\u4e2d\uff0c\u9078\u64c7\u9069\u5408\u7684\u7248\u672c\uff08\u5982 Standard \u6216 Enterprise\uff09\uff0c\u4e26\u6839\u64da\u63d0\u793a\u5b8c\u6210\u5b89\u88dd\u3002<\/p>\n<h3 id=\"2-%e5%ae%89%e8%a3%9d-iis%ef%bc%88internet-information-services%ef%bc%89-JOtfBCpBDn\">2. \u5b89\u88dd IIS\uff08Internet Information Services\uff09<\/h3>\n<p>\u5728 Windows Server 2008 R2 \u4e2d\uff0cIIS \u662f\u4e00\u500b\u5f37\u5927\u7684\u7db2\u9801\u4f3a\u670d\u5668\u3002\u5b89\u88dd IIS \u7684\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u6253\u958b\u300c\u4f3a\u670d\u5668\u7ba1\u7406\u54e1\u300d\u3002<\/li>\n<li>\u9078\u64c7\u300c\u89d2\u8272\u300d\u4e26\u9ede\u64ca\u300c\u6dfb\u52a0\u89d2\u8272\u300d\u3002<\/li>\n<li>\u5728\u89d2\u8272\u5411\u5c0e\u4e2d\uff0c\u9078\u64c7\u300cWeb \u4f3a\u670d\u5668 (IIS)\u300d\u3002<\/li>\n<li>\u6839\u64da\u63d0\u793a\u5b8c\u6210\u5b89\u88dd\u3002<\/li>\n<\/ul>\n<h3 id=\"3-%e5%ae%89%e8%a3%9d-php-JOtfBCpBDn\">3. \u5b89\u88dd PHP<\/h3>\n<p>\u8981\u5728 IIS \u4e0a\u904b\u884c PHP\uff0c\u9700\u5b89\u88dd PHP \u7684 Windows \u7248\u672c\u3002\u53ef\u4ee5\u5f9e <a href=\"https:\/\/windows.php.net\/download\/\" rel=\"nofollow noopener\" target=\"_blank\">PHP \u5b98\u65b9\u7db2\u7ad9<\/a> \u4e0b\u8f09\u6700\u65b0\u7248\u672c\u7684 PHP\u3002<\/p>\n<ul>\n<li>\u4e0b\u8f09 PHP \u5b89\u88dd\u5305\u3002<\/li>\n<li>\u89e3\u58d3\u7e2e\u5230 C:PHP \u76ee\u9304\u3002<\/li>\n<li>\u5728 IIS \u4e2d\u914d\u7f6e PHP\uff0c\u9700\u5728\u300cHandler Mappings\u300d\u4e2d\u6dfb\u52a0 PHP \u7684\u8655\u7406\u7a0b\u5e8f\u3002<\/li>\n<\/ul>\n<h3 id=\"4-%e5%ae%89%e8%a3%9d-mysql-JOtfBCpBDn\">4. \u5b89\u88dd MySQL<\/h3>\n<p>MySQL \u662f\u4e00\u500b\u6d41\u884c\u7684\u958b\u6e90\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\u3002\u5b89\u88dd MySQL \u7684\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u5f9e <a href=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\" rel=\"nofollow noopener\" target=\"_blank\">MySQL \u5b98\u65b9\u7db2\u7ad9<\/a> \u4e0b\u8f09\u5b89\u88dd\u5305\u3002<\/li>\n<li>\u904b\u884c\u5b89\u88dd\u7a0b\u5e8f\uff0c\u9078\u64c7\u300c\u5178\u578b\u5b89\u88dd\u300d\u3002<\/li>\n<li>\u8a2d\u7f6e root \u5bc6\u78bc\u4e26\u8a18\u9304\u4e0b\u4f86\u3002<\/li>\n<\/ul>\n<h3 id=\"5-%e5%ae%89%e8%a3%9d-sql-server-2008-JOtfBCpBDn\">5. \u5b89\u88dd SQL Server 2008<\/h3>\n<p>SQL Server 2008 \u662f\u5fae\u8edf\u7684\u4e00\u6b3e\u95dc\u806f\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\u3002\u5b89\u88dd SQL Server \u7684\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u5f9e\u5fae\u8edf\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09 SQL Server 2008\u3002<\/li>\n<li>\u904b\u884c\u5b89\u88dd\u7a0b\u5e8f\uff0c\u9078\u64c7\u300c\u65b0\u5efa SQL Server \u72c0\u614b\u300d\u3002<\/li>\n<li>\u6839\u64da\u63d0\u793a\u5b8c\u6210\u5b89\u88dd\uff0c\u4e26\u8a2d\u7f6e\u7ba1\u7406\u54e1\u8cec\u6236\u3002<\/li>\n<\/ul>\n<h2 id=\"%e4%ba%8c%e3%80%81%e5%84%aa%e5%8c%96%e9%85%8d%e7%bd%ae-JOtfBCpBDn\">\u4e8c\u3001\u512a\u5316\u914d\u7f6e<\/h2>\n<h3 id=\"1-php-%e9%85%8d%e7%bd%ae%e5%84%aa%e5%8c%96-JOtfBCpBDn\">1. PHP \u914d\u7f6e\u512a\u5316<\/h3>\n<p>\u5728 php.ini \u6587\u4ef6\u4e2d\u9032\u884c\u4ee5\u4e0b\u914d\u7f6e\u4ee5\u63d0\u9ad8\u6027\u80fd\uff1a<\/p>\n<pre><code>\nmemory_limit = 256M\nmax_execution_time = 30\nupload_max_filesize = 20M\n<\/code><\/pre>\n<h3 id=\"2-mysql-%e9%85%8d%e7%bd%ae%e5%84%aa%e5%8c%96-JOtfBCpBDn\">2. MySQL \u914d\u7f6e\u512a\u5316<\/h3>\n<p>\u7de8\u8f2f MySQL \u7684 my.cnf \u6587\u4ef6\uff0c\u9032\u884c\u4ee5\u4e0b\u512a\u5316\uff1a<\/p>\n<pre><code>\ninnodb_buffer_pool_size = 1G\nmax_connections = 200\nquery_cache_size = 64M\n<\/code><\/pre>\n<h3 id=\"3-sql-server-%e9%85%8d%e7%bd%ae%e5%84%aa%e5%8c%96-JOtfBCpBDn\">3. SQL Server \u914d\u7f6e\u512a\u5316<\/h3>\n<p>\u5728 SQL Server Management Studio \u4e2d\uff0c\u8abf\u6574\u4ee5\u4e0b\u8a2d\u7f6e\uff1a<\/p>\n<ul>\n<li>\u8a2d\u7f6e\u6700\u5927\u5167\u5b58\u4f7f\u7528\u91cf\u3002<\/li>\n<li>\u555f\u7528\u58d3\u7e2e\u5099\u4efd\u3002<\/li>\n<\/ul>\n<h2 id=\"%e4%b8%89%e3%80%81%e5%ae%89%e5%85%a8%e6%80%a7%e8%a8%ad%e7%bd%ae-JOtfBCpBDn\">\u4e09\u3001\u5b89\u5168\u6027\u8a2d\u7f6e<\/h2>\n<h3 id=\"1-%e9%98%b2%e7%81%ab%e7%89%86%e8%a8%ad%e7%bd%ae-JOtfBCpBDn\">1. \u9632\u706b\u7246\u8a2d\u7f6e<\/h3>\n<p>\u78ba\u4fdd Windows \u9632\u706b\u7246\u5df2\u555f\u7528\uff0c\u4e26\u50c5\u5141\u8a31\u5fc5\u8981\u7684\u7aef\u53e3\uff08\u5982 80\u3001443\u30013306 \u548c 1433\uff09\u901a\u904e\u3002<\/p>\n<h3 id=\"2-%e5%ae%9a%e6%9c%9f%e6%9b%b4%e6%96%b0-JOtfBCpBDn\">2. \u5b9a\u671f\u66f4\u65b0<\/h3>\n<p>\u5b9a\u671f\u6aa2\u67e5\u4e26\u5b89\u88dd Windows \u548c\u61c9\u7528\u7a0b\u5e8f\u7684\u5b89\u5168\u66f4\u65b0\uff0c\u4ee5\u9632\u6b62\u6f5b\u5728\u7684\u5b89\u5168\u6f0f\u6d1e\u3002<\/p>\n<h3 id=\"3-%e6%95%b8%e6%93%9a%e5%ba%ab%e5%ae%89%e5%85%a8-JOtfBCpBDn\">3. \u6578\u64da\u5eab\u5b89\u5168<\/h3>\n<p>\u70ba MySQL \u548c SQL Server \u8a2d\u7f6e\u5f37\u5bc6\u78bc\uff0c\u4e26\u9650\u5236\u7528\u6236\u7684\u6b0a\u9650\uff0c\u50c5\u6388\u4e88\u5fc5\u8981\u7684\u8a2a\u554f\u6b0a\u9650\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-JOtfBCpBDn\">\u7e3d\u7d50<\/h2>\n<p>\u914d\u7f6e Win2008 R2 \u4f3a\u670d\u5668\u7684 PHP\u3001MySQL \u548c SQL Server 2008 \u74b0\u5883\u9700\u8981\u4ed4\u7d30\u7684\u5b89\u88dd\u3001\u512a\u5316\u548c\u5b89\u5168\u8a2d\u7f6e\u3002\u900f\u904e\u4e0a\u8ff0\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u5efa\u7acb\u4e00\u500b\u7a69\u5b9a\u4e14\u9ad8\u6548\u7684\u904b\u884c\u74b0\u5883\uff0c\u652f\u6301\u60a8\u7684\u61c9\u7528\u7a0b\u5e8f\u904b\u884c\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u9ad8\u6548\u7684\u89e3\u6c7a\u65b9\u6848\uff0c\u53ef\u4ee5\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u670d\u52d9\uff0c\u9019\u5c07\u70ba\u60a8\u7684\u696d\u52d9\u63d0\u4f9b\u66f4\u597d\u7684\u652f\u6301\u548c\u9748\u6d3b\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u914d\u7f6eWin2008 R2\u4f3a\u670d\u5668\u7684PHP\u3001MySQL\u548cSQL Server 2008\u904b\u884c\u74b0\u5883\uff0c\u5305\u62ec\u5b89\u88dd\u3001\u512a\u5316\u548c\u5b89\u5168\u8a2d\u7f6e\u6307\u5357\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-53909","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/53909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=53909"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/53909\/revisions"}],"predecessor-version":[{"id":53910,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/53909\/revisions\/53910"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=53909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=53909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=53909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}