{"id":304,"date":"2009-03-03T01:05:22","date_gmt":"2009-03-02T23:05:22","guid":{"rendered":"http:\/\/blog.peychev.net\/?p=304"},"modified":"2009-03-03T01:14:58","modified_gmt":"2009-03-02T23:14:58","slug":"apache2-php5-mysql5","status":"publish","type":"post","link":"https:\/\/blog.peychev.net\/?p=304","title":{"rendered":"Apache2 + PHP5 + MySQL5"},"content":{"rendered":"<p>\u041a\u0430\u043a\u0432\u043e \u043f\u0440\u0430\u0432\u0438\u0445 \u0434\u043d\u0435\u0441&#8230; \u043e\u043a\u0440\u0438\u0432\u0430\u0445 \u0442\u043e\u043f\u043b\u0430\u0442\u0430 \u0432\u043e\u0434\u0430 \u0437\u0430 \u0441\u0435\u0431\u0435 \u0441\u0438:).<\/p>\n<p><strong>\u0418\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 Apache2 \u043d\u0430 Ubuntu-server:<\/strong><\/p>\n<p><em>$ sudo su<br \/>\n$ mkdir -p \/root\/source\/apache2\/<br \/>\n$ cd \/root\/source\/apache2\/<br \/>\n$ apt-get source apache2<br \/>\n$ cd apache2-2.2.8<br \/>\n$ .\/configure &#8211;prefix=\/server\/apache2\/ &amp;&amp; make &amp;&amp; make install<br \/>\n<\/em><\/p>\n<p>Ko\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u0435\u043d \u0444\u0430\u0439\u043b:<br \/>\n\/server\/apache2\/conf\/httpd.conf<\/p>\n<p><strong>\u0418\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 MySQL-server 5:<\/strong><\/p>\n<p><em>$ sudo su<br \/>\n$ apt-get build-dep mysql-server<br \/>\n(\u0442\u0443\u043a \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430 \u043d\u0443\u0436\u043d\u0438\u0442\u0435 \u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0438, \u0437\u0430 \u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0438 \u0431\u0435\u0437\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u043e)<br \/>\n$ mkdir -p \/root\/source\/mysql<br \/>\n$ cd \/root\/source\/mysql<br \/>\n$ wget http:\/\/dev.mysql.com\/get\/Downloads\/MySQL-5.0\/mysql-5.0.77.tar.gz\/from\/http:\/\/mysql.mirror.kangaroot.net\/<br \/>\n(\u0433\u043e\u043b\u044f\u043c \u0437\u043e\u0440 \u0432\u0438\u0434\u044f\u0445 \u0434\u043e\u043a\u0430\u0442\u043e \u0433\u043e \u043e\u0442\u043a\u0440\u0438\u044f \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u043d\u0438\u044f \u0438\u043c \u0441\u0430\u0439\u0442, \u043c\u043d\u043e\u0433\u043e \u0435 \u043d\u0430 \u0437\u0430\u0431\u0443\u0442\u0430\u043d\u043e \u043c\u044f\u0441\u0442\u043e, \u0430 \u0441 &#8220;apt-get source mysql-server&#8221; \u0441\u0432\u0430\u043b\u044f \u043f\u043e-\u0441\u0442\u0430\u0440\u0430 \u0432\u0435\u0440\u0441\u0438\u044f, \u043a\u043e\u044f\u0442\u043e \u0434\u0430\u0432\u0430 \u0433\u0440\u0435\u0448\u043a\u0438 \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0430\u043d\u0435\u0442\u043e)<br \/>\n$ tar -zxf <\/em><em>mysql-5.0.77.tar.gz<br \/>\n$ cd mysql-5.0.77<br \/>\n$ <\/em>.\/configure &#8211;prefix=\/server\/mysql-5.0.77\/ &#8211;sysconfdir=\/server\/mysql-5.0.77\/conf\/<br \/>\n$ make &amp;&amp; make install<br \/>\n$ adduser mysql<br \/>\n$ addgroup mysql<br \/>\n$ chown -R \/server\/mysql-5.0.77\/<br \/>\n$ \/server\/mysql-5.0.77\/bin\/mysqld_safe &#8211;basedir=\/server\/mysql-5.0.77\/ &#8211;datadir=\/server\/mysql-5.0.77\/var\/ &#8211;user=mysql<\/p>\n<p>\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0435:<br \/>\n\/tmp\/mysql.sock &#8211; MySQL socket file<br \/>\n\/server\/mysql-5.0.77\/var\/ &#8211; Databases dir<br \/>\nmax_connections = 100<\/p>\n<p>\u0421\u043f\u043e\u0440\u0435\u0434 \u043d\u0430\u043f\u0440\u0430\u0432\u0435\u043d\u0430\u0442\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435 \u0434\u0430 \u0441\u0435 \u0441\u043b\u043e\u0436\u0438 \u0444\u0430\u0439\u043b \/server\/mysql-5.0.77\/conf\/my.cnf \u0441 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u043d\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u0432\u0441\u0438\u0447\u043a\u043e \u043f\u043e \u0441\u044a\u0440\u0432\u044a\u0440\u0430.<\/p>\n<p><strong>\u0418\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 PHP5 \u043d\u0430 Ubuntu-server:<\/strong><\/p>\n<p><em>$ sudo su<br \/>\n$ mkdir -p \/root\/source\/php\/<br \/>\n$ cd \/root\/source\/php<br \/>\n$ apt-get source php5<br \/>\n$ tar -zxf php5_5.2.4.orig.tar.gz<br \/>\n$ cd php-5.2.4<br \/>\n$ .\/configure &#8211;prefix=\/server\/php-5.2.4 &#8211;with-mysql=\/server\/mysql-5.0.77\/ &#8211;with-mysqli=\/server\/mysql-5.0.77\/bin\/mysql_config &#8211;with-pdo-mysql=\/server\/mysql-5.0.77\/ &#8211;with-apxs2=\/server\/apache2\/bin\/apxs<br \/>\n$ make &amp;&amp; make install<\/em><\/p>\n<p>\u0422\u0430\u043a\u0430 PHP5 \u0441\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430 \u0441 \u043f\u043e\u0434\u0434\u0440\u044a\u0436\u043a\u0430 \u043d\u0430 mysql \u0438 \u0434\u043e\u0431\u0430\u0432\u044f libphp5.so \u0432 \/server\/apache2\/modules\/<em><\/em><\/p>\n<p><strong>\u0421\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 Apache2 \u0441 \u043f\u043e\u0434\u0434\u0440\u044a\u0436\u043a\u0430 \u043d\u0430 PHP5 \u0438 MySQL5:<\/strong><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044f\u043c\u0435 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0438\u044f \u0444\u0430\u0439\u043b \/server\/apache2\/conf\/httpd.conf \u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430 PHP:<\/p>\n<p><em>$ sudo su<br \/>\n<\/em><em>$ nano \/server\/apache2\/conf\/httpd.conf<\/em><\/p>\n<p><em>LoadModule php5_module\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 modules\/libphp5.so<br \/>\n&lt;Files *.php&gt;<br \/>\nSetOutputFilter PHP<br \/>\nSetInputFilter PHP<br \/>\nLimitRequestBody 9524288<br \/>\n&lt;\/Files&gt;<br \/>\nAddType application\/x-httpd-php .php<br \/>\nAddType application\/x-httpd-php-source .phps<br \/>\nDirectoryIndex index.php<br \/>\n<\/em><\/p>\n<p><em>$ \/server\/apache2\/bin\/apachectl -t<\/em><\/p>\n<p><em>\u0422\u0443\u043a \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u043d\u0438 \u0434\u0430\u0434\u0435 &#8220;Syntax OK&#8221;, \u0437\u0430 \u0434\u0430 \u0441\u043c\u0435 \u0441\u0438\u0433\u0443\u0440\u043d\u0438, \u0447\u0435 \u043d\u044f\u043c\u0430\u043c\u0435 \u0433\u0440\u0435\u0448\u043a\u0438 \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u0442\u0435 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0438\u044f \u0444\u0430\u0439\u043b \u0438 \u0441\u043b\u0435\u0434 \u0442\u043e\u0432\u0430 \u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043c\u0435 \u0441\u044a\u0440\u0432\u044a\u0440\u0430<\/em><\/p>\n<p><em>$ \/server\/apache2\/bin\/apachectl start<\/em><\/p>\n<p>\u0418 \u0442\u0430\u043a\u0430 \u0441\u0438 \u0438\u043c\u0430\u043c\u0435 \u0440\u0430\u0431\u043e\u0442\u0435\u0449 Apache2 \u0441 \u043f\u043e\u0434\u0434\u0440\u044a\u0436\u043a\u0430 \u043d\u0430 PHP5 \u0438 MySQL5. \u041f\u043e \u0442\u043e\u0437\u0438 \u043d\u0430\u0447\u0438\u043d \u0441\u0435 \u043e\u0442\u044a\u0440\u0432\u0430\u0445 \u043e\u0442 <a href=\"http:\/\/apachefriends.org\" target=\"_blank\">LAMPP<\/a>, \u043a\u043e\u0439\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e \u0437\u0430\u0449\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u043e \u0432\u0440\u0435\u043c\u0435 \u043e\u0431\u043e\u0436\u0430\u0432\u0430\u0448\u0435 \u0434\u0430 \u0441\u0432\u0430\u043b\u044f \u043c\u0430\u0448\u0438\u043d\u0430\u0442\u0430 \u043a\u0430\u0442\u043e \u044f \u043f\u0440\u0435\u0442\u043e\u0432\u0430\u0440\u0432\u0430. \u041f\u0440\u0438 \u043e\u043d\u043b\u0430\u0439\u043d 30\u0442\u0438\u043d\u0430 \u0447\u043e\u0432\u0435\u043a\u0430 \u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430 \u0431\u0435\u0437\u0431\u0440\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0438 \u043d\u0430 apache-\u0442\u043e, \u043d\u0430\u0442\u043e\u0432\u0430\u0440\u0432\u0430\u043d\u0435\u0442\u043e \u0441\u0442\u0438\u0433\u0430 \u0434\u043e 100-150 \u0438 \u043d\u0430\u043a\u0440\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430\u0442\u0430 &#8220;\u0443\u0432\u0438\u0441\u0432\u0430&#8221;. \u0421\u0435\u0433\u0430 \u0447\u0430\u043a\u0430\u043c \u0434\u0430 \u0432\u0438\u0434\u044f \u043a\u0430\u043a \u0449\u0435 \u0441\u0430 \u043d\u0435\u0449\u0430\u0442\u0430 \u0437\u0430\u043d\u0430\u043f\u0440\u0435\u0434.<\/p>\n<p><em><br \/>\n<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a\u0432\u043e \u043f\u0440\u0430\u0432\u0438\u0445 \u0434\u043d\u0435\u0441&#8230; \u043e\u043a\u0440\u0438\u0432\u0430\u0445 \u0442\u043e\u043f\u043b\u0430\u0442\u0430 \u0432\u043e\u0434\u0430 \u0437\u0430 \u0441\u0435\u0431\u0435 \u0441\u0438:). \u0418\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 Apache2 \u043d\u0430 Ubuntu-server: $ sudo su $ mkdir -p \/root\/source\/apache2\/ $ cd \/root\/source\/apache2\/ $ apt-get source apache2 $ cd apache2-2.2.8 $ .\/configure &#8211;prefix=\/server\/apache2\/ &amp;&amp; make &amp;&amp; make install Ko\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u0435\u043d &hellip; <a href=\"https:\/\/blog.peychev.net\/?p=304\">Continue reading <span class=\"meta-nav\">&rarr;<\/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":[9,3,5],"tags":[298,301,299,300,302],"class_list":["post-304","post","type-post","status-publish","format-standard","hentry","category-it","category-3","category-5","tag-apache","tag-configuration","tag-mysq","tag-php","tag-setup"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.peychev.net\/index.php?rest_route=\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.peychev.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.peychev.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.peychev.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.peychev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304"}],"version-history":[{"count":5,"href":"https:\/\/blog.peychev.net\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions"}],"predecessor-version":[{"id":308,"href":"https:\/\/blog.peychev.net\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions\/308"}],"wp:attachment":[{"href":"https:\/\/blog.peychev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.peychev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.peychev.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}