{"id":2927,"date":"2012-04-17T11:39:45","date_gmt":"2012-04-17T03:39:45","guid":{"rendered":"http:\/\/jpuyy.com\/?p=2927"},"modified":"2012-08-31T09:56:00","modified_gmt":"2012-08-31T01:56:00","slug":"centos62-x64-lamp","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=2927","title":{"rendered":"Centos6.2 x64 \u5b89\u88c5lamp\u73af\u5883"},"content":{"rendered":"<p>\u53c2\u89c1\uff1a<\/p>\n<p><a href=\"http:\/\/www.howtoforge.com\/installing-apache2-with-php5-and-mysql-support-on-centos-6.2-lamp\">http:\/\/www.howtoforge.com\/installing-apache2-with-php5-and-mysql-support-on-centos-6.2-lamp<\/a><\/p>\n<p>1\u3001\u5b89\u88c5mysql\uff1a<\/p>\n<pre>yum install mysql mysql-server<\/pre>\n<p>\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\uff0c\u542f\u52a8mysql<\/p>\n<pre>chkconfig --levels 235 mysqld on\r\n\/etc\/init.d\/mysqld start<\/pre>\n<p>\u6b64\u65f6\u7684mysql\u662f\u6ca1\u6709root\u5bc6\u7801\u7684\uff0c\u8fd0\u884c\u4e0b\u9762\u5411\u5bfc\uff1a<\/p>\n<pre>mysql_secure_installation<\/pre>\n<p>2\u3001\u5b89\u88c5apache2<\/p>\n<pre>yum install httpd<\/pre>\n<p>\u8bbe\u7f6eapache\u5f00\u673a\u542f\u52a8\uff0c\u5e76\u542f\u52a8apache,\u8fd9\u91cc\u6253\u5f00http:\/\/\u4f60\u7684ip\/\u53ef\u4ee5\u770b\u5230apache\u7684\u6b22\u8fce\u9875\u9762\uff0c\u8bb0\u5f97\u628aiptables\u768480\u7aef\u53e3\u6253\u5f00<\/p>\n<pre>chkconfig --levels 235 httpd on\r\n\/etc\/init.d\/httpd start<\/pre>\n<p>Apache\u5728CentOS\u4e0b\u9ed8\u8ba4\u7a0b\u5e8f\u8def\u5f84\u4e3a \/var\/www\/html \uff0c\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6 \/etc\/httpd\/conf\/httpd.conf. \u6269\u5c55\u914d\u7f6e\u6587\u4ef6\u5728 \/etc\/httpd\/conf.d\/<\/p>\n<p>3\u3001\u5b89\u88c5php5\u548cApache PHP5\u6a21\u5757<\/p>\n<pre>yum install php<\/pre>\n<p>\u5b89\u88c5\u597d\u540e\u5fc5\u987b\u91cd\u542fapache\u670d\u52a1<\/p>\n<pre>\/etc\/init.d\/httpd restart<\/pre>\n<p>4\u3001\u6d4b\u8bd5php\u662f\u5426\u53ef\u7528<\/p>\n<pre>vi \/var\/www\/html\/info.php<\/pre>\n<p>\u5199\u5165\u5982\u4e0b\u5185\u5bb9\uff0c\u4fdd\u5b58<\/p>\n<pre>&lt;?php\r\nphpinfo();\r\n?&gt;<\/pre>\n<p>\u6253\u5f00http:\/\/\u4f60\u7684ip\/info.php\u770b\u5230phpinfo\u9875\u9762<\/p>\n<p>5\u3001\u8ba9php5\u652f\u6301mysql<\/p>\n<p>\u5728\u5e93\u91cc\u641c\u7d22php\uff0c\u627e\u5230\u652f\u6301mysql\u6a21\u5757\u548c\u7ec4\u4ef6<\/p>\n<pre>yum search php<\/pre>\n<p>\u6309\u9700\u9009\u62e9\u5b89\u88c5<\/p>\n<pre>yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc<\/pre>\n<p>\u91cd\u542fapache2<\/p>\n<pre>\/etc\/init.d\/httpd restart<\/pre>\n<p>\u6253\u5f00http:\/\/\u4f60\u7684ip\/info.php\u53ef\u4ee5\u770b\u5230mysql\u7684\u652f\u6301\u60c5\u51b5<\/p>\n<p>6\u3001\u5b89\u88c5phpmyadmin<\/p>\n<p>\u5728\u5b98\u65b9\u5e93\u91cc\u6ca1\u6709phpmyadmin\uff0c\u73b0\u5728\u5bfc\u5165RPMforge GPG key:<\/p>\n<pre>rpm --import http:\/\/dag.wieers.com\/rpm\/packages\/RPM-GPG-KEY.dag.txt\r\nyum install http:\/\/pkgs.repoforge.org\/rpmforge-release\/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm<\/pre>\n<p>\u5b89\u88c5\uff1a<\/p>\n<pre>yum install phpmyadmin<\/pre>\n<p>\u6539\u53d8apache\u4e2d\u7684phpmyadmin\u914d\u7f6e\u6587\u4ef6<\/p>\n<pre>vi \/etc\/httpd\/conf.d\/phpmyadmin.conf<\/pre>\n<p>\u6ce8\u91ca\u6389&lt;Directory &#8220;\/usr\/share\/phpmyadmin&#8221;&gt;&#8230;&lt;\/Directory&gt;\u8fd9\u4e00\u8282\uff0c\u8fd9\u6837\u505a\u53ef\u4ee5\u4f7fphpmyadmin\u4e0d\u9650\u4e8e\u672c\u5730\u6253\u5f00<\/p>\n<p>\u63a5\u4e0b\u6765\u6539\u53d8phpMyAdmin\u4ececookie\u8ba4\u8bc1\u5230http\u8ba4\u8bc1<\/p>\n<pre>vi \/usr\/share\/phpmyadmin\/config.inc.php<\/pre>\n<p>\u6539\u540e\u4e3a<\/p>\n<pre>$cfg['Servers'][$i]['auth_type'] = 'http';<\/pre>\n<p>\u91cd\u542fApache:<\/p>\n<pre>\/etc\/init.d\/httpd restart<\/pre>\n<p>\u6b64\u65f6CentOS 6.2 x86_64\u4e0b\u7684LAMP\u73af\u5883\u914d\u7f6e\u5b8c\u6210<\/p>\n<p>:)EOT<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u89c1\uff1a http:\/\/www.howtoforge.com\/installing-apache2-with-php5-and-mysql-support-on-centos-6.2-lamp 1\u3001\u5b89\u88c5mysql\uff1a yum install mysql mysql-server \u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\uff0c\u542f\u52a8mysql chkconfig &#8211;levels 235 mysqld on \/etc\/init.d\/mysqld start \u6b64\u65f6\u7684mysql\u662f\u6ca1\u6709root\u5bc6\u7801\u7684\uff0c\u8fd0\u884c\u4e0b\u9762\u5411\u5bfc\uff1a mysql_secure_installation 2\u3001\u5b89\u88c5apache2 yum install httpd \u8bbe\u7f6eapache\u5f00\u673a\u542f\u52a8\uff0c\u5e76\u542f\u52a8apache,\u8fd9\u91cc\u6253\u5f00http:\/\/\u4f60\u7684ip\/\u53ef\u4ee5\u770b\u5230apache\u7684\u6b22\u8fce\u9875\u9762\uff0c\u8bb0\u5f97\u628aiptables\u768480\u7aef\u53e3\u6253\u5f00 chkconfig &#8211;levels 235 httpd on \/etc\/init.d\/httpd start Apache\u5728CentOS\u4e0b\u9ed8\u8ba4\u7a0b\u5e8f\u8def\u5f84\u4e3a \/var\/www\/html \uff0c\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6 \/etc\/httpd\/conf\/httpd.conf. \u6269\u5c55\u914d\u7f6e\u6587\u4ef6\u5728 \/etc\/httpd\/conf.d\/ 3\u3001\u5b89\u88c5php5\u548cApache PHP5\u6a21\u5757 yum install php \u5b89\u88c5\u597d\u540e\u5fc5\u987b\u91cd\u542fapache\u670d\u52a1 \/etc\/init.d\/httpd restart 4\u3001\u6d4b\u8bd5php\u662f\u5426\u53ef\u7528 vi \/var\/www\/html\/info.php \u5199\u5165\u5982\u4e0b\u5185\u5bb9\uff0c\u4fdd\u5b58 &lt;?php phpinfo(); ?&gt; \u6253\u5f00http:\/\/\u4f60\u7684ip\/info.php\u770b\u5230phpinfo\u9875\u9762 5\u3001\u8ba9php5\u652f\u6301mysql \u5728\u5e93\u91cc\u641c\u7d22php\uff0c\u627e\u5230\u652f\u6301mysql\u6a21\u5757\u548c\u7ec4\u4ef6 yum search [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[23],"class_list":["post-2927","post","type-post","status-publish","format-standard","hentry","category-linux","tag-summary"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/2927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2927"}],"version-history":[{"count":3,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/2927\/revisions"}],"predecessor-version":[{"id":3323,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/2927\/revisions\/3323"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}