{"id":162651,"date":"2012-12-14T21:39:03","date_gmt":"2012-12-14T17:39:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=162651"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=162651","title":{"rendered":"<span class=\"post_title\">\u0412\u0435\u0431-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c Raspberry Pi GPIO<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a! \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Raspberry Pi. \u0412\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b9a\/12c\/d6a\/b9a12cd6ac6bed24ead5e8a83d3f41e4.jpg\"\/><\/p>\n<p>  <b>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/b>:  <\/p>\n<ul>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Raspberry Pi, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <\/li>\n<li>\u0411\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 MySQL \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/li>\n<li>\u0412\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Apache2, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/li>\n<\/ul>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u0428\u0430\u0433 1. \u0411\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u0439<\/h4>\n<p>  \u042d\u0442\u043e \u0443\u0436\u0435 <b>\u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c<\/b> \u043d\u0430 \u0432\u0430\u0448\u0435\u043c Raspberry Pi:  <\/p>\n<ul>\n<li>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 Apache<\/li>\n<li>PHP5<\/li>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440 MySQL<\/li>\n<li>phpMyAdmin<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c, \u0432\u0430\u043c <a href=\"http:\/\/www.instructables.com\/id\/Raspberry-Pi-Web-Server\/\">\u0441\u044e\u0434\u0430<\/a> (\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435).<\/p>\n<h4>\u0428\u0430\u0433 2. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 root \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430<\/h4>\n<p>  \u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u044d\u0442\u043e, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0435 \ud83d\ude42<\/p>\n<p>  \u0412\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 Raspberry Pi \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<br \/>  <code>sudo -i<\/code><br \/>  <code>passwd root<\/code><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<br \/>  \u0417\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044c SSH \u0441\u0435\u0441\u0441\u0438\u0438 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e, \u0432\u043e\u0439\u0434\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u0430\u043a root.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/250\/929\/2b4\/2509292b4bc659728fb21f9df2adb22e.jpg\"\/><\/p>\n<h4>\u0428\u0430\u0433 3. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 phpMyAdmin<\/h4>\n<p>  \u042d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 MySQL, \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u0445 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 <a href=\"http:\/\/raspberrypi-gpio.googlecode.com\/files\/gpio.sql\">\u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b<\/a>.<\/p>\n<p>  \u0417\u0430\u043b\u043e\u0433\u0438\u043d\u044c\u0442\u0435\u0441\u044c \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f phpMyAdmin \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;<b>Import<\/b>&quot; \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043c\u0435\u043d\u044e.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 &quot;<b>File to Import<\/b>&quot;, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;<b>Choose File<\/b>&quot; \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u0430\u0447\u0430\u043b\u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e (gpio.sql).<br \/>  \u0418 \u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;<b>Go<\/b>&quot; \u0432\u043d\u0438\u0437\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<br \/>  \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/08c\/363\/ff3\/08c363ff376588e7afde5dd6559826ef.jpg\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/679\/8a6\/be3\/6798a6be3f84a6fe04989cdba58a7b27.jpg\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f phpMyAdmin. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442:  <\/p>\n<ul>\n<li>\u041a\u043b\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0430 &quot;<b>Users<\/b>&quot; \u0432\u0432\u0435\u0440\u0445\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. <\/li>\n<li>\u0422\u0435\u043f\u0435\u0440\u044c \u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0443 &quot;<b>Add User<\/b>&quot;. <\/li>\n<li>\u0412 \u043f\u043e\u043b\u0435 &quot;<b>User name<\/b>&quot; \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u043e\u0435 \u0432\u0430\u043c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0423 \u0432\u0432\u0451\u043b &quot;<b>gpio<\/b>&quot;. <\/li>\n<li>\u0412 \u043f\u043e\u043b\u0435 &quot;<b>Host<\/b>&quot; \u0432\u0432\u0435\u0434\u0438\u0442\u0435 &quot;<b>localhost<\/b>&quot;. <\/li>\n<li>\u0417\u0430\u0442\u0435\u043c \u0432 \u0434\u0432\u0443\u0445 \u043f\u043e\u043b\u044f\u0445 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u0438. (\u0411\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432, \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u0432 \u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432). \u042f \u0432\u0432\u0451\u043b &quot;<b>pr03ND2<\/b>&quot;. <\/li>\n<li>\u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;<b>Add User<\/b>&quot; \u043a\u043d\u043e\u043f\u043a\u0443 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0433\u043b\u0443. <\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/76b\/9ae\/6ca\/76b9ae6ca148cb142a7ec859160456d1.jpg\"\/><\/p>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u0442\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u043d\u0443\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438.  <\/p>\n<ul>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;<b>Users<\/b>&quot; \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043c\u0435\u043d\u044e, \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u0432\u043d\u0438\u0437 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0432\u044b \u043d\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 &quot;<b>Users Overview<\/b>&quot;.<\/li>\n<li>\u041d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0443 &quot;<b>Edit Privileges<\/b>&quot;.<\/li>\n<li>\u041b\u0438\u0441\u0442\u0430\u0439\u0442\u0435 \u0432\u043d\u0438\u0437\u0443 \u043a \u043f\u0443\u043d\u043a\u0442\u0443 &quot;<b>Database-specific privileges<\/b>&quot; \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 &quot;<b>gpio<\/b>&quot; \u0438\u0437 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;<b>Go<\/b>&quot;.<\/li>\n<li>\u041e\u0442\u043c\u0435\u0442\u044c\u0442\u0435 \u0412\u0421\u0415 \u0444\u043b\u0430\u0436\u043a\u0438 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;<b>Go<\/b>&quot; \u0441\u043b\u0435\u0432\u0430 \u0441\u043d\u0438\u0437\u0443.<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/37d\/863\/532\/37d86353214ab6baf4357d66f8bd72ad.jpg\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/91f\/289\/6eb\/91f2896eb6203a417bd12b910bc1c271.jpg\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/5b6\/5a8\/b9b\/5b65a8b9b1a419f6e5325be620611cd3.jpg\"\/><\/p>\n<h4>\u0428\u0430\u0433 4. Shell Script<\/h4>\n<p>  \u042d\u0442\u043e \u0442\u0430 \u0447\u0430\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MySQL \u043d\u0430 Raspberry Pi. <br \/>  \u042d\u0442\u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442, \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>  \u0421\u043f\u0435\u0440\u0432\u0430 \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442, \u0432\u0432\u0435\u0434\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u043d\u0430 Raspberry Pi):  <\/p>\n<ul>\n<li><code>sudo -i<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter<\/li>\n<li><code>wget http:\/\/raspberrypi-gpio.googlecode.com\/files\/GPIOServer.sh<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043d \u044d\u0442\u043e \u0441\u043a\u0430\u0447\u0430\u0435\u0442, \u0432\u0432\u0435\u0434\u0438\u0442\u0435  <\/p>\n<ul>\n<li><code>chmod +x GPIOServer.sh<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter<\/li>\n<li><code>nano GPIOServer.sh<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter<\/li>\n<\/ul>\n<p>  \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/2cb\/51c\/547\/2cb51c5478485987edad028903f8219d.jpg\"\/><\/p>\n<p>  \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0430\u0439\u043b\u0430:  <\/p>\n<ul>\n<li><code>mysqlusername=&quot;\u0417\u0414\u0415\u0421\u042c \u0418\u041c\u042f \u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f&quot;<\/code><\/li>\n<li><code>mysqlpassword=&quot;\u0417\u0414\u0415\u0421\u042c \u041f\u0410\u0420\u041e\u041b\u042c&quot;<\/code><\/li>\n<\/ul>\n<p>  \u0418\u0445 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432 phpMyAdmin.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/57c\/f22\/cbf\/57cf22cbf25ac9869362ae198f25a110.jpg\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0451 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438, \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0443 <b>Ctrl<\/b> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <b>X<\/b>, \u0437\u0430\u0442\u0435\u043c \u043e\u0442\u043f\u0443\u0441\u0442\u0438\u0442\u0435 <b>Ctrl<\/b> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <b>Y<\/b>. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter.<\/p>\n<h4>\u0428\u0430\u0433 5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>  \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e, \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0443\u0431\u0435\u0434\u0438\u0432\u0448\u0438\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0435\u043d\u044b (\u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0439\u0442\u0435 <code>sudo -i<\/code>).:  <\/p>\n<ul>\n<li><code>wget http:\/\/raspberrypi-gpio.googlecode.com\/files\/control.php<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter<\/li>\n<li><code>wget http:\/\/raspberrypi-gpio.googlecode.com\/files\/off.jpg<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter<\/li>\n<li><code>wget http:\/\/raspberrypi-gpio.googlecode.com\/files\/on.jpg<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/2cb\/51c\/547\/2cb51c5478485987edad028903f8219d.jpg\"\/><\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0441\u043a\u0430\u0447\u0430\u044e\u0442\u0441\u044f, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432\u043e\u0442 \u044d\u0442\u043e:  <\/p>\n<ul>\n<li><code>mv control.php \/var\/www\/control.php<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter.<\/li>\n<li><code>chmod 755 \/var\/www\/control.php<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter.<\/li>\n<li><code>mv off.jpg \/var\/www\/off.jpg<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435Return \/ Enter.<\/li>\n<li><code>chmod 755 \/var\/www\/off.jpg<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter.<\/li>\n<li><code>mv on.jpg \/var\/www\/on.jpg<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter.<\/li>\n<li><code>chmod 755 \/var\/www\/on.jpg<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter.<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/2cb\/51c\/547\/2cb51c5478485987edad028903f8219d.jpg\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0430\u0439\u043b\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 <code>nano \/var\/www\/control.php<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter.<\/p>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:  <\/p>\n<ul>\n<li><code>$MySQLUsername = &quot;\u0417\u0414\u0415\u0421\u042c \u0418\u041c\u042f \u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u0415\u041b\u042f&quot;;<\/code><\/li>\n<li><code>$MySQLPassword = &quot;\u0417\u0414\u0415\u0421\u042c \u041f\u0410\u0420\u041e\u041b\u042c&quot;;<\/code><\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/ac5\/021\/b7e\/ac5021b7eb74972805a688837bfa1653.jpg\"\/><\/p>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 control.php (\u0443 \u043c\u0435\u043d\u044f <a href=\"http:\/\/raspberryPi\/control.php\">raspberryPi\/control.php<\/a>, \u0433\u0434\u0435 raspberryPi \u2014 \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430.)<\/p>\n<p>  \u0422\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<br \/>  \u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: <b>admin<\/b><br \/>  \u041f\u0430\u0440\u043e\u043b\u044c: <b>gpio<\/b><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/570\/fa7\/878\/570fa7878225a122d3c67dd5fb6f3da7.jpg\"\/><\/p>\n<p>  \u042f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0443 \u00abChange Password\u00bb \u0441\u0432\u0435\u0440\u0445\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/d1f\/2e5\/a3f\/d1f2e5a3f9a6936fa88fff52a660b079.jpg\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/7d2\/c26\/1f5\/7d2c261f55830c46ed97ad03a4cda02e.jpg\"\/><\/p>\n<h4>\u0428\u0430\u0433 6. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b GPIO, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<br \/>  \u041d\u0430\u0447\u043d\u0438\u0442\u0435 SSH \u0441\u0435\u0441\u0441\u0438\u044e \u043d\u0430 Raspberry Pi \u0438 \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u044c\u0442\u0435\u0441\u044c \u043a\u0430\u043a root, \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0439\u0442\u0435 <code>.\/GPIOServer.sh<\/code> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Return \/ Enter.<\/p>\n<p>  \u041e\u043d \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f, \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u043e, \u0447\u0435\u043c \u043a\u043e\u0440\u043e\u0447\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c (\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e 5).<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/46f\/34d\/2e5\/46f34d2e5eeb762de7ea3defa0f69b7e.jpg\"\/><\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (http:\/\/\u0418\u041c\u042f \u0425\u041e\u0421\u0422\u0410\/control.php) \u0438 \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0439\u0442\u0435\u0441\u044c!<\/p>\n<p>  <i>\u0414\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c root \u0430\u043a\u043a\u0430\u0443\u043d\u0442.<\/i>          \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/162651\/\"> http:\/\/habrahabr.ru\/post\/162651\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a! \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Raspberry Pi. \u0412\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b9a\/12c\/d6a\/b9a12cd6ac6bed24ead5e8a83d3f41e4.jpg\"\/><\/p>\n<p>  <b>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/b>:  <\/p>\n<ul>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Raspberry Pi, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <\/li>\n<li>\u0411\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 MySQL \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/li>\n<li>\u0412\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Apache2, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/li>\n<\/ul>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-162651","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/162651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=162651"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/162651\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=162651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=162651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=162651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}