{"id":48898,"date":"2024-10-08T00:58:15","date_gmt":"2024-10-07T16:58:15","guid":{"rendered":"https:\/\/server.hk\/cnblog\/48898\/"},"modified":"2024-10-08T00:58:15","modified_gmt":"2024-10-07T16:58:15","slug":"win2012-iis-8-%e6%90%ad%e9%85%8d-upupw-%e7%9a%84-php%ef%bc%88%e5%90%ab-php-%e5%8a%a0%e9%80%9f%e7%b5%84%e4%bb%b6%ef%bc%89%e5%92%8c-mariadb","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/48898\/","title":{"rendered":"Win2012 IIS 8 \u642d\u914d UPUPW \u7684 PHP\uff08\u542b PHP \u52a0\u901f\u7d44\u4ef6\uff09\u548c MariaDB"},"content":{"rendered":"<h1 id=\"win2012-iis-8-%e6%90%ad%e9%85%8d-upupw-%e7%9a%84-php%ef%bc%88%e5%90%ab-php-%e5%8a%a0%e9%80%9f%e7%b5%84%e4%bb%b6%ef%bc%89%e5%92%8c-mariadb-FHBWXuOBpU\">Win2012 IIS 8 \u642d\u914d UPUPW \u7684 PHP\uff08\u542b PHP \u52a0\u901f\u7d44\u4ef6\uff09\u548c MariaDB<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u7db2\u7d61\u74b0\u5883\u4e2d\uff0c\u9078\u64c7\u5408\u9069\u7684\u4f3a\u670d\u5668\u67b6\u69cb\u5c0d\u65bc\u7db2\u7ad9\u7684\u6027\u80fd\u548c\u7a69\u5b9a\u6027\u81f3\u95dc\u91cd\u8981\u3002Windows Server 2012\uff08Win2012\uff09\u642d\u914d IIS 8 \u662f\u4e00\u500b\u5f37\u5927\u7684\u9078\u64c7\uff0c\u7279\u5225\u662f\u7576\u6211\u5011\u5c07\u5176\u8207 UPUPW\u3001PHP \u548c MariaDB \u7d50\u5408\u4f7f\u7528\u6642\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u5982\u4f55\u5728 Win2012 \u4e0a\u8a2d\u7f6e IIS 8\uff0c\u4e26\u4f7f\u7528 UPUPW \u4f86\u904b\u884c PHP \u61c9\u7528\u7a0b\u5e8f\uff0c\u9084\u5c07\u4ecb\u7d39 PHP \u52a0\u901f\u7d44\u4ef6\u548c MariaDB \u7684\u914d\u7f6e\u3002<\/p>\n<h2 id=\"%e4%b8%80%e3%80%81iis-8-%e7%b0%a1%e4%bb%8b-FHBWXuOBpU\">\u4e00\u3001IIS 8 \u7c21\u4ecb<\/h2>\n<p>IIS\uff08Internet Information Services\uff09\u662f\u5fae\u8edf\u63d0\u4f9b\u7684\u7db2\u9801\u4f3a\u670d\u5668\uff0cIIS 8 \u662f\u5176\u5728 Windows Server 2012 \u4e0a\u7684\u7248\u672c\u3002IIS 8 \u63d0\u4f9b\u4e86\u8a31\u591a\u65b0\u529f\u80fd\uff0c\u5305\u62ec\u66f4\u597d\u7684\u6027\u80fd\u3001\u53ef\u64f4\u5c55\u6027\u548c\u5b89\u5168\u6027\u3002\u5b83\u652f\u6301\u591a\u7a2e\u61c9\u7528\u7a0b\u5e8f\u6846\u67b6\uff0c\u5305\u62ec ASP.NET \u548c PHP\uff0c\u9019\u4f7f\u5f97\u5b83\u6210\u70ba\u4e00\u500b\u9748\u6d3b\u7684\u9078\u64c7\u3002<\/p>\n<h2 id=\"%e4%ba%8c%e3%80%81upupw-%e7%b0%a1%e4%bb%8b-FHBWXuOBpU\">\u4e8c\u3001UPUPW \u7c21\u4ecb<\/h2>\n<p>UPUPW \u662f\u4e00\u500b\u8f15\u91cf\u7d1a\u7684 PHP \u74b0\u5883\uff0c\u9069\u5408\u5728 Windows \u7cfb\u7d71\u4e0a\u5feb\u901f\u642d\u5efa PHP \u958b\u767c\u74b0\u5883\u3002\u5b83\u96c6\u6210\u4e86 Apache\u3001PHP \u548c MySQL\uff08\u6216 MariaDB\uff09\uff0c\u4f7f\u5f97\u958b\u767c\u8005\u53ef\u4ee5\u8f15\u9b06\u5730\u9032\u884c\u672c\u5730\u958b\u767c\u548c\u6e2c\u8a66\u3002<\/p>\n<h2 id=\"%e4%b8%89%e3%80%81%e5%9c%a8-win2012-%e4%b8%8a%e5%ae%89%e8%a3%9d-iis-8-FHBWXuOBpU\">\u4e09\u3001\u5728 Win2012 \u4e0a\u5b89\u88dd IIS 8<\/h2>\n<ol>\n<li>\u6253\u958b\u300c\u4f3a\u670d\u5668\u7ba1\u7406\u54e1\u300d\uff0c\u9078\u64c7\u300c\u6dfb\u52a0\u89d2\u8272\u548c\u529f\u80fd\u300d\u3002<\/li>\n<li>\u5728\u89d2\u8272\u9078\u64c7\u4e2d\uff0c\u9078\u64c7\u300cWeb \u4f3a\u670d\u5668\uff08IIS\uff09\u300d\u3002<\/li>\n<li>\u6309\u7167\u63d0\u793a\u5b8c\u6210\u5b89\u88dd\uff0c\u4e26\u78ba\u4fdd\u9078\u64c7\u4e86\u5fc5\u8981\u7684\u529f\u80fd\uff0c\u5982\u300cASP.NET\u300d\u548c\u300cCGI\u300d\u3002<\/li>\n<\/ol>\n<h2 id=\"%e5%9b%9b%e3%80%81%e5%ae%89%e8%a3%9d-upupw-FHBWXuOBpU\">\u56db\u3001\u5b89\u88dd UPUPW<\/h2>\n<p>\u4e0b\u8f09 UPUPW \u7684\u6700\u65b0\u7248\u672c\uff0c\u89e3\u58d3\u7e2e\u5230\u6307\u5b9a\u76ee\u9304\u3002\u63a5\u4e0b\u4f86\uff0c\u6839\u64da\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\u914d\u7f6e\uff1a<\/p>\n<ol>\n<li>\u9032\u5165 UPUPW \u7684\u5b89\u88dd\u76ee\u9304\uff0c\u904b\u884c <code>upupw.exe<\/code>\u3002<\/li>\n<li>\u5728 UPUPW \u754c\u9762\u4e2d\uff0c\u9078\u64c7 PHP \u7248\u672c\u548c\u6578\u64da\u5eab\uff08MariaDB\uff09\u3002<\/li>\n<li>\u555f\u52d5\u670d\u52d9\uff0c\u4e26\u78ba\u4fdd Apache \u548c MariaDB \u6b63\u5e38\u904b\u884c\u3002<\/li>\n<\/ol>\n<h2 id=\"%e4%ba%94%e3%80%81%e9%85%8d%e7%bd%ae-php-%e5%8a%a0%e9%80%9f%e7%b5%84%e4%bb%b6-FHBWXuOBpU\">\u4e94\u3001\u914d\u7f6e PHP \u52a0\u901f\u7d44\u4ef6<\/h2>\n<p>\u70ba\u4e86\u63d0\u9ad8 PHP \u7684\u6027\u80fd\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u52a0\u901f\u7d44\u4ef6\uff0c\u5982 OPcache\u3002\u4ee5\u4e0b\u662f\u914d\u7f6e OPcache \u7684\u6b65\u9a5f\uff1a<\/p>\n<pre>\n; \u5728 php.ini \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\nopcache.enable=1\nopcache.memory_consumption=128\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.revalidate_freq=2\n<\/pre>\n<p>\u9019\u4e9b\u8a2d\u7f6e\u5c07\u5e6b\u52a9\u63d0\u9ad8 PHP \u7684\u57f7\u884c\u6548\u7387\uff0c\u7279\u5225\u662f\u5728\u9ad8\u6d41\u91cf\u7684\u60c5\u6cc1\u4e0b\u3002<\/p>\n<h2 id=\"%e5%85%ad%e3%80%81%e5%ae%89%e8%a3%9d%e5%92%8c%e9%85%8d%e7%bd%ae-mariadb-FHBWXuOBpU\">\u516d\u3001\u5b89\u88dd\u548c\u914d\u7f6e MariaDB<\/h2>\n<p>MariaDB \u662f MySQL \u7684\u4e00\u500b\u5206\u652f\uff0c\u63d0\u4f9b\u4e86\u66f4\u597d\u7684\u6027\u80fd\u548c\u5b89\u5168\u6027\u3002\u5b89\u88dd MariaDB \u7684\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u5728 UPUPW \u754c\u9762\u4e2d\uff0c\u9078\u64c7 MariaDB\uff0c\u4e26\u555f\u52d5\u670d\u52d9\u3002<\/li>\n<li>\u4f7f\u7528 <code>mysql_secure_installation<\/code> \u547d\u4ee4\u4f86\u52a0\u5f37\u5b89\u5168\u6027\u3002<\/li>\n<li>\u5275\u5efa\u6578\u64da\u5eab\u548c\u7528\u6236\uff0c\u4e26\u8a2d\u7f6e\u76f8\u61c9\u7684\u6b0a\u9650\u3002<\/li>\n<\/ol>\n<h2 id=\"%e4%b8%83%e3%80%81%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83-FHBWXuOBpU\">\u4e03\u3001\u6e2c\u8a66\u74b0\u5883<\/h2>\n<p>\u5728\u5b8c\u6210\u4ee5\u4e0a\u6b65\u9a5f\u5f8c\uff0c\u53ef\u4ee5\u5275\u5efa\u4e00\u500b\u7c21\u55ae\u7684 PHP \u6e2c\u8a66\u6587\u4ef6\u4f86\u6aa2\u67e5\u74b0\u5883\u662f\u5426\u6b63\u5e38\u904b\u884c\u3002\u5275\u5efa\u4e00\u500b\u540d\u70ba <code>info.php<\/code> \u7684\u6587\u4ef6\uff0c\u5167\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre>\n&lt;?php\nphpinfo();\n?&gt;\n<\/pre>\n<p>\u5c07\u8a72\u6587\u4ef6\u653e\u7f6e\u5728 UPUPW \u7684\u6839\u76ee\u9304\u4e0b\uff0c\u7136\u5f8c\u5728\u700f\u89bd\u5668\u4e2d\u8a2a\u554f <code>http:\/\/localhost\/info.php<\/code>\uff0c\u5982\u679c\u4e00\u5207\u6b63\u5e38\uff0c\u5c07\u986f\u793a PHP \u7684\u914d\u7f6e\u4fe1\u606f\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-FHBWXuOBpU\">\u7e3d\u7d50<\/h2>\n<p>\u901a\u904e\u4ee5\u4e0a\u6b65\u9a5f\uff0c\u6211\u5011\u53ef\u4ee5\u5728 Windows Server 2012 \u4e0a\u6210\u529f\u642d\u5efa\u4e00\u500b\u57fa\u65bc IIS 8 \u7684 PHP \u74b0\u5883\uff0c\u4e26\u4f7f\u7528 UPUPW \u548c MariaDB \u9032\u884c\u958b\u767c\u548c\u6e2c\u8a66\u3002\u9019\u7a2e\u7d44\u5408\u4e0d\u50c5\u80fd\u5920\u63d0\u4f9b\u826f\u597d\u7684\u6027\u80fd\uff0c\u9084\u80fd\u5920\u6eff\u8db3\u591a\u7a2e\u61c9\u7528\u9700\u6c42\u3002\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u9069\u5408\u4e0d\u540c\u7684\u696d\u52d9\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Win2012 IIS 8 \u4e0a\u5b89\u88dd UPUPW\uff0c\u914d\u7f6e PHP\uff08\u542b\u52a0\u901f\u7d44\u4ef6\uff09\u548c MariaDB\uff0c\u5be6\u73fe\u9ad8\u6548\u80fd\u7684\u7db2\u9801\u4f3a\u670d\u5668\u74b0\u5883\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-48898","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/48898","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=48898"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/48898\/revisions"}],"predecessor-version":[{"id":48899,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/48898\/revisions\/48899"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=48898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=48898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=48898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}