﻿{"id":67,"date":"2009-06-30T11:14:53","date_gmt":"2009-06-30T11:14:53","guid":{"rendered":""},"modified":"2011-11-18T16:55:36","modified_gmt":"2011-11-18T08:55:36","slug":"67","status":"publish","type":"post","link":"http:\/\/zerobox.org\/notes\/67.html","title":{"rendered":"Apache-mysql-php\u5b89\u88c5"},"content":{"rendered":"<p>redhat linux 9.0<br \/>\napache2.2.3\u6e90\u7801\u5b89\u88c5\u8fc7\u7a0b<br \/>\n\u4e0b\u8f7d\u5230\/usr\/src\u76ee\u5f55\uff0c\u89e3\u538b\u7f29\uff0c\u89e3\u6863<br \/>\nroot# cd httpd.2.2.3<br \/>\nroot# .\/configure &#8211;prefix=\/usr\/local\/apache2 &#8211;enable-ssl &#8211;enable-rewrite &#8211;enable-speling<br \/>\nroot# make<br \/>\nroot# make install<br \/>\nroot# \/usr\/local\/apache2\/bin\/apachectl -k start<br \/>\nroot# \/usr\/local\/apache2\/bin\/apachectl -k stop<br \/>\nroot# \/usr\/local\/apache2\/bin\/apachectl -k restart\u00a0 \u00a0 or\u00a0\u00a0killall -HUP httpd<\/p>\n<p>\/usr\/local\/apache2\/bin\/httpd -l \u67e5\u770b\u5df2\u5b89\u88c5\u7684\u6a21\u5757<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nmysql-5.0.22\u5b89\u88c5\u624b\u518c<\/p>\n<p>#groupadd mysql<br \/>\n#useradd -g mysql mysql<br \/>\n#tar zxvf mysql-5.0.22.tar.gz\u00a0 \u00a0 \/*\u4f1a\u751f\u6210\u4e00\u4e2amysql-5.0.22\u7684\u76ee\u5f55*\/<br \/>\n#cd mysql-5.0.22<br \/>\n#.\/configure &#8211;prefix=\/usr\/local\/mysql<br \/>\n#make<br \/>\n#make install<br \/>\n#cp support-files\/my-medium.cnf \/etc\/my.cnf\u00a0 \u00a0 \/*\u5982\u679c\u8fd9\u65f6\u7cfb\u7edf\u95ee\u662f\u5426\u8986\u76d6\u91cd\u540d\u6587\u4ef6\uff0c\u56de\u7b54y*\/<br \/>\n#cd \/usr\/local\/mysql<br \/>\n#bin\/mysql_install_db &#8211;user=mysql\u00a0 \u00a0 \/*\u4ee5mysql\u7528\u6237\u5efa\u7cfb\u7edf\u5e93\uff0c\u5fc5\u987b\u4ee5mysql\u7528\u6237\uff0c\u8fd9\u70b9\u5f88\u91cd\u8981!*\/<br \/>\n#chown -R root\u00a0\u00a0.<br \/>\n#chown -R mysql var<br \/>\n#chgrp -R mysql .<br \/>\n#bin\/mysqld_safe &#8211;user=mysql &amp;\u00a0 \u00a0 \/*\u4e5f\u8981\u7528mysql\u7528\u6237\u8fd0\u884c\u3002<br \/>\n#Starting mysqld daemon with databases from \/usr\/local\/mysql\/var \/*\u606d\u559c\uff01\u6210\u529f\u4e86\uff01*\/<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\npHP-4.4.4<br \/>\n\u7cfb\u7edf\u81ea\u5e26\u662flibxml2\u7684\u7248\u672c\u662f2.5.4\u7684\uff0c\u5728php\u914d\u7f6e\u7684\u8fc7\u7a0b\u4e2d\u62a5\u9519\uff0c\u4e0b\u8f7d\u4e86\u4e00\u4e2a\u66f4\u65b0\u7684libxml2-2.6.12.tar.gz.<br \/>\n# cd \/root<br \/>\n# tar zxvf libxml2-2.6.12.tar.gz<br \/>\n# cd libxml2-2.6.12<br \/>\n# .\/configure<br \/>\n# make<br \/>\n# make install<br \/>\n1.\u89e3\u538b\u7f29\u540e\u8fd0\u884c<br \/>\n# .\/configure &#8211;prefix=\/usr\/local\/php &#8211;with-apxs2=\/usr\/local\/apache2\/bin\/apxs &#8211;with-mysql=\/usr\/local\/mysql<br \/>\n# make<br \/>\n# make test<br \/>\n# make install<br \/>\n# cp php.ini-dist \/usr\/local\/lib\/php.ini<br \/>\n2.\u7f16\u8f91apache\u914d\u7f6e\u6587\u4ef6\/etc\/httpd.conf\uff0c\u589e\u52a0php\u652f\u6301<br \/>\nAddType application\/x-httpd-php .php .phtml<br \/>\nAddType application\/x-httpd-php-source .phps<br \/>\nLoadModule php4_module modules\/libphp4.so\u00a0 \u00a0 &#8212;\u7cfb\u7edf\u5df2\u6dfb\u52a0<br \/>\nDirectoryIndex index.php default.php index.htm index.html default.htm default.html\u00a0\u00a0&#8212;\u6dfb\u52a0\u9996\u9875\u9ed8\u8ba4\u6587\u4ef6<br \/>\n\u5728\u7f51\u9875\u6839\u76ee\u5f55\u4e0b\u589e\u52a0\u4e00\u4e2a\u6d4b\u8bd5\u9875test.php<\/p>\n<p>vi test.php<br \/>\n&lt;?php<br \/>\nphpinfo () ;<br \/>\n?&gt;<br \/>\nhttp:\/\/localhost\/test.php<\/p>\n","protected":false},"excerpt":{"rendered":"<p>redhat linux 9.0 apache2.2.3\u6e90\u7801\u5b89\u88c5\u8fc7\u7a0b \u4e0b\u8f7d\u5230\/u &hellip;<\/p>\n<p class=\"read-more\"><a href=\"http:\/\/zerobox.org\/notes\/67.html\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[97,99,56],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","tag-apache","tag-mysql","tag-php"],"views":861,"_links":{"self":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":0,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"wp:attachment":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}