{"id":1435,"date":"2024-06-05T19:42:46","date_gmt":"2024-06-05T11:42:46","guid":{"rendered":"http:\/\/www.jh1999.cn\/?p=1435"},"modified":"2024-11-16T12:00:08","modified_gmt":"2024-11-16T04:00:08","slug":"wamp%e7%bb%bf%e8%89%b2%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba","status":"publish","type":"post","link":"http:\/\/www.jh1999.cn\/?p=1435","title":{"rendered":"WAMP\u7eff\u8272\u73af\u5883\u642d\u5efa"},"content":{"rendered":"<div class=\"gb-container gb-container-3b6b2b36\">\n\n<p class=\"wp-block-paragraph\">\u5c3d\u7ba1\u6709\u5f88\u591aWAMP\/LAMP\u73af\u5883\u7684\u81ea\u52a8\u642d\u5efa\u7a0b\u5e8f\uff0c\u4f46\u7528\u5b8c\u4e4b\u540e\u4e0d\u77e5\u5176\u6240\u4ee5\u7136\uff0c\u4e00\u65e6\u6709\u7279\u6b8a\u60c5\u51b5\u8981\u5904\u7406\u65f6\uff0c\u4fbf\u65e0\u4ece\u4e0b\u624b\uff0c\u66f4\u91cd\u8981\u7684\u662f\u642d\u5efa\u7a0b\u5e8f\u672c\u8eab\u53ef\u80fd\u5b58\u5728\u6f0f\u6d1e\uff0c\u98ce\u9669\u592a\u9ad8\u3002\u56e0\u6b64\u7eff\u8272\u642d\u5efa\u4e00\u4e2aWAMP\u73af\u5883\uff0c\u662f\u5f88\u6709\u5fc5\u8981\u7684\uff0c\u4e00\u6765\u53ef\u4ee5\u5f04\u6e05\u5b83\u7684\u8fd0\u884c\u539f\u7406\uff0c\u4e8c\u6765\u53ef\u4ee5\u66f4\u597d\u5730\u5e94\u4ed8\u7279\u6b8a\u8981\u6c42\u7684\u73af\u5883\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u4ee5Apache2.4 + php7.4 + MySQL5.7\u4e3a\u4f8b\uff0c\u505a\u642d\u5efa\u8bf4\u660e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u3001Apache for windows\u5b89\u88dd<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ecehttp:\/\/www.apachehaus.com\/ \u4e0b\u8f09\u66f4\u65b9\u4fbf, Apache \u5fc5\u9808\u8207PHP\u548cVC\u7248\u672c\u5339\u914d<br> \u89e3\u58d3\u5230 C:\\WebSer\\Apache24<br> \u505c\u6389IIS, \u91cb\u653e80\u7aef\u53e3<br> c:\\WebSer\\Apache22\\bin&gt;httpd -k install n apache2.2<br> (\u5982\u679c\u79fb\u9664\u5148\u505c\u6b62, \u518ddos\u4e0b\u57f7\u884c sc delete apache2.2)<br> \u4fee\u6539\u914d\u7f6e\u6587\u4ef6:C:\\WebSer\\Apache24\\conf\\httpd.conf<br> ServerRoot &#8220;C:\\WebSer\\Apache24&#8221;<br> DocumentRoot &#8220;D:\\WebSite\\htdocs&#8221;<br> \u90fd\u662f\u8def\u5f91\u554f\u984c,\u7528\/WebSer\/Apache24\u66ff\u63db \/Apache24<br> \u914d\u7f6e\u662f\u5426OK, \u904b\u884c bin\\httpd.exe \u5c31\u6703\u63d0\u793a\u76f8\u61c9\u4fe1\u606f<br> \u4fee\u6539C:\\WebSer\\Apache22\\conf\\extra\\httpd-shssl.conf(2.4\u597d\u8c61\u4e0d\u9700)<br> \u652f\u6301\u865b\u64ec\u4e3b\u6a5f<br> httpd.conf \u6587\u4ef6, \u555f\u7528 Include conf\/extra\/httpd-vhosts.conf<br> \u5982\u679c\u865b\u64ec\u6a5f\u4f7f\u7528\u5176\u5b83\u7aef\u53e3,\u5c31\u8981\u5728 httpd.conf \u4e2d\u589e\u52a0Listen<br> Listen 80<br> Listen 81<br> Listen 82<br> \u652f\u6301PHP(\u589e\u52a0\u4e0b\u8ff0)<br> #php5 support<br> LoadModule php5_module C:\/WebSer\/PHP56\/php5apache2_4.dll<br> AddType application\/x-httpd-php .php .html .htm<br> #configure the path to php.ini<br> PHPIniDir &#8220;C:\/WebSer\/PHP56<br> \u6700\u540e\u6e2c\u8a66Apache\u662f\u5426\u6b63\u5e38, \u7528IE\u8a2a\u554f http:\/\/localhost\/ \u5373\u53ef<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e8c\u3001PHP\u590d\u5236\u5b89\u88dd\u914d\u7f6e(PHP\u7248\u672c\u4e00\u5b9a\u8981\u8207VC++\u5339\u914d)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u8f09 http:\/\/windows.php.net\/download#php-5.6<br> php5.4-vc9-vs2008, php5.5-vc11-vs2012, php5.6-vc11-vs2012, php7.0-vc14-vs2015<br> VC\u53ea\u8981\u5b89\u88dd\u5b83\u7684Redistributable\u5c31\u884c,<br> http:\/\/www.microsoft.com\/zh-tw\/download\/confirmation.aspx?id=30679<br> 1. \u89e3\u58d3\u5230 C:\\WebSer\\PHP56<br> 2. \u5fa9\u5236 php.ini-production \u5fa9\u5236\u4e3aphp.ini<br> 3. \u5728\u96fb\u8166\u74b0\u5883\u8b8a\u91cf\u7684 path\u4e2d\u589e\u52a0 C:\\WebSer\\PHP \u548c C:\\WebSer\\PHP\\ext<br> path\u6709\u6642\u4e0d\u6703\u7acb\u5373\u751f\u6548,\u5c31\u4e2d\u6b62\u6240\u6709\u7684explorer.exe\u518d\u904b\u884c\u5c31\u884c\u4e86<br> 4. \u7de8\u8f2fphp.ini\u6587\u4ef6<br> doc_root = &#8220;D:\\WebSite\\htdocs&#8221; (\u53ef\u4ee5\u70ba\u7a7a)<br> extension_dir = &#8220;C:\\WebSer\\PHP\\ext&#8221;<br> extension=php_mbstring.dll \u555f\u7528(\u53bb\u6389\u958b\u982d\u7684;)\u4e0b\u9762dll\u90fd\u8981\u958b\u555f<br> php_curl.dll,php_fileinfo.dll,php_gd2.dll,php_mbstring.dll,php_mysql.dll,<br> php_openssl.dll,php_pdo_mysql.dll,php_pdo_sqlite.dll<br> 5.\u9650\u6b62\u4e0a\u50b3\u6587\u4ef6\u5927\u5c0f\u7684\u53c3\u6578\u6709:upload_max_filesize, post_max_size<br> 6.\u6709\u6642\u9593\u5340\u57df\u554f\u984c\u7684, \u958b\u555fdate.timezone =Asia\/Shanghai<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e09\u3001mySQL\u914d\u7f6e(\u4e0d\u80fd\u4ece\u5df2\u88c5\u597d\u7684\u73af\u5883COPY\u6765\u7528\uff0cmy.ini\u53ef\u4ee5\u7528)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u8f09:http:\/\/dev.mysql.com\/downloads\/mysql\/ \u4e0d\u8981\u767b\u5165\u76f4\u63a5\u4e0b\u8f09<br> 1.\u89e3\u58d3\u5230C:\\WebSer\\mySql57<br> 2.copy\u6587\u4ef6my-default.ini \u70ba my.ini<br> 3.\u8a2d\u5b9a\u5169\u500b\u53c3\u6578<br> basedir=C:\\WebSer\\mySQL57<br> ;datadir=C:\\WebSer\\mySQL\\data \u6578\u64da\u5eab\u6539\u5728D\u76e4 datadir=D:\\WebSite\\MySqlData<br> \u6700\u5e95 #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES sandal2017<br> \u6709\u4e9bOA\u4e0d\u652f\u6301\u4e25\u683c\u65b9\u5f0f, \u6539\u4e3a sql_mode=NO_ENGINE_SUBSTITUTION<br> 4.\u5728[\u6211\u7684\u96fb\u8166]\u91cc\u8a2d\u7f6e\u74b0\u5883\u8b8a\u91cf, path\u91cc\u589e\u52a0 C:\\WebSer\\MySql57\\bin<br> 5.7\u7248\u7684\u521d\u59cb\u5316<br> bin> mysqld &#8211;initialize-insecure &#8211;user=mysql (\u521d\u59cb\u5316\u524d\u5eab\u76ee\u9304\u9808\u7a7a, user=mysql\u7167\u6284)<br> \u5982\u679c\u6210\u529f\u6570\u636e\u76ee\u5f55\u4e0b\u751f\u6210\u5b50\u76ee\u5f55mysql\u548csys\u548cperformance_schema\u548c\u4e00\u4e9b\u6587\u4ef6.<br> 6. \u6700\u597d\u91cd\u555f\u4e00\u6b21\u96fb\u8166<br> 7. \u8d85\u7d1ados, \u5728C:\\WebSer\\MySQL\\bin\u76ee\u9304\u4e0b\u57f7\u884c<br> mysqld -install<br> net start mysql<br> 8. \u4fee\u6539root\u5e33\u865f\u5bc6\u78bc, \u9032\u5165[mysql>]\u72c0\u614b\u540e, \u547d\u4ee4\u8981\u4ee5;\u7d50\u675f(\u4e0d\u53ef\u7528\u5171\u5b83\u5de5\u5177\u6539)<br> c:\\webSer\\mySql\\bin>mysql -u root -p <br> mysql>show databases;<br> mysql>use mysql;<br> \u65e7\u7248 mysql>update user set password=password(&#8220;123456&#8221;) where user=&#8217;root&#8217;;<br> mysql>flush privileges;<br> mysql>quit<br> 5.7\u7248\u5bc6\u78bc\u6b04\u767c\u751f\u8b8a\u5316<br> update mysql.user set authentication_string=password(&#8216;xiao.1-6&#8242;) where user=&#8217;root&#8217; and Host = &#8216;localhost&#8217;;<br> flush privileges;<br> 5.7\u7248\u7684\u53ef\u4ee5\u5728Navicat for mySQL\u8edf\u4ef6\u4e2d\u7528\u547d\u4ee4\u4fee\u6539.<br> 9. \u521b\u5efa\u5e94\u7528\u6570\u636e\u5e93:mysql>create database abcdb;<br> \u5220\u9664\u5e94\u7528\u6570\u636e\u5e93:mysql>drop database abcdb;<br> 10. mysql\u538b\u7f29\u5305\u51cf\u80a5(5.7\u7248\u90e8\u4efd\u5df2\u6e1b\uff0c\u5b9e\u6d4b\u5220\u9664\u53ef\u884c)<br> \u5220\u9664 mysql-test \u6587\u4ef6\u5939<br> \u5220\u9664 sql-bench \u6587\u4ef6\u5939<br> \u5220\u9664 bin \u76ee\u5f55\u4e0b\u7684 debug \u6587\u4ef6\u5939<br> \u5220\u9664 bin \u76ee\u5f55\u4e0b\u6240\u6709\u6269\u5c55\u540d\u4e3a .pdb \u7684\u6587\u4ef6<br> \u5220\u9664 lib \u76ee\u5f55\u4e0b\u7684 debug \u6587\u4ef6\u5939<br> \u5220\u9664 lib \u76ee\u5f55\u4e0b\u6240\u6709\u6269\u5c55\u540d\u4e3a .lib \u548c .pdb \u7684\u6587\u4ef6<br> \u5220\u9664 lib\\plugin \u76ee\u5f55\u4e0b\u6240\u6709\u6269\u5c55\u540d\u4e3a .pdb \u7684\u6587\u4ef6<br> \u5220\u9664 lib\\plugin\\debug \u76ee\u5f55\u4e0b\u6240\u6709\u6269\u5c55\u540d\u4e3a .pdb \u7684\u6587\u4ef6<br> 11.root\u5bc6\u7801: sp243=x,x sandal7=x16,spsm(24\/\u4e91)=x.16<br> 12.win\u4e0b\u914d\u7f6e\u6587\u4ef6my.ini\uff0cLinux\u4e0b\u914d\u7f6e\u6587\u4ef6etc\\my.cnf<br> 13.\u6e05\u966410\u5929\u524d\u7684\u65e5\u5fd7(\u4ec5\u672c\u6b21) set global expire_logs_days = 10;<br> \u914d\u7f6e\u6e05\u966410\u5929\u524d\u65e5\u5fd7\uff1amy.ini\\[mysqld]\u589e\u52a0\u4e00\u884c expire_logs_days=10<br> \u68c0\u67e5\u65e5\u5bfc\u6e05\u51b5 show variables like \u2018%log%\u2019<br> 14.mysqldump -u \u7528\u6237\u540d -p \u5bc6\u7801 \u6570\u636e\u5e93\u540d \u8868\u540d > \u5907\u4efd\u6587\u4ef6\u540d.sql<br> mysqldump -u \u7528\u6237\u540d -p \u6570\u636e\u5e93\u540d > \u5907\u4efd\u6587\u4ef6\u540d.sql<br> mysqldump -u \u7528\u6237\u540d -p \u6570\u636e\u5e93\u540d \u8868\u540d > \u5907\u4efd\u6587\u4ef6\u540d.sql<br> 14.\u6062\u590d\u6570\u636e\u5e93<br> mysql -u \u7528\u6237\u540d -p \u6570\u636e\u5e93\u540d &lt; \u5907\u4efd\u6587\u4ef6\u540d.sql<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"300\" src=\"http:\/\/www.jh1999.cn\/wp-content\/uploads\/2024\/06\/\u5de5\u4f5c\u4e0e\u751f\u6d3b.gif\" alt=\"\" class=\"wp-image-2302\" style=\"width:363px;height:auto\"\/><\/figure>\n<\/div>\n<div class=\"gb-shapes\"><div class=\"gb-shape gb-shape-1\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 1200 350\" preserveAspectRatio=\"none\"><path d=\"M1200 350V0C22.4 60.3 0 336.7 0 336.7V350h1200z\"\/><\/svg><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>\u5c3d\u7ba1\u6709\u5f88\u591aWAMP\/LAMP\u73af\u5883\u7684\u81ea\u52a8\u642d\u5efa\u7a0b\u5e8f\uff0c\u4f46\u7528\u5b8c\u4e4b\u540e\u4e0d\u77e5\u5176\u6240\u4ee5\u7136\uff0c\u4e00\u65e6\u6709\u7279\u6b8a\u60c5\u51b5\u8981\u5904\u7406\u65f6\uff0c\u4fbf\u65e0\u4ece\u4e0b\u624b\uff0c\u66f4 &#8230; <a title=\"WAMP\u7eff\u8272\u73af\u5883\u642d\u5efa\" class=\"read-more\" href=\"http:\/\/www.jh1999.cn\/?p=1435\" aria-label=\"Read more about WAMP\u7eff\u8272\u73af\u5883\u642d\u5efa\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1435","post","type-post","status-publish","format-standard","hentry","category-kfbj"],"_links":{"self":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts\/1435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1435"}],"version-history":[{"count":3,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts\/1435\/revisions"}],"predecessor-version":[{"id":2303,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts\/1435\/revisions\/2303"}],"wp:attachment":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1435"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}