{"id":230,"date":"2009-08-03T14:58:00","date_gmt":"2009-08-03T06:58:00","guid":{"rendered":"https:\/\/www.pdbeta.com\/wpblog\/?p=230"},"modified":"2017-08-28T21:43:32","modified_gmt":"2017-08-28T13:43:32","slug":"ubuntu-8-04%e4%b8%8b%e6%9e%84%e5%bb%balamp%e7%8e%af%e5%a2%8320090803%e6%9b%b4%e6%96%b0","status":"publish","type":"post","link":"https:\/\/www.pdbeta.com\/wpblog\/?p=230","title":{"rendered":"UBUNTU 8.04\u4e0b\u6784\u5efaLAMP\u73af\u5883(20090803\u66f4\u65b0)"},"content":{"rendered":"<p>LAMP\u7ec4\u5408\uff08LINUX+APACHE_MYSQL+PHP\uff09\u662f\u5f53\u4eca\u6d41\u884c\u7684\u514d\u8d39WEBSERVER\u5e94\u7528\u5e73\u53f0\u89e3\u51b3\u65b9\u6848\uff0c\u4e0d\u4ec5\u514d\u8d39\uff0c\u800c\u4e14\u6548\u7387\u9ad8\uff0c\u5f88\u591a\u5546\u4e1a\u7f51\u7ad9\u90fd\u91c7\u7528\u4e86\u8fd9\u6837\u7684\u7ec4\u5408\uff0c\u8fd9\u4e24\u5929\u670b\u53cb\u60f3\u4f7f\u7528LINUX\u4e0b\u7684PHP\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e94\u6b64\u9700\u6c42\uff0c\u6211\u628a\u8fd9\u4e2a\u73af\u5883\u5148\u642d\u5efa\u4e86\u4e00\u4e0b\u3002<\/p>\n<p><a href=\"http:\/\/www.pdbeta.com\/wpblog\/wp-content\/uploads\/2012\/02\/82008529115612.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; margin: 0px 10px 10px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; padding-top: 0px; border: 0px;\" title=\"82008529115612\" alt=\"82008529115612\" src=\"http:\/\/www.pdbeta.com\/wpblog\/wp-content\/uploads\/2012\/02\/82008529115612_thumb.png\" width=\"244\" height=\"184\" align=\"left\" border=\"0\" \/><\/a><\/p>\n<p>1\u3001\u9996\u5148\u662f\u4e0b\u8f7d\u6240\u9700\u8981\u7684\u8f6f\u4ef6<\/p>\n<blockquote><p>UBUNTU:http:\/\/www.ubuntu.cn,\u6700\u65b0\u7248\u672c8.04<\/p><\/blockquote>\n<blockquote><p>APACHE:http:\/\/wwww.apache.org,\u6700\u65b0\u7248\u672c2.2.8<\/p><\/blockquote>\n<blockquote><p>Mysql:http:\/\/www.mysql.com\uff0c\u6700\u65b0\u7248\u672c5.1.23,\u5df2\u7ecf\u7531MYSQL\u7f16\u8bd1\u597d<\/p><\/blockquote>\n<blockquote><p>PHP:http:\/\/www.phpchina.com \u6700\u65b0\u7248\u672c5.2.6<\/p>\n<p>PHP\u90e8\u5206\u51fd\u6570\u7ec4\u4ef6\uff1a<\/p>\n<p>ZLIB\u7ec4\u4ef6\uff0c\u901a\u5e38\u7528\u4e8e\u538b\u7f29\u89e3\u538b\uff0c\u4e0b\u8f7d\u5730\u5740\uff1a<a title=\"http:\/\/www.zlib.net\/\" href=\"http:\/\/www.zlib.net\/\">http:\/\/www.zlib.net\/<\/a>\uff0c\u6700\u65b0\u7248\u672c1.2.3<\/p>\n<p>gd\u5e93\uff1a\u901a\u5e38\u7528\u4e8e\u56fe\u5f62\u7684\u5904\u7406\uff0c\u4e0b\u8f7d\u5730\u5740\uff1a<a title=\"http:\/\/www.libgd.org\" href=\"http:\/\/www.libgd.org\" target=\"_blank\">http:\/\/www.libgd.org<\/a>\uff0c\u6700\u65b0\u7248\u672c2.0.35<\/p><\/blockquote>\n<p>2\u3001\u5b89\u88c5UBUNTU,\u7565<\/p>\n<blockquote><p>\u5b89\u88c5\u5b8c\u6210\uff0c\u9996\u5148\u5148\u914d\u7f6e\u8f6f\u4ef6\u5b89\u88c5\u6e90\uff0c\u56e0\u4e3aUBUNTU\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u5f88\u591a\u7ec4\u4ef6\u90fd\u9700\u8981\u4ece\u7f51\u4e0a\u4e0b\u8f7d\u3002<\/p>\n<p>\u6700\u540e\uff0c\u589e\u52a0\u5b89\u88c5\u4e00\u4e2a\u8f6f\u4ef6\u5305\uff0csudo apt-get install build-essential<\/p>\n<p>\u5426\u5219\u540e\u7eed\u5728\u5b89\u88c5APACHE\u65f6\u4f1a\u51fa\u73b0\u7f16\u8bd1\u9519\u8bef<\/p><\/blockquote>\n<p>3\u3001\u5b89\u88c5APACHE 2.2.8<\/p>\n<blockquote><p>\u89e3\u538b\u4e0b\u8f7d\u5f97\u5230\u7684httpd-2.2.8.tar.gz\u5230\/tmp\u76ee\u5f55\u4e0b\uff1atar -xzvf httpd-2.2.8.tar.gz -C \/tmp<\/p>\n<p>\u8fdb\u5165\/tmp\/httpd-2.2.8\u76ee\u5f55<\/p>\n<p>\u5207\u6362\u5230ROOT\u8eab\u4efd,sudo su<\/p>\n<p>\u6e05\u7406\u4e00\u4e0b\u539f\u5148\u7684\u5b89\u88c5(\u53ef\u9009)<\/p>\n<p>make clean<\/p>\n<p>\u914d\u7f6e\u5b89\u88c5\u76ee\u5f55\u548c\u652f\u6301\u6a21\u5757<\/p>\n<p>#.\/configure &#8211;prefix=\/usr\/local\/apache228 &#8211;enable-module=so<\/p>\n<p>\u6267\u884c\u5b89\u88c5<\/p>\n<p>make<\/p>\n<p>make install<\/p>\n<p>\u81ea\u52a8\u5c06\u7a0b\u5e8f\u5b89\u88c5\u5230usr\/local\/apache228 \u4e0b<\/p>\n<p>\u542f\u52a8Apache\uff0c\u8fdb\u5165usr\/local\/apache228 \/bin\u76ee\u5f55\u4e0b\uff0c\u6267\u884c<\/p>\n<p>apachectl start<\/p>\n<p>\u5728\u6d4f\u89c8\u5668\u5185\u8f93\u5165\u672c\u673a\u7684IP\u5730\u5740\uff0c\u51fa\u73b0\u201cIt Works\u201d\u5b57\u6837\u8868\u793aApache\u5b89\u88c5\u6210\u529f\u4e86\u3002<\/p>\n<p>\u6ce8:apachectl start \u542f\u52a8\u670d\u52a1<\/p>\n<p>apachectl start \u505c\u6b62\u670d\u52a1<\/p><\/blockquote>\n<p>4\u3001\u5b89\u88c5Mysql 5(\u4e8c\u8fdb\u5236\u5305\u5b89\u88c5)<\/p>\n<blockquote><p>\u5c06\u4e0b\u8f7d\u7684\u8f6f\u4ef6\u5305\u89e3\u538b\u5230\/usr\/local\u76ee\u5f55\u4e0b<\/p>\n<p># tar -xzvf \/home\/jhshen\/mysql-5.1.36-rc-linux-i686-glibc23 -C \/usr\/local<\/p>\n<p>#mv\u00a0 mysql-5.1.36-rc-linux-i686-glibc23 mysql5.1.36<\/p>\n<p>\u521b\u5efa\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff08\u8f6f\u94fe\u63a5\uff0c\u7c7b\u4f3c\u5feb\u6377\u65b9\u5f0f\uff09<\/p>\n<p># ln -s mysql5.1.36 mysql<\/p>\n<p>\u589e\u52a0\u7528\u6237\u7ec4\u548c\u7528\u6237<\/p>\n<p>groupadd mysql<\/p>\n<p>useradd -g mysql mysql<\/p>\n<p>\u5207\u6362\u5230mysql\u76ee\u5f55\u4e0b,\u62f7\u8d1d\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>cd \/usr\/local\/mysql<\/p>\n<p>cp support-files\/my-medium.cnf \/etc\/my.cnf<\/p>\n<p>\u5b89\u88c5\u7cfb\u7edf\u6570\u636e\u5e93<\/p>\n<p>.\/scripts\/mysql_install_db &#8211;user=mysql<\/p>\n<p>\u8fd9\u4e00\u6b65\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u6709\u4e24\u4e2a:<\/p>\n<p>(1)\u63d0\u793a\u8b66\u544a\u5ffd\u7565MY.CNF\u914d\u7f6e\u6587\u4ef6\uff0c\u89e3\u51b3\u529e\u6cd5\uff1a\u6267\u884csudo chmod 644 \/etc\/myc.nf<\/p>\n<p>(2)\u63d0\u793a\u627e\u4e0d\u5230mysqld\u6587\u4ef6\uff0cmysqld\u4e3aMYsql\u7684\u6838\u5fc3\u5f15\u64ce\u6587\u4ef6,\u89e3\u51b3\u529e\u6cd5\u4e3a:<\/p>\n<p>cp support-files\/my-medium.cnf \/etc\/my.cnf<\/p>\n<p>\u6216\u8005\u68c0\u67e5etc\u4e0b\u6709\u6ca1\u6709mysql\u6587\u4ef6\u5939\uff0c\u6709\u7684\u8bdd<\/p>\n<p>cp support-files\/my-medium.cnf \/etc\/mysql\/my.cnf<\/p>\n<p><b>\u4fee\u6539mysql\u76ee\u5f55\u6743\u9650 <\/b><\/p>\n<p># chown -R root \/usr\/local\/mysql<\/p>\n<p>#chown -R mysql \/usr\/local\/mysql\/data<\/p>\n<p># chgrp -R mysql \/usr\/local\/mysql<\/p>\n<p><strong>\u542f\u52a8\u6570\u636e\u5e93<\/strong><\/p>\n<p># \/usr\/local\/mysql\/bin\/mysqld_safe &#8211;user=root<\/p>\n<p>\u6ce8\u610f\uff1a \u6267\u884c\u5b8c\u8fd9\u4e2a\u547d\u4ee4\u540e\uff0c\u4f1a\u5728\/tmp\u4ea7\u751f\u4e00\u4e2amysql.sock \u7684\u6587\u4ef6 \u8fd9\u662f\u8bbf\u95eemysql\u5fc5\u987b\u7684\uff01<\/p>\n<p>\u6b64\u65f6\u5982\u679c\u6ca1\u6709\u51fa\u73b0\u201c\u2026\u2026ended\u201d\u5b57\u6837\uff0c\u5927\u529f\u544a\u6210\uff01<\/p>\n<p>\u4e5f\u53ef\u4ee5\u901a\u8fc7\u6267\u884c<\/p>\n<p># sudo \/usr\/local\/mysql\/support-files\/mysql.server<\/p>\n<p><strong>\u6b64\u65f6\u53ef\u4ee5\uff1a<\/strong><\/p>\n<p>l \u901a\u8fc7 shell&gt;netstat \u2013atln \u547d\u4ee4\u67e5\u770b3306\u7aef\u53e3\u662f\u5426\u5df2\u7ecf\u542f\u7528<\/p>\n<p>l \u4e5f\u53ef\u4ee5 shell&gt;ps -ef | grep mysqld \u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u4e2d\u7684mysqld\u7684\u8fdb\u7a0b<\/p>\n<p>l \u6216\u76f4\u63a5 shell&gt;bin\/mysql \u2013u root \u8fdb\u5165mysql\u5ba2\u6237\u7aef\uff0c\u8fdb\u884cmysql\u64cd\u4f5c<\/p>\n<p>l \u6216shell&gt;bin\/mysqladmin shutdown \u505c\u6b62mysql\u670d\u52a1<\/p>\n<p>MySQL\u5ba2\u6237\u7aef\u5e38\u7528\u547d\u4ee4\uff1a<\/p>\n<p>create database discuz\u00a0 \u521b\u5efa\u6570\u636e\u5e93<\/p>\n<p>show databases \u663e\u793a\u6240\u6709\u6570\u636e\u5e93<\/p><\/blockquote>\n<p>5.\u5728\u5b89\u88c5PHP\u4e4b\u95f4\u5b89\u88c5GD\u5e93\u548cZLIB\u7ec4\u4ef6<\/p>\n<blockquote><p>\u5b89\u88c5GD\u5e93\uff0c\u5c06gd-2.0.35.tar.gz\u89e3\u538b\u5230\u4e34\u65f6\u76ee\u5f55\/tmp\u4e0b<\/p>\n<p>#cd\u00a0 \/tmp\/gd-2.0.35<\/p>\n<p>\u6267\u884c<\/p>\n<p>#.\/configure &#8211;prefix=\/usr\/local\/gd<\/p>\n<p>#make<\/p>\n<p>#make install<\/p>\n<p>\u5b89\u88c5zlib\u5e93<\/p>\n<p>tar -xzvf zlib-1.2.3.tar.gz\uff0c\u5c06gd-2.0.35.tar.gz\u89e3\u538b\u5230\u4e34\u65f6\u76ee\u5f55\/tmp\u4e0b<\/p>\n<p>\u7136\u540e.\/configure &#8211;prefix=\/usr\/local\/zlib<\/p>\n<p>make<\/p>\n<p>make install \u5b89\u88c5<\/p><\/blockquote>\n<p>6.\u5b89\u88c5PHP5.2.6<\/p>\n<blockquote><p>\u5c06php-5.2.6.tar.gz\u89e3\u538b\u5230\u4e34\u65f6\u76ee\u5f55\/tmp\u4e0b<\/p>\n<p>#cd\u00a0 \/tmp\/php-5.2.6<\/p>\n<p>\u6267\u884c<\/p>\n<p>#.\/configure &#8211;prefix=\/usr\/local\/php &#8211;with-mysql=\/usr\/local\/mysql\u00a0 &#8211;with-apxs2=\/usr\/local\/apache\/bin\/apxs\u00a0\u00a0 &#8211;with-zlib-dir=\/usr\/local\/zlib\u00a0 &#8211;with-gd=\/usr\/local\/gd<\/p>\n<p><em>\u5982\u679c\u63d0\u793alibxm2\u672a\u53d1\u73b0\u7684\u8bdd\uff0c\u5148\u6267\u884capt-get install libxml2 libxml2-dev<\/em><\/p>\n<p>\u63a5\u4e0b\u6765\u6267\u884cmake,male install,\u5b8c\u6210\u5b89\u88c5\u8fc7\u7a0b<\/p>\n<p>\u62f7\u8d1dPHP\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>cp php.ini-dist \/usr\/local\/php\/lib\/php.ini<\/p><\/blockquote>\n<p>7.\u914d\u7f6e\uff0c\u4f7f\u5f97Apache\u652f\u6301php<\/p>\n<blockquote><p>\u4fee\u6539\/usr\/local\/apache\/conf\/\u76ee\u5f55\u4e0b\u7684httpd.conf\u6587\u4ef6<\/p>\n<p>AddType application\/x-httpd-php .php\u00a0\u00a0 #\u5df2\u7ecf\u53ef\u4ee5\u652f\u6301php\u4e86\uff0c\u6211\u4eec\u5fc5\u987b\u8981\u5728\u4e3b\u914d\u7f6e\u6587\u4ef6#\u4e2d\u52a0\u5165\u8fd9\u4e24\u884c<\/p>\n<p>AddType application\/x-httpd-php-source .phps<\/p>\n<p>\u7136\u540e\u91cd\u65b0\u542f\u52a8Apache\u670d\u52a1\u5c31\u53ef\u4ee5\u4e86\u3002<\/p><\/blockquote>\n<p>\u73b0\u5728\u5b8c\u6574\u7684\u5b89\u88c5\u5c31\u5b8c\u6210\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LAMP\u7ec4\u5408\uff08LINUX+APACHE_MYSQL+PHP\uff09\u662f\u5f53\u4eca\u6d41\u884c\u7684\u514d\u8d39WEBSERVER\u5e94\u7528\u5e73\u53f0\u89e3\u51b3\u65b9\u6848 &hellip; <a href=\"https:\/\/www.pdbeta.com\/wpblog\/?p=230\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">UBUNTU 8.04\u4e0b\u6784\u5efaLAMP\u73af\u5883(20090803\u66f4\u65b0)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=\/wp\/v2\/posts\/230"}],"collection":[{"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230"}],"version-history":[{"count":9,"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions"}],"predecessor-version":[{"id":2280,"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions\/2280"}],"wp:attachment":[{"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pdbeta.com\/wpblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}