{"id":320889,"date":"2021-04-05T15:00:50","date_gmt":"2021-04-05T15:00:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320889"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320889","title":{"rendered":"Speedtest on premise"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u043b\u0443\u0447\u0448\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u2014 iperf. \u041d\u043e \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u043d\u0435 \u0438\u0434\u0435\u0442 \u043e \u0442\u043e\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435, \u043e\u043d \u0441\u043b\u043e\u0436\u0435\u043d \u0434\u043b\u044f \u0440\u044f\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0434\u0430 \u0438 \u043d\u0435\u043f\u0440\u043e\u0444\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u0418\u0422 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0443 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u00ab\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f\u00bb \u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043f\u043b\u043e\u0445\u043e, \u0442.&nbsp;\u043a. \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u043f\u0440., \u0433\u0438\u0433\u0430\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u043b\u0438\u043d\u043a\u0430 \u041f\u041a \u043e\u0442 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0434\u043e \u0432\u0430\u0448\u0435\u0433\u043e \u0426\u041e\u0414. Ookla \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 self-hosted \u043d\u043e\u0434\u044b speedtest. \u0420\u0430\u043d\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f Speedtest mini \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 Speedtest Custom, \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c. \u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u0442\u043e\u0438\u0442 $1995\/\u0433\u043e\u0434 \u0434\u043b\u044f 1-\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 &#8212; \u043c\u0435\u0442\u043e\u0434 \u0441\u043e\u0432\u0441\u0435\u043c \u0433\u0440\u0443\u0431\u044b\u0439, \u0442.&nbsp;\u043a. \u0437\u0430\u0441\u0435\u043a\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u0432\u043c\u0435\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441 \u0438 \u043a\u044d\u0448 \u043f\u0440\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c \u0438\u043b\u0438 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443. \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 LAN Speed Test, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 Lite \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u041d\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0447\u0435\u0433\u043e-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e, \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e, \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u041f\u041e \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/awesomeopensource.com\/\" rel=\"noopener noreferrer nofollow\">Awesome Open Source<\/a>  \u043f\u043e\u043f\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/awesomeopensource.com\/project\/librespeed\/speedtest\" rel=\"noopener noreferrer nofollow\">Librespeed<\/a>. Self-hosted, HTML5, PHP, \u043e\u0434\u043d\u043e- \u0438 \u043c\u043d\u043e\u0433\u043e\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430, \u043b\u0435\u0433\u043a\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 \u0438\u043b\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/librespeed.org\/\" rel=\"noopener noreferrer nofollow\">https:\/\/librespeed.org\/<\/a><\/p>\n<ul>\n<li>\n<p>\u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430: \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e; \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438: \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u0431-\u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440, \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438, \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430; \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 L7 (HTTP(S)), \u0430 \u043d\u0435 L2 (Ethernet \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435).<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0435\u0431-\u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440 \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c Ethernet-\u043b\u0438\u043d\u043a\u0430. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 tcp\/ip \u043e\u043f\u0438\u0441\u0430\u043d\u044b, \u043d\u0430\u043f\u0440., \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u00ab<a href=\"https:\/\/habr.com\/ru\/post\/115527\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u043e TCP<\/a>\u00bb, \u0441\u044e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e HTTP, \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f. &#171;Ping&#187; \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 http  \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438 \u0442.\u0434. \u0412 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0443\u0442\u043e\u0447\u043d\u044f\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0430 \u043d\u0435 \u043e\u0442 \u043f\u0440\u043e\u043a\u0441\u0438. \ud83d\ude42<\/p>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<ol>\n<li>\n<p><a href=\"#install_apache\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 (Apache).<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#install_nginx\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 nginx (\u043d\u0430 \u0432\u044b\u0431\u043e\u0440).<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#setup_db\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0411\u0414 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#create_db\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0411\u0414.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#create_table\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432 \u0411\u0414 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#setup_db_connection\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#setup_firewall\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#start_apache\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043f\u0443\u0441\u043a \u0410\u043f\u0430\u0447\u0430.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#first_run\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#personalisation\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#cleanup\" rel=\"noopener noreferrer nofollow\">\u041e\u0447\u0438\u0441\u0442\u043a\u0430.<\/a><\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f &#8212; \u043d\u0430 <a href=\"https:\/\/github.com\/librespeed\/speedtest\/blob\/master\/doc.md\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>, \u043d\u0438\u0436\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043d\u0430 CentOS 7 \u0438 Apache, \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u043b\u0435\u043c\u0435\u0442\u0440\u0438\u0438 \u0432 MariaDB. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0433\u043b\u0430\u0432\u0430 \u0434\u043b\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u0442\u0435\u043b\u0435\u0439 nginx.<\/p>\n<p>\u041d\u0430 \u0447\u0438\u0441\u0442\u043e\u0439 \u041e\u0421 \u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 (\u0434\u043e)\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0442\u044c, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435, \u0434\u043b\u044f \u0412\u041c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. SELinux \u0438 \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e!<\/p>\n<p><a class=\"anchor\" name=\"install_apache\" id=\"install_apache\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 (Apache)<\/h2>\n<p>\u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<p><code>$ sudo yum install vim git httpd php php-gd php-mysql mariadb-server mod_ssl<\/code><\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u0434\u0435\u043b\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<p><code>$ cd \/opt\/ &amp;&amp; sudo git clone https:\/\/github.com\/librespeed\/speedtest\/<\/code><\/p>\n<p><code>$ sudo tar czf \/opt\/speedtest.`date +%F`.tgz \/opt\/speedtest\/<\/code><\/p>\n<p><code>$ sudo cp -RZ \/opt\/speedtest\/* \/var\/www\/html\/<\/code><\/p>\n<p>\u0412 php.ini \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 post_max_size \u0434\u043e 20 \u041c\u0438\u0411 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435<\/p>\n<p><code>$ sudo vim \/etc\/php.ini<\/code><\/p>\n<p>post_max_size = <strong>20<\/strong>M<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0434\u043b\u044f \u0410\u043f\u0430\u0447\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0447\u0442\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430.<\/p>\n<p><a class=\"anchor\" name=\"install_nginx\" id=\"install_nginx\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 (nginx, \u043d\u0430 \u0432\u044b\u0431\u043e\u0440)<\/h2>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u042d\u043d\u0436\u0438\u043d\u044d\u043a\u0441\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b <a href=\"https:\/\/www.cnblogs.com\/lsgxeva\/p\/14079107.html\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<p><code>$ sudo yum install nginx php-fpm<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/summary>\n<div class=\"spoiler__content\">\n<p><code>$ sudo cp \/etc\/nginx\/nginx.conf \/etc\/nginx\/nginx.conf.`date +%F`<\/code><\/p>\n<p><code>$ sudo cp \/etc\/php-fpm.d\/www.conf \/etc\/php-fpm.d\/www.conf.`date +%F`<\/code><\/p>\n<p><code>$ sudo cp \/etc\/php.ini \/etc\/php.ini.`<\/code>date +%F`<\/p>\n<\/div>\n<\/details>\n<p>\u041c\u0435\u043d\u044f\u0435\u043c \u0441\u0435\u043a\u0446\u0438\u044e {server} nginx<\/p>\n<details class=\"spoiler\">\n<summary>$ sudo vim \/etc\/nginx\/nginx.conf<\/summary>\n<div class=\"spoiler__content\">\n<p>     server {         listen       8080;         listen       [::]:8080;         server_name  _;         root         \/opt\/speedtest;          # Load configuration files for the default server block.         include \/etc\/nginx\/default.d\/*.conf;          location \/ {                 index   index.html index.htm index.php;         }          # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000         location ~ \\.php$ {                 fastcgi_pass   127.0.0.1:9000;                 fastcgi_index  index.php;                 fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;                 include        fastcgi_params;         }          error_page 404 \/404.html;         location = \/404.html {         }          error_page 500 502 503 504 \/50x.html;         location = \/50x.html {         }     }<\/p>\n<\/div>\n<\/details>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f PHP-FPM<\/p>\n<details class=\"spoiler\">\n<summary>$ sudo vim \/etc\/php.ini<\/summary>\n<div class=\"spoiler__content\">\n<p>; cgi.fix_pathinfo provides *real* PATH_INFO\/PATH_TRANSLATED support for CGI.  PHP&#8217;s ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok ; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting ; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting ; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. ; http:\/\/php.net\/cgi.fix-pathinfo <strong>cgi.fix_pathinfo=0<\/strong><\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>$ sudo vim \/etc\/php-fpm.d\/www.conf<\/summary>\n<div class=\"spoiler__content\">\n<p>; Unix user\/group of processes ; Note: The user is mandatory. If the group is not set, the default user&#8217;s group ;       will be used. ; RPM: apache Choosed to be able to access some dir as httpd <strong>user = nginx<\/strong> ; RPM: Keep a group allowed to write in log dir. <strong>group = nginx<\/strong><\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/p>\n<p><code>$ sudo firewall-cmd --permanent --add-port=8080\/tcp<\/code><\/p>\n<p><code>$ sudo firewall-cmd --reload<\/code><\/p>\n<p><code>$ sudo systemctl --now enable php-fpm.service nginx.service<\/code><\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043a\u043e\u0440\u0435\u043d\u044c \u0441\u0430\u0439\u0442\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440\u0430 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432 \/opt\/speedtest, \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043c \u0438 \u043f\u0440\u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. ))<\/p>\n<p><a class=\"anchor\" name=\"setup_db\" id=\"setup_db\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0411\u0414 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/h2>\n<p><em>\u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430, \u0448\u0430\u0433 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/em><\/p>\n<p><em>\u0411\u0414 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u043b\u043e\u0434\u0438\u0442\u044c, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0443\u044e\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u041d\u0438\u0436\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0414.<\/em><\/p>\n<p><code>$ sudo systemctl enable mariadb.service<\/code><\/p>\n<p><code>$ sudo systemctl start mariadb.service<\/code><\/p>\n<p><code>$ sudo mysql_secure_installation<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>Enter current password for root (enter for none): <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>Set root password? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>New password: <strong>&lt;EnterYourNewPasswordHere&gt;<\/strong><\/p>\n<p>Re-enter new password: <strong>&lt;RepeatYourNewPasswordHere&gt;<\/strong><\/p>\n<p>Remove anonymous users? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>Disallow root login remotely? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>Remove test database and access to it? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>Reload privilege tables now? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"create_db\" id=\"create_db\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0411\u0414<\/h2>\n<p><code>$ mysql -u root -p<\/code><\/p>\n<p><code>MariaDB [(none)]&gt; CREATE SCHEMA stats;<\/code><\/p>\n<p><code>MariaDB [(none)]&gt; USE stats;<\/code><\/p>\n<p><code>MariaDB [stats]&gt; CREATE USER 'my_user'@'localhost' IDENTIFIED BY 'myReallyStrongPA$$';<\/code><\/p>\n<p><code>Query OK, 0 rows affected (0.00 sec)<\/code><\/p>\n<p><code>MariaDB [stats]&gt; GRANT ALL PRIVILEGES ON stats.* TO 'my_user'@'localhost';<\/code><\/p>\n<p><code>Query OK, 0 rows affected (0.00 sec)<\/code><\/p>\n<p><code>MariaDB [stats]&gt; FLUSH PRIVILEGES;<\/code><\/p>\n<p><code>Query OK, 0 rows affected (0.00 sec)<\/code><\/p>\n<p><code>^d<\/code><\/p>\n<p><code>MariaDB [stats]&gt; Bye<\/code><\/p>\n<p><a class=\"anchor\" name=\"create_table\" id=\"create_table\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432 \u0411\u0414 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/h2>\n<p><code>$ mysql -u my_user -pmyReallyStrongPA\\$\\$ stats &lt; \/var\/www\/html\/results\/telemetry_mysql.sql<\/code><\/p>\n<p><em>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u0430\u0440\u043e\u043b\u044f \u0441 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/em><\/p>\n<p><a class=\"anchor\" name=\"setup_db_connection\" id=\"setup_db_connection\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414<\/h2>\n<p><code>$ sudo vim \/var\/www\/html\/results\/telemetry_settings.php<\/code><\/p>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043c\u0435\u043d\u044f\u0435\u043c 5 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<p><code>$stats_password = 'myP@$$';<\/code><\/p>\n<p><code>$MySql_username = 'my_user';<\/code><\/p>\n<p><code>$MySql_password = 'myReallyStrongPA$$';<\/code><\/p>\n<p><code>$MySql_hostname = 'localhost';<\/code><\/p>\n<p><code>$MySql_databasename = 'stats';<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>&lt;?php<\/p>\n<p>\/\/ Type of db: &#171;mysql&#187;, &#171;sqlite&#187; or &#171;postgresql&#187;<\/p>\n<p>$db_type = &#8216;mysql&#8217;;<\/p>\n<p>\/\/ Password to login to stats.php. Change this!!!<\/p>\n<p>$stats_password = &#8216;<strong>myP@$$<\/strong>&#8216;;<\/p>\n<p>\/\/ If set to true, test IDs will be obfuscated to prevent users from guessing URLs of other tests<\/p>\n<p>$enable_id_obfuscation = false;<\/p>\n<p>\/\/ If set to true, IP addresses will be redacted from IP and ISP info fields, as well as the log<\/p>\n<p>$redact_ip_addresses = false;<\/p>\n<p>\/\/ Sqlite3 settings<\/p>\n<p>$Sqlite_db_file = &#8216;..\/..\/speedtest_telemetry.sql&#8217;;<\/p>\n<p>\/\/ Mysql settings<\/p>\n<p>$MySql_username = &#8216;<strong>my_user<\/strong>&#8216;;<\/p>\n<p>$MySql_password = &#8216;<strong>myReallyStrongPA$$<\/strong>&#8216;;<\/p>\n<p>$MySql_hostname = &#8216;<strong>localhost<\/strong>&#8216;;<\/p>\n<p>$MySql_databasename = &#8216;<strong>stats<\/strong>&#8216;;<\/p>\n<p>$MySql_port = &#8216;3306&#8217;;<\/p>\n<p>\/\/ Postgresql settings<\/p>\n<p>$PostgreSql_username = &#8216;USERNAME&#8217;;<\/p>\n<p>$PostgreSql_password = &#8216;PASSWORD&#8217;;<\/p>\n<p>$PostgreSql_hostname = &#8216;DB_HOSTNAME&#8217;;<\/p>\n<p>$PostgreSql_databasename = &#8216;DB_NAME&#8217;;<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u0445\u043e\u0434\u0438\u043c \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u2014 Shift+zz.<\/p>\n<p><a class=\"anchor\" name=\"setup_firewall\" id=\"setup_firewall\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430<\/h2>\n<p><code>$ sudo firewall-cmd --add-service=http --add-service=https --permanent<\/code><\/p>\n<p><code>$ sudo firewall-cmd --reload<\/code><\/p>\n<p><code>$ sudo firewall-cmd --list-all<\/code><\/p>\n<p><a class=\"anchor\" name=\"start_apache\" id=\"start_apache\"><\/a><\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u0410\u043f\u0430\u0447\u0430<\/h2>\n<p><code>$ sudo chown -R apache:apache \/var\/www\/html\/<\/code><\/p>\n<p><code>$ sudo systemctl --now enable httpd.service<\/code><\/p>\n<p><em>\u0414\u0430\u043b\u0435\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043d\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0432 \u0432\u0430\u0448\u0435\u043c \u0446\u0435\u043d\u0442\u0440\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/em><\/p>\n<p><a class=\"anchor\" name=\"first_run\" id=\"first_run\"><\/a><\/p>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a<\/h2>\n<p>\u041f\u043e\u0440\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043c\u0435\u0440:<\/p>\n<p>http:\/\/&lt;hostname-or-ip&gt;\/example-singleServer-basic.html<\/p>\n<p>\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/p>\n<p>http:\/\/&lt;hostname-or-ip&gt;\/results\/stats.php<\/p>\n<p><a class=\"anchor\" name=\"personalisation\" id=\"personalisation\"><\/a><\/p>\n<h2>\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0441\u0442\u0430<\/h2>\n<p>\u0412 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0438\u0434\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c9a\/307\/891\/c9a30789166df21da86750ae07ba8379.png\" alt=\"\u0428\u0430\u0431\u043b\u043e\u043d\u044b LibreSpeed\" title=\"\u0428\u0430\u0431\u043b\u043e\u043d\u044b LibreSpeed\" width=\"276\" height=\"200\"><figcaption>\u0428\u0430\u0431\u043b\u043e\u043d\u044b LibreSpeed<\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u0412\u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/summary>\n<div class=\"spoiler__content\">\n<p>example-singleServer-full.html<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/k4\/lh\/1z\/k4lh1zsmiu52lm9cdbapu_cadua.png\" width=\"554\" height=\"801\"><figcaption><\/figcaption><\/figure>\n<p>example-singleServer-chart.html<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l4\/ap\/rz\/l4aprzr8l4vjm2konu4tl8cd0pk.png\" width=\"562\" height=\"403\"><figcaption><\/figcaption><\/figure>\n<p>example-singleServer-progressBar.html<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/53\/8d\/yy\/538dyyo1dahuxnfb42vvym2r-yq.png\" width=\"779\" height=\"292\"><figcaption><\/figcaption><\/figure>\n<p>example-singleServer-pretty.html<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fu\/_h\/pi\/fu_hpifiqp3sxwwez7v_f6j3wty.png\" width=\"752\" height=\"260\"><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p><code>$ sudo cp \/var\/www\/html\/example-singleServer-full.html \/var\/www\/html\/index.html<\/code><\/p>\n<p>\u0412 \u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u00ab\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u00bb \u0438 \u043f\u0440.<\/p>\n<p><code>$ sudo vim \/var\/www\/html\/index.html<\/code><\/p>\n<details class=\"spoiler\">\n<summary>&#171;\u041b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f&#187;<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u043b\u0435\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a (\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438):<\/p>\n<p>162        content:&#187;Start&#187;; -&gt; <strong>\u041d\u0430\u0447\u0430\u0442\u044c<\/strong><\/p>\n<p>165        content:&#187;Abort&#187;; -&gt; <strong>\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c<\/strong><\/p>\n<p>276        &lt;title&gt;LibreSpeed Example&lt;\/title&gt; -&gt; <strong>\u041c\u043e\u0439 \u0441\u0443\u043f\u0435\u0440 \u0442\u0435\u0441\u0442<\/strong><\/p>\n<p>279        &lt;h1&gt;LibreSpeed Example&lt;\/h1&gt; -&gt; <strong>\u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440 \u041e\u041e\u041e \u0410\u0411\u0412<\/strong><\/p>\n<p>282        &lt;a class=&#187;privacy&#187; href=&#187;#&#187; onclick=&#187;I(&#8216;privacyPolicy&#8217;).style.display=&#187;&#187;&gt;Privacy&lt;\/a&gt; -&gt; <strong>dd<\/strong> <em>(\u0443\u0434\u0430\u043b\u0438\u0442\u044c)<\/em><\/p>\n<p>286        &lt;div class=&#187;testName&#187;&gt;Ping&lt;\/div&gt; -&gt; <strong>\u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430<\/strong><\/p>\n<p>291        &lt;div class=&#187;testName&#187;&gt;Jitter&lt;\/div&gt; -&gt; <strong>\u0414\u0440\u043e\u0436\u0436\u0430\u043d\u0438\u0435<\/strong><\/p>\n<p>298        &lt;div class=&#187;testName&#187;&gt;Download&lt;\/div&gt; -&gt; <strong>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/strong><\/p>\n<p>304        &lt;div class=&#187;testName&#187;&gt;Upload&lt;\/div&gt; -&gt; <strong>\u0412\u044b\u0433\u0440\u0443\u0437\u043a\u0430<\/strong><\/p>\n<p>288, 293    &lt;div class=&#187;unit&#187;&gt;ms&lt;\/div&gt; -&gt; <strong>\u041c\u0431\/\u0441<\/strong><\/p>\n<p>301, 307    &lt;div class=&#187;unit&#187;&gt;Mbps&lt;\/div&gt; -&gt; <strong>\u041c\u0431\/\u0441<\/strong><\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u00ab\u0441\u0435\u0440\u044b\u0445\u00bb IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 IP to geo \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438 \u043e\u043d\u043e \u043d\u0430\u043c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0412 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430.<\/p>\n<p><code>$ sudo vim \/var\/www\/html\/backend\/getIP.php<\/code><\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0438 57, 62 \u0438 67<\/p>\n<p><code>return 'private IPv4 access';<\/code><\/p>\n<p>\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>gethostbyaddr<\/code> \u0434\u043e<\/p>\n<p><code>return 'private IPv4 access (' . gethostbyaddr ($ip) . ')';<\/code><\/p>\n<p>\u0412 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 vim \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<p><code>:%s\/return 'private IPv4 access';\/return 'private IPv4 access (' . gethostbyaddr ($ip) . ')';\/g<\/code><\/p>\n<p><a class=\"anchor\" name=\"cleanup\" id=\"cleanup\"><\/a><\/p>\n<h2>\u041e\u0447\u0438\u0441\u0442\u043a\u0430<\/h2>\n<p>\u0414\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<p><code>$ sudo rm -rf \/opt\/speedtest\/ \/var\/www\/html\/docker\/<\/code><\/p>\n<p><code>$ sudo rm -f \/var\/www\/html\/example*html \/var\/www\/html\/results\/telemetry*sql<\/code><\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435, \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0430\u043f\u0442\u0430\u0439\u043c\u0430 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b!<\/p>\n<\/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=\"https:\/\/habr.com\/ru\/post\/550578\/\"> https:\/\/habr.com\/ru\/post\/550578\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u043b\u0443\u0447\u0448\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u2014 iperf. \u041d\u043e \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u043d\u0435 \u0438\u0434\u0435\u0442 \u043e \u0442\u043e\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435, \u043e\u043d \u0441\u043b\u043e\u0436\u0435\u043d \u0434\u043b\u044f \u0440\u044f\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0434\u0430 \u0438 \u043d\u0435\u043f\u0440\u043e\u0444\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u0418\u0422 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0443 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u00ab\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f\u00bb \u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043f\u043b\u043e\u0445\u043e, \u0442.&nbsp;\u043a. \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u043f\u0440., \u0433\u0438\u0433\u0430\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u043b\u0438\u043d\u043a\u0430 \u041f\u041a \u043e\u0442 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0434\u043e \u0432\u0430\u0448\u0435\u0433\u043e \u0426\u041e\u0414. Ookla \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 self-hosted \u043d\u043e\u0434\u044b speedtest. \u0420\u0430\u043d\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f Speedtest mini \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 Speedtest Custom, \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c. \u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u0442\u043e\u0438\u0442 $1995\/\u0433\u043e\u0434 \u0434\u043b\u044f 1-\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 &#8212; \u043c\u0435\u0442\u043e\u0434 \u0441\u043e\u0432\u0441\u0435\u043c \u0433\u0440\u0443\u0431\u044b\u0439, \u0442.&nbsp;\u043a. \u0437\u0430\u0441\u0435\u043a\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u0432\u043c\u0435\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441 \u0438 \u043a\u044d\u0448 \u043f\u0440\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c \u0438\u043b\u0438 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443. \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 LAN Speed Test, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 Lite \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u041d\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0447\u0435\u0433\u043e-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e, \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e, \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u041f\u041e \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/awesomeopensource.com\/\" rel=\"noopener noreferrer nofollow\">Awesome Open Source<\/a>  \u043f\u043e\u043f\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/awesomeopensource.com\/project\/librespeed\/speedtest\" rel=\"noopener noreferrer nofollow\">Librespeed<\/a>. Self-hosted, HTML5, PHP, \u043e\u0434\u043d\u043e- \u0438 \u043c\u043d\u043e\u0433\u043e\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430, \u043b\u0435\u0433\u043a\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 \u0438\u043b\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/librespeed.org\/\" rel=\"noopener noreferrer nofollow\">https:\/\/librespeed.org\/<\/a><\/p>\n<ul>\n<li>\n<p>\u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430: \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e; \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438: \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u0431-\u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440, \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438, \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430; \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 L7 (HTTP(S)), \u0430 \u043d\u0435 L2 (Ethernet \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435).<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0435\u0431-\u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440 \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c Ethernet-\u043b\u0438\u043d\u043a\u0430. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 tcp\/ip \u043e\u043f\u0438\u0441\u0430\u043d\u044b, \u043d\u0430\u043f\u0440., \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u00ab<a href=\"https:\/\/habr.com\/ru\/post\/115527\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u043e TCP<\/a>\u00bb, \u0441\u044e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e HTTP, \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f. &#171;Ping&#187; \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 http  \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438 \u0442.\u0434. \u0412 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0443\u0442\u043e\u0447\u043d\u044f\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0430 \u043d\u0435 \u043e\u0442 \u043f\u0440\u043e\u043a\u0441\u0438. \ud83d\ude42<\/p>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<ol>\n<li>\n<p><a href=\"#install_apache\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 (Apache).<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#install_nginx\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 nginx (\u043d\u0430 \u0432\u044b\u0431\u043e\u0440).<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#setup_db\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0411\u0414 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#create_db\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0411\u0414.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#create_table\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432 \u0411\u0414 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#setup_db_connection\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#setup_firewall\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#start_apache\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043f\u0443\u0441\u043a \u0410\u043f\u0430\u0447\u0430.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#first_run\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#personalisation\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#cleanup\" rel=\"noopener noreferrer nofollow\">\u041e\u0447\u0438\u0441\u0442\u043a\u0430.<\/a><\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f &#8212; \u043d\u0430 <a href=\"https:\/\/github.com\/librespeed\/speedtest\/blob\/master\/doc.md\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>, \u043d\u0438\u0436\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043d\u0430 CentOS 7 \u0438 Apache, \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u043b\u0435\u043c\u0435\u0442\u0440\u0438\u0438 \u0432 MariaDB. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0433\u043b\u0430\u0432\u0430 \u0434\u043b\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u0442\u0435\u043b\u0435\u0439 nginx.<\/p>\n<p>\u041d\u0430 \u0447\u0438\u0441\u0442\u043e\u0439 \u041e\u0421 \u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 (\u0434\u043e)\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0442\u044c, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435, \u0434\u043b\u044f \u0412\u041c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. SELinux \u0438 \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e!<\/p>\n<p><a class=\"anchor\" name=\"install_apache\" id=\"install_apache\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 (Apache)<\/h2>\n<p>\u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<p><code>$ sudo yum install vim git httpd php php-gd php-mysql mariadb-server mod_ssl<\/code><\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u0434\u0435\u043b\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<p><code>$ cd \/opt\/ &amp;&amp; sudo git clone https:\/\/github.com\/librespeed\/speedtest\/<\/code><\/p>\n<p><code>$ sudo tar czf \/opt\/speedtest.`date +%F`.tgz \/opt\/speedtest\/<\/code><\/p>\n<p><code>$ sudo cp -RZ \/opt\/speedtest\/* \/var\/www\/html\/<\/code><\/p>\n<p>\u0412 php.ini \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 post_max_size \u0434\u043e 20 \u041c\u0438\u0411 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435<\/p>\n<p><code>$ sudo vim \/etc\/php.ini<\/code><\/p>\n<p>post_max_size = <strong>20<\/strong>M<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0434\u043b\u044f \u0410\u043f\u0430\u0447\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0447\u0442\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430.<\/p>\n<p><a class=\"anchor\" name=\"install_nginx\" id=\"install_nginx\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 (nginx, \u043d\u0430 \u0432\u044b\u0431\u043e\u0440)<\/h2>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u042d\u043d\u0436\u0438\u043d\u044d\u043a\u0441\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b <a href=\"https:\/\/www.cnblogs.com\/lsgxeva\/p\/14079107.html\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<p><code>$ sudo yum install nginx php-fpm<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/summary>\n<div class=\"spoiler__content\">\n<p><code>$ sudo cp \/etc\/nginx\/nginx.conf \/etc\/nginx\/nginx.conf.`date +%F`<\/code><\/p>\n<p><code>$ sudo cp \/etc\/php-fpm.d\/www.conf \/etc\/php-fpm.d\/www.conf.`date +%F`<\/code><\/p>\n<p><code>$ sudo cp \/etc\/php.ini \/etc\/php.ini.`<\/code>date +%F`<\/p>\n<\/div>\n<\/details>\n<p>\u041c\u0435\u043d\u044f\u0435\u043c \u0441\u0435\u043a\u0446\u0438\u044e {server} nginx<\/p>\n<details class=\"spoiler\">\n<summary>$ sudo vim \/etc\/nginx\/nginx.conf<\/summary>\n<div class=\"spoiler__content\">\n<p>     server {         listen       8080;         listen       [::]:8080;         server_name  _;         root         \/opt\/speedtest;          # Load configuration files for the default server block.         include \/etc\/nginx\/default.d\/*.conf;          location \/ {                 index   index.html index.htm index.php;         }          # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000         location ~ \\.php$ {                 fastcgi_pass   127.0.0.1:9000;                 fastcgi_index  index.php;                 fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;                 include        fastcgi_params;         }          error_page 404 \/404.html;         location = \/404.html {         }          error_page 500 502 503 504 \/50x.html;         location = \/50x.html {         }     }<\/p>\n<\/div>\n<\/details>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f PHP-FPM<\/p>\n<details class=\"spoiler\">\n<summary>$ sudo vim \/etc\/php.ini<\/summary>\n<div class=\"spoiler__content\">\n<p>; cgi.fix_pathinfo provides *real* PATH_INFO\/PATH_TRANSLATED support for CGI.  PHP&#8217;s ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok ; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting ; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting ; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. ; http:\/\/php.net\/cgi.fix-pathinfo <strong>cgi.fix_pathinfo=0<\/strong><\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>$ sudo vim \/etc\/php-fpm.d\/www.conf<\/summary>\n<div class=\"spoiler__content\">\n<p>; Unix user\/group of processes ; Note: The user is mandatory. If the group is not set, the default user&#8217;s group ;       will be used. ; RPM: apache Choosed to be able to access some dir as httpd <strong>user = nginx<\/strong> ; RPM: Keep a group allowed to write in log dir. <strong>group = nginx<\/strong><\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/p>\n<p><code>$ sudo firewall-cmd --permanent --add-port=8080\/tcp<\/code><\/p>\n<p><code>$ sudo firewall-cmd --reload<\/code><\/p>\n<p><code>$ sudo systemctl --now enable php-fpm.service nginx.service<\/code><\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043a\u043e\u0440\u0435\u043d\u044c \u0441\u0430\u0439\u0442\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440\u0430 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432 \/opt\/speedtest, \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043c \u0438 \u043f\u0440\u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. ))<\/p>\n<p><a class=\"anchor\" name=\"setup_db\" id=\"setup_db\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0411\u0414 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/h2>\n<p><em>\u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430, \u0448\u0430\u0433 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/em><\/p>\n<p><em>\u0411\u0414 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u043b\u043e\u0434\u0438\u0442\u044c, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0443\u044e\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u041d\u0438\u0436\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0414.<\/em><\/p>\n<p><code>$ sudo systemctl enable mariadb.service<\/code><\/p>\n<p><code>$ sudo systemctl start mariadb.service<\/code><\/p>\n<p><code>$ sudo mysql_secure_installation<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>Enter current password for root (enter for none): <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>Set root password? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>New password: <strong>&lt;EnterYourNewPasswordHere&gt;<\/strong><\/p>\n<p>Re-enter new password: <strong>&lt;RepeatYourNewPasswordHere&gt;<\/strong><\/p>\n<p>Remove anonymous users? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>Disallow root login remotely? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>Remove test database and access to it? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<p>Reload privilege tables now? [Y\/n] <strong>&lt;Enter&gt;<\/strong><\/p>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"create_db\" id=\"create_db\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0411\u0414<\/h2>\n<p><code>$ mysql -u root -p<\/code><\/p>\n<p><code>MariaDB [(none)]&gt; CREATE SCHEMA stats;<\/code><\/p>\n<p><code>MariaDB [(none)]&gt; USE stats;<\/code><\/p>\n<p><code>MariaDB [stats]&gt; CREATE USER 'my_user'@'localhost' IDENTIFIED BY 'myReallyStrongPA$$';<\/code><\/p>\n<p><code>Query OK, 0 rows affected (0.00 sec)<\/code><\/p>\n<p><code>MariaDB [stats]&gt; GRANT ALL PRIVILEGES ON stats.* TO 'my_user'@'localhost';<\/code><\/p>\n<p><code>Query OK, 0 rows affected (0.00 sec)<\/code><\/p>\n<p><code>MariaDB [stats]&gt; FLUSH PRIVILEGES;<\/code><\/p>\n<p><code>Query OK, 0 rows affected (0.00 sec)<\/code><\/p>\n<p><code>^d<\/code><\/p>\n<p><code>MariaDB [stats]&gt; Bye<\/code><\/p>\n<p><a class=\"anchor\" name=\"create_table\" id=\"create_table\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432 \u0411\u0414 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/h2>\n<p><code>$ mysql -u my_user -pmyReallyStrongPA\\$\\$ stats &lt; \/var\/www\/html\/results\/telemetry_mysql.sql<\/code><\/p>\n<p><em>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u0430\u0440\u043e\u043b\u044f \u0441 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/em><\/p>\n<p><a class=\"anchor\" name=\"setup_db_connection\" id=\"setup_db_connection\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414<\/h2>\n<p><code>$ sudo vim \/var\/www\/html\/results\/telemetry_settings.php<\/code><\/p>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043c\u0435\u043d\u044f\u0435\u043c 5 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<p><code>$stats_password = 'myP@$$';<\/code><\/p>\n<p><code>$MySql_username = 'my_user';<\/code><\/p>\n<p><code>$MySql_password = 'myReallyStrongPA$$';<\/code><\/p>\n<p><code>$MySql_hostname = 'localhost';<\/code><\/p>\n<p><code>$MySql_databasename = 'stats';<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>&lt;?php<\/p>\n<p>\/\/ Type of db: &#171;mysql&#187;, &#171;sqlite&#187; or &#171;postgresql&#187;<\/p>\n<p>$db_type = &#8216;mysql&#8217;;<\/p>\n<p>\/\/ Password to login to stats.php. Change this!!!<\/p>\n<p>$stats_password = &#8216;<strong>myP@$$<\/strong>&#8216;;<\/p>\n<p>\/\/ If set to true, test IDs will be obfuscated to prevent users from guessing URLs of other tests<\/p>\n<p>$enable_id_obfuscation = false;<\/p>\n<p>\/\/ If set to true, IP addresses will be redacted from IP and ISP info fields, as well as the log<\/p>\n<p>$redact_ip_addresses = false;<\/p>\n<p>\/\/ Sqlite3 settings<\/p>\n<p>$Sqlite_db_file = &#8216;..\/..\/speedtest_telemetry.sql&#8217;;<\/p>\n<p>\/\/ Mysql settings<\/p>\n<p>$MySql_username = &#8216;<strong>my_user<\/strong>&#8216;;<\/p>\n<p>$MySql_password = &#8216;<strong>myReallyStrongPA$$<\/strong>&#8216;;<\/p>\n<p>$MySql_hostname = &#8216;<strong>localhost<\/strong>&#8216;;<\/p>\n<p>$MySql_databasename = &#8216;<strong>stats<\/strong>&#8216;;<\/p>\n<p>$MySql_port = &#8216;3306&#8217;;<\/p>\n<p>\/\/ Postgresql settings<\/p>\n<p>$PostgreSql_username = &#8216;USERNAME&#8217;;<\/p>\n<p>$PostgreSql_password = &#8216;PASSWORD&#8217;;<\/p>\n<p>$PostgreSql_hostname = &#8216;DB_HOSTNAME&#8217;;<\/p>\n<p>$PostgreSql_databasename = &#8216;DB_NAME&#8217;;<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u0445\u043e\u0434\u0438\u043c \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u2014 Shift+zz.<\/p>\n<p><a class=\"anchor\" name=\"setup_firewall\" id=\"setup_firewall\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430<\/h2>\n<p><code>$ sudo firewall-cmd --add-service=http --add-service=https --permanent<\/code><\/p>\n<p><code>$ sudo firewall-cmd --reload<\/code><\/p>\n<p><code>$ sudo firewall-cmd --list-all<\/code><\/p>\n<p><a class=\"anchor\" name=\"start_apache\" id=\"start_apache\"><\/a><\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u0410\u043f\u0430\u0447\u0430<\/h2>\n<p><code>$ sudo chown -R apache:apache \/var\/www\/html\/<\/code><\/p>\n<p><code>$ sudo systemctl --now enable httpd.service<\/code><\/p>\n<p><em>\u0414\u0430\u043b\u0435\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043d\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0432 \u0432\u0430\u0448\u0435\u043c \u0446\u0435\u043d\u0442\u0440\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/em><\/p>\n<p><a class=\"anchor\" name=\"first_run\" id=\"first_run\"><\/a><\/p>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a<\/h2>\n<p>\u041f\u043e\u0440\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043c\u0435\u0440:<\/p>\n<p>http:\/\/&lt;hostname-or-ip&gt;\/example-singleServer-basic.html<\/p>\n<p>\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/p>\n<p>http:\/\/&lt;hostname-or-ip&gt;\/results\/stats.php<\/p>\n<p><a class=\"anchor\" name=\"personalisation\" id=\"personalisation\"><\/a><\/p>\n<h2>\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0441\u0442\u0430<\/h2>\n<p>\u0412 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0438\u0434\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/p>\n<figure class=\"\"><figcaption>\u0428\u0430\u0431\u043b\u043e\u043d\u044b LibreSpeed<\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u0412\u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/summary>\n<div class=\"spoiler__content\">\n<p>example-singleServer-full.html<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>example-singleServer-chart.html<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>example-singleServer-progressBar.html<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>example-singleServer-pretty.html<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p><code>$ sudo cp \/var\/www\/html\/example-singleServer-full.html \/var\/www\/html\/index.html<\/code><\/p>\n<p>\u0412 \u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u00ab\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u00bb \u0438 \u043f\u0440.<\/p>\n<p><code>$ sudo vim \/var\/www\/html\/index.html<\/code><\/p>\n<details class=\"spoiler\">\n<summary>&#171;\u041b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f&#187;<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u043b\u0435\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a (\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438):<\/p>\n<p>162        content:&#187;Start&#187;; -&gt; <strong>\u041d\u0430\u0447\u0430\u0442\u044c<\/strong><\/p>\n<p>165        content:&#187;Abort&#187;; -&gt; <strong>\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c<\/strong><\/p>\n<p>276        &lt;title&gt;LibreSpeed Example&lt;\/title&gt; -&gt; <strong>\u041c\u043e\u0439 \u0441\u0443\u043f\u0435\u0440 \u0442\u0435\u0441\u0442<\/strong><\/p>\n<p>279        &lt;h1&gt;LibreSpeed Example&lt;\/h1&gt; -&gt; <strong>\u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u043f\u0438\u0434\u043e\u043c\u0435\u0442\u0440 \u041e\u041e\u041e \u0410\u0411\u0412<\/strong><\/p>\n<p>282        &lt;a class=&#187;privacy&#187; href=&#187;#&#187; onclick=&#187;I(&#8216;privacyPolicy&#8217;).style.display=&#187;&#187;&gt;Privacy&lt;\/a&gt; -&gt; <strong>dd<\/strong> <em>(\u0443\u0434\u0430\u043b\u0438\u0442\u044c)<\/em><\/p>\n<p>286        &lt;div class=&#187;testName&#187;&gt;Ping&lt;\/div&gt; -&gt; <strong>\u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430<\/strong><\/p>\n<p>291        &lt;div class=&#187;testName&#187;&gt;Jitter&lt;\/div&gt; -&gt; <strong>\u0414\u0440\u043e\u0436\u0436\u0430\u043d\u0438\u0435<\/strong><\/p>\n<p>298        &lt;div class=&#187;testName&#187;&gt;Download&lt;\/div&gt; -&gt; <strong>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/strong><\/p>\n<p>304        &lt;div class=&#187;testName&#187;&gt;Upload&lt;\/div&gt; -&gt; <strong>\u0412\u044b\u0433\u0440\u0443\u0437\u043a\u0430<\/strong><\/p>\n<p>288, 293    &lt;div class=&#187;unit&#187;&gt;ms&lt;\/div&gt; -&gt; <strong>\u041c\u0431\/\u0441<\/strong><\/p>\n<p>301, 307    &lt;div class=&#187;unit&#187;&gt;Mbps&lt;\/div&gt; -&gt; <strong>\u041c\u0431\/\u0441<\/strong><\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u00ab\u0441\u0435\u0440\u044b\u0445\u00bb IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 IP to geo \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438 \u043e\u043d\u043e \u043d\u0430\u043c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0412 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430.<\/p>\n<p><code>$ sudo vim \/var\/www\/html\/backend\/getIP.php<\/code><\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0438 57, <\/p>\n<\/div>\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-320889","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320889","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=320889"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320889\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}