{"id":354761,"date":"2024-05-20T22:54:53","date_gmt":"2024-05-20T22:54:53","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=354761"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=354761","title":{"rendered":"<span>2.0.\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 NixOS<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u044b\u0448\u043a\u0443 \u0438 \u043e\u0442\u043e\u0439\u0442\u0438 \u043e\u0442\u00a0\u043d\u0430\u0448\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0431\u044d\u043a\u0430\u043f\u043e\u0432 (<a href=\"https:\/\/habr.com\/ru\/articles\/756976\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/758418\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/a> ) \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0449\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u044b\u0442\u0443\u0435\u043c\u043e\u0439 \u041e\u0421. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043a\u0430\u043a\u00a0\u0432\u0438\u0434\u043d\u043e \u0438\u0437\u00a0\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u00ab\u0433\u043e\u0442\u043e\u0432\u043a\u0443\u00bb \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d c \u043f\u043e\u043c\u043e\u0449\u044c\u044e nix\u2011build.<\/p>\n<p>\u0410\u00a0\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a\u00a0\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0\u0411\u0414\u00a0\u2014 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043a\u0430\u043c\u0438(\u044d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e).<\/p>\n<p>\u0427\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432 \u043c\u0435\u043d\u044e:<\/p>\n<ul>\n<li>\n<p>Qemu<\/p>\n<\/li>\n<li>\n<p>Postgresql<\/p>\n<\/li>\n<li>\n<p>Mysql<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f\u00a0\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438:<\/p>\n<p>1. PostgreSQL\u00a0\u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u2011\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 35\u00a0\u043b\u0435\u0442 \u0438 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u043b\u0430 \u043f\u0440\u043e\u0447\u043d\u0443\u044e \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u044e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. (<a href=\"https:\/\/www.postgresql.org\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.postgresql.org\/<\/a>)<\/p>\n<p>2.0. MySQL\u00a0\u2014 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0430\u044f \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0421\u0423\u0411\u0414). \u041f\u043e\u0434\u00a0\u0441\u043b\u043e\u0432\u043e\u043c \u00ab\u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0430\u044f\u00bb \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0434 \u00ab\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f\u00bb\u00a0\u2014 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u0432 1995\u00a0\u0433\u043e\u0434\u0443, \u0435\u0451 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f. ( <a href=\"https:\/\/dev.mysql.com\/\" rel=\"noopener noreferrer nofollow\">https:\/\/dev.mysql.com\/<\/a> )<\/p>\n<p>2.1\u00a0MariaDB Server\u00a0\u2014 \u043e\u0434\u043d\u0430 \u0438\u0437\u00a0\u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 MySQL \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u00a0\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432 Linux.<\/p>\n<p>\u041e\u043d \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430\u00a0\u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0441\u0442\u0438, \u0438 \u0424\u043e\u043d\u0434 MariaDB \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e\u00a0\u0432\u043a\u043b\u0430\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442 \u043d\u0430\u00a0\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445. \u041d\u0435\u0434\u0430\u0432\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432\u00a0\u0441\u0435\u0431\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0443\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e Galera Cluster 4, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u00a0\u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 Oracle \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0\u0442\u043e\u043c \u0432\u0438\u0434\u0435, \u0432\u00a0\u043a\u0430\u043a\u043e\u043c \u043e\u043d\u0438\u00a0\u0431\u044b\u043b\u0438 \u0432\u00a0\u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u00a0\u043f\u0440\u043e\u0448\u043b\u043e\u043c.<\/p>\n<p>( <a href=\"https:\/\/mariadb.org\/\" rel=\"noopener noreferrer nofollow\">https:\/\/mariadb.org\/<\/a> )<\/p>\n<p>3. \u0414\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0438\u0434\u0430\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u0447\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442\u00a0\u043e\u0431\u044a\u0435\u043c\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: \u0447\u0435\u043c \u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0418\u0418.<\/p>\n<p>\u0412\u00a0\u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0441\u00a0\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432,\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u043b\u044f\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u00a0\u043d\u0430\u0431\u043e\u0440\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0437\u00a0\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f\u00a0\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u0433\u043e wget.<\/p>\n<p>1) <a href=\"https:\/\/www.northlincs.gov.uk\" rel=\"noopener noreferrer nofollow\">https:\/\/www.northlincs.gov.uk<\/a><\/p>\n<p>2) <a href=\"https:\/\/www.fdic.gov\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.fdic.gov\/<\/a><\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u0435\u0441\u0442\u044c \u0438 \u043a\u0430\u043a\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 (\u043d\u0435\u043e\u0431\u044c\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e,\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f):<\/p>\n<p>\u0418\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>nix-shell --packages<\/code> \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430\u00a0tab, \u0447\u0442\u043e\u0431\u044b\u00a0\u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u0438\u0445 \u043d\u0435\u00a0\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u0435\u0441\u0442\u044c\u00a0\u043b\u0438 \u043e\u043d.<\/p>\n<details class=\"spoiler\">\n<summary>PostgreSQL<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># nix-shell --packages postgre postgresql               postgresql_11_jit        postgresql_12            postgresql12Packages     postgresql13JitPackages  postgresql_14_jit        postgresql_15            postgresql15Packages     postgresql_jdbc          postgresqlPackages postgresql_10            postgresql11JitPackages  postgresql_12_jit        postgresql_13            postgresql13Packages     postgresql14JitPackages  postgresql_15_jit        postgresql_9_6           postgresql_jit           postgresqlTestHook postgresql_11            postgresql11Packages     postgresql12JitPackages  postgresql_13_jit        postgresql_14            postgresql14Packages     postgresql15JitPackages  postgresql96             postgresqlJitPackages    postgrey<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>MariaDB<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># nix-shell -p mariadb mariadb                  mariadb_1011             mariadb_105              mariadb_108              mariadb-client           mariadb-connector-c_3_1  mariadb-embedded mariadb_1010             mariadb_104              mariadb_106              mariadb_109              mariadb-connector-c      mariadb-connector-c_3_2  mariadb-galera<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 (\u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f\u00a0\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f,\u0438\u043b\u0438 \u043a\u043e\u0433\u0434\u0430 \u043f\u0430\u043a\u0435\u0442 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b):<\/p>\n<pre><code>nix-shell --packages<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Example:<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># nix-shell --packages manticoresearch \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043c\u0430\u043d\u0442\u0438\u043a\u043e\u0440\u044b: #searchd --version Manticore 5.0.3 1e84bbd46@221013 dev Copyright (c) 2001-2016, Andrew Aksyonoff Copyright (c) 2008-2016, Sphinx Technologies Inc (http:\/\/sphinxsearch.com) Copyright (c) 2017-2022, Manticore Software LTD (https:\/\/manticoresearch.com) \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 \u0435\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c,\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0430\u043d\u0442\u0438\u043a\u043e\u0440\u044b. \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0448\u0435\u043b\u043b\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: # exit<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0432\u00a0\u043d\u0430\u0448\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430 Qemu \u0445\u043e\u0447\u0435\u0442 X11\u00a0\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443:<\/p>\n<pre><code>\u0427\u0435\u0441\u0442\u043d\u043e \u0441\u043a\u043e\u043c\u043c\u0443\u043d\u0438\u0437\u0436\u0435\u043d\u043d\u043e\u0435 \u0441 \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430: # Enable the X11 windowing system. services.xserver.enable = true; services.xserver.displayManager.sddm.enable = true; services.xserver.desktopManager.xfce.enable = true; \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u043e\u0434 \u0412\u041c virtualisation.vmVariant = {   # following configuration is added only when building VM with build-vm   virtualisation = {     memorySize =  2048; # Use 2048MiB memory.     cores = 2;            }; }; <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0441\u044f \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0441 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043f\u043b\u0435\u0439\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440.<\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0438\u0434\u0438\u043c(\u043e\u043d\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f):<\/p>\n<pre><code>nixos-rebuild build-vm<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c 3\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0434\u043b\u044f\u00a0\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0444\u0438\u0433 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b 1 \u0441 (postgresql)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>let   pkgs = import &lt;nixpkgs> { };   # This module defines the system that we want   PostgresModule = { ... }: {      services.postgresql = {         enable= true ;         enableTCPIP = true;         authentication = pkgs.lib.mkOverride 10 ''         #type database  DBuser  auth-method                 local all       all     trust                 host  all      all     127.0.0.1\/32   trust                 host  all      all     0.0.0.0\/0     trust                 '';         initialScript = pkgs.writeText \"backend-initScript\" ''                 CREATE ROLE murzik WITH LOGIN PASSWORD 'murzik' CREATEDB;                 CREATE DATABASE OpenData;                 GRANT ALL PRIVILEGES ON DATABASE OpenData TO Murzik;                 '';         };   };  debugVm = { modulesPath, ... }: {     imports = [       # The qemu-vm NixOS module gives us the `vm` attribute that we will later       # use, and other VM-related settings       \"${modulesPath}\/virtualisation\/qemu-vm.nix\"     ];         virtualisation.forwardPorts = [       { from = \"host\"; host.port = 2220; guest.port = 22; }       { from = \"host\"; host.port = 5432; guest.port = 5432; }     ];      # Root user without password and enabled SSH for playing around     networking.firewall.enable = false;     services.openssh.enable = true;     services.openssh.permitRootLogin = \"yes\";     users.extraUsers.root.password = \"\";   };    nixosEvaluation = pkgs.nixos [     debugVm     PostgresModule   ]; in  nixosEvaluation.config.system.build.vm<\/code><\/pre>\n<p>\u0441\u043e\u0431\u0435\u0440\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>nix-build postgresvm.nix<\/code><\/pre>\n<pre><code>\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 \u0432 \u0441\u0430\u043c\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 GUI Terminal :  .\/result\/bin\/run-nixos-vm<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d4e\/ebb\/cd7\/d4eebbcd7caa19ea87c83e018f7a297b.png\" width=\"1346\" height=\"542\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d4e\/ebb\/cd7\/d4eebbcd7caa19ea87c83e018f7a297b.png\"\/><\/figure>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0447\u0442\u043e Postgresql \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<pre><code>#  ssh -p 2220 root@localhost \"systemctl status postgresql.service\" (root@localhost) Password: \u25cf postgresql.service - PostgreSQL Server      Loaded: loaded (\/etc\/systemd\/system\/postgresql.service; enabled; preset: enabled)      Active: active (running) since Tue 2023-09-12 12:09:27 UTC; 22min ago     Process: 682 ExecStartPre=\/nix\/store\/hnlancn6bifxr75bf5j9zj9firgbpkp7-unit-script-postgresql-pre-start\/bin\/postgresql-pre-start (code=exited, status=0\/SUCCESS)     Process: 762 ExecStartPost=\/nix\/store\/lachsy0bx9yy51md02mw3gl81gzk8yh8-unit-script-postgresql-post-start\/bin\/postgresql-post-start (code=exited, status=0\/SUCCESS)    Main PID: 704 (postgres)          IP: 52.1K in, 52.1K out          IO: 996.0K read, 700.0K written       Tasks: 7 (limit: 1150)      Memory: 18.9M         CPU: 5.878s      CGroup: \/system.slice\/postgresql.service              \u251c\u2500704 \/nix\/store\/dsgziywn8ghg6g9xn7wr9q5cszjbpqng-postgresql-14.9\/bin\/postgres              \u251c\u2500754 \"postgres: checkpointer \"              \u251c\u2500755 \"postgres: background writer \"              \u251c\u2500756 \"postgres: walwriter \"              \u251c\u2500758 \"postgres: autovacuum launcher \"              \u251c\u2500759 \"postgres: stats collector \"              \u2514\u2500760 \"postgres: logical replication launcher \"  Sep 12 12:09:19 nixos postgres[704]: [704] LOG:  listening on IPv4 address \"0.0.0.0\", port 5432 Sep 12 12:09:19 nixos postgres[704]: [704] LOG:  listening on IPv6 address \"::\", port 5432 Sep 12 12:09:19 nixos postgres[704]: [704] LOG:  listening on Unix socket \"\/run\/postgresql\/.s.PGSQL.5432\" Sep 12 12:09:20 nixos postgres[731]: [731] LOG:  database system was interrupted; last known up at 2023-09-12 12:04:19 GMT Sep 12 12:09:23 nixos postgres[731]: [731] LOG:  database system was not properly shut down; automatic recovery in progress Sep 12 12:09:23 nixos postgres[731]: [731] LOG:  redo starts at 0\/1700098 Sep 12 12:09:23 nixos postgres[731]: [731] LOG:  invalid record length at 0\/17000D0: wanted 24, got 0 Sep 12 12:09:23 nixos postgres[731]: [731] LOG:  redo done at 0\/1700098 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s Sep 12 12:09:24 nixos postgres[704]: [704] LOG:  database system is ready to accept connections Sep 12 12:09:27 nixos systemd[1]: Started PostgreSQL Server.<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u00a0\u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432\u00a0\u043f\u0430\u043f\u043a\u0443 \u0433\u0434\u0435 \u0443\u00a0\u043f\u043e\u0441\u0442\u0433\u0440\u0438 \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0442\u0443\u0434\u0430 csv \u0444\u0430\u0439\u043b:<\/p>\n<pre><code> ssh -p 2220 root@localhost \"cd \/var\/lib\/postgresql\/ &amp;&amp; wget https:\/\/www.northlincs.gov.uk\/wp-content\/uploads\/2018\/10\/on_street_parking_points.csv &amp;&amp; chown postgres:postgres .\/on_street_parking_points.csv\"<\/code><\/pre>\n<p>\u0418\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u0443\u0436\u0435 \u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0\u043d\u0430\u0448\u0443 \u0431\u0434 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e\u00a0\u0432\u0441\u0435 \u043e\u043a.<\/p>\n<pre><code>[root@nixserver1:\/home\/vasya\/vm\/mysql]# ssh -p 2220 root@localhost (root@localhost) Password: Last login: Tue Sep 12 17:22:34 2023 from 10.0.2.2  [root@nixos:~]# su postgres  [postgres@nixos:\/root]$ psql psql (14.9) Type \"help\" for help.  postgres=# \\c opendata You are now connected to database \"opendata\" as user \"postgres\". opendata=# \\dt Did not find any relations. opendata=# CREATE TABLE parking_points ( id  SERIAL ,type VARCHAR(100),restrictn VARCHAR(1000),spaces VARCHAR(100),street VARCHAR(100),town VARCHAR(100),easting VARCHAR(100),northing VARCHAR(100),longitude VARCHAR(100),latitude VARCHAR(100),PRIMARY KEY(id)); CREATE TABLE opendata=# COPY parking_points (id,type,restrictn,spaces,street,town,easting,northing,longitude,latitude) FROM '\/var\/lib\/postgresql\/on_street_parking_points.csv' DELIMITER ',' CSV HEADER; COPY 195 opendata=# select * from parking_points;  id  | type               | restrictn                                                              | spaces |        street                 |   town             | easting | northing | longitude | latitude -----+--------------------+------------------------------------------------------------------------+--------+-------------------------------+--------------------+---------+----------+-----------+-----------    1 | Parking            | Parking 2 Hours No Return 2 Hours Mon-Sat 8am-6pm                      | 7      | HIGH STREET                   | EPWORTH            | 478143  | 403888   | -0.821104 | 53.525592    2 | Disabled Parking   | Disabled Badge Holders Only 3 Hours No Return 2 Hours Mon-Sat 8am-6pm  | 1      | HIGH STREET                   | EPWORTH            | 478174  | 403879   | -0.820632 | 53.525505    3 | Parking            | Parking 2 Hours No Return 2 Hours Mon-Sat 8am-6pm                      | 7      | HIGH STREET                   | EPWORTH            | 478289  | 403824   | -0.818916 | 53.524996    4 | Disabled Parking   | Disabled Badge Holders Only 3 Hours No Return 2 Hours Mon-Sat 8am-6pm  | 1      | MARKET PLACE                  | EPWORTH            | 478338  | 403802   | -0.818187 | 53.524794 ...  192 | Disabled Parking   | Disabled Parking 3 hour no return 2 hour Mon-Sat 9am - 6pm             | 3      | CARLTON STREET                | SCUNTHORPE         | 489907  | 411466   | -0.643132 | 53.592072  193 | Parking            | Parking 1 Hour No Return 2 Hour Mon-Sat 9am-5pm Except Permit Holders  | 30     | LINDLEY STREET                | SCUNTHORPE         | 489486  | 408753   | -0.650268 | 53.567765 (195 rows)<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0444\u0438\u0433 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b 2 \u0441 MariaDB<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>let   pkgs = import &lt;nixpkgs> { };    MysqlModule = { ... }: {         services.mysql = {         enable= true ;         package = pkgs.mariadb;         initialDatabases =[             { name = \"enterprice\"; }         ];         initialScript = pkgs.writeText \"mariadb-init.sql\" ''         CREATE USER 'databarsik'@'localhost' IDENTIFIED BY 'databarsik';         GRANT ALL PRIVILEGES ON *.* TO 'databarsik'@'localhost' WITH GRANT OPTION;         FLUSH PRIVILEGES;         USE enterprice;         CREATE TABLE enterprice(           Bank_Name TEXT(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,           City TEXT(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,           State TEXT(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,           Cert TEXT(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,           Acquiring_Institution TEXT(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,           Closing_Date VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,           Fund VARCHAR(500) NOT NULL,           PRIMARY KEY(Fund));         '';         };   };   debugVm = { modulesPath, ... }: {     imports = [        \"${modulesPath}\/virtualisation\/qemu-vm.nix\"     ];      virtualisation.forwardPorts = [       { from = \"host\"; host.port = 2225; guest.port = 22; }       { from = \"host\"; host.port = 3306; guest.port = 3306; }     ];   };        networking.firewall.enable = false;     services.openssh.enable = true;      services.openssh.settings.PermitRootLogin = \"yes\";     users.extraUsers.root.password = \"vasya\";   nixosEvaluation = pkgs.nixos [     debugVm     MysqlModule   ]; in  nixosEvaluation.config.system.build.vm<\/code><\/pre>\n<p>\u0441\u043e\u0431\u0435\u0440\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>nix-build MysqlVM.nix<\/code><\/pre>\n<pre><code>\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:  .\/result\/bin\/run-nixos-vm<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Mysql<\/h4>\n<p>\u0417\u0430\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0443 Mysql \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0442\u0443\u0434\u0430 csv \u0444\u0430\u0439\u043b:<\/p>\n<pre><code> ssh -p 2221 root@localhost \"cd \/var\/lib\/mysql\/ &amp;&amp; wget https:\/\/www.fdic.gov\/bank\/individual\/failed\/banklist.csv\"<\/code><\/pre>\n<p>\u0423\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432:<\/p>\n<pre><code> ssh -p 2221 root@localhost \"sed '1d' \/var\/lib\/mysql\/banklist.csv\"<\/code><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043c \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430\u00a0\u0441\u0430\u043c\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443:<\/p>\n<pre><code>ssh -p 2221 root@localhost<\/code><\/pre>\n<p>\u0412\u00a0\u0441\u0430\u043c Mysql, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u0431\u0430\u0437\u044b \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043d\u0430\u0448 csv \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code>#mysql Welcome to the MariaDB monitor.  Commands end with ; or \\g. Your MariaDB connection id is 7 Server version: 10.6.15-MariaDB MariaDB Server  Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.  Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.  MariaDB [(none)]> show databases; +--------------------+ | Database           | +--------------------+ | enterprice         | | information_schema | | mysql              | | performance_schema | | sys                | | test               | +--------------------+ 6 rows in set (0.032 sec)  MariaDB [(none)]> use enterprice; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed ######\u041a\u0430\u0447\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442: MariaDB [enterprice]> LOAD DATA INFILE '\/var\/lib\/mysql\/banklist.csv' INTO TABLE enterprice CHARACTER SET latin1 FIELDS TERMINATED BY ',' ENCLOSED BY '\"'  LINES TERMINATED BY '\\n' IGNORE 1 ROWS; Query OK, 567 rows affected (0.221 sec) Records: 567  Deleted: 0  Skipped: 0  Warnings: 0 MariaDB [enterprice]> show tables; +----------------------+ | Tables_in_enterprice | +----------------------+ | enterprice           | +----------------------+ 1 row in set (0.005 sec) MariaDB [enterprice]> describe enterprice; +-----------------------+--------------+------+-----+---------+-------+ | Field                 | Type         | Null | Key | Default | Extra | +-----------------------+--------------+------+-----+---------+-------+ | Bank_Name             | text         | NO   |     | NULL    |       | | City                  | text         | NO   |     | NULL    |       | | State                 | text         | NO   |     | NULL    |       | | Cert                  | text         | NO   |     | NULL    |       | | Acquiring_Institution | text         | NO   |     | NULL    |       | | Closing_Date          | varchar(500) | NO   |     | NULL    |       | | Fund                  | varchar(500) | NO   | PRI | NULL    |       | +-----------------------+--------------+------+-----+---------+-------+ 7 rows in set (0.016 sec) MariaDB [enterprice]> select * from enterprice; +--------------------------------------------------------------------------------------------+--------------------+-------+-------+-------------------------------------------------------------------+--------------+--------+ | Bank_Name                                                                                  | City               | State | Cert  | Acquiring_Institution                                             | Closing_Date | Fund   | +--------------------------------------------------------------------------------------------+--------------------+-------+-------+-------------------------------------------------------------------+--------------+--------+  |Metropolitan Savings Bank                                                                  | Pittsburgh         | PA    | 35353 | Allegheny Valley Bank of Pittsburgh                               | 2-Feb-07     | 10000  |NetBank                                                                                    | Alpharetta         | GA    | 32575 | ING DIRECT                                                        | 28-Sep-07    | 10001  |Miami Valley Bank                                                                          | Lakeview           | OH    | 16848 | The Citizens Banking Company                                      | 4-Oct-07     | 10002  |Douglass National Bank                                                                     | Kansas City        | MO    | 24660 | Liberty Bank and Trust Company                                    | 25-Jan-08    | 10003  |Hume Bank                                                                                  | Hume               | MO    | 1971  | Security Bank                                                     | 7-Mar-08     | 10004  |ANB Financial, NA                                                                          | Bentonville        | AR    | 33901 | Pulaski Bank and Trust Company                                    | 9-May-08     | 10005  |First Integrity Bank, NA                                                                   | Staples            | MN    | 12736 | First International Bank and Trust                                | 30-May-08    | 10006  |IndyMac Bank                                                                               | Pasadena           | CA    | 29730 | OneWest Bank, FSB                                                 | 11-Jul-08    | 10007 ... +--------------------------------------------------------------------------------------------+--------------------+-------+-------+-------------------------------------------------------------------+--------------+--------+ 567 rows in set (0.022 sec) MariaDB [enterprice]> exit; Bye<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0433\u0434\u0430 \u043d\u043e\u0447\u044c\u044e \u043d\u0435 \u0434\u043e \u0441\u043d\u0430&#8230;<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dd6\/dad\/156\/dd6dad156aa5e4e1dea48432c1531abc.png\" width=\"1280\" height=\"544\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dd6\/dad\/156\/dd6dad156aa5e4e1dea48432c1531abc.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u0432\u0441\u0435, \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u00a0\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c, \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0439\u0434\u0435\u043c \u0432\u00a0\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/760720\/\"> https:\/\/habr.com\/ru\/articles\/760720\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u044b\u0448\u043a\u0443 \u0438 \u043e\u0442\u043e\u0439\u0442\u0438 \u043e\u0442\u00a0\u043d\u0430\u0448\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0431\u044d\u043a\u0430\u043f\u043e\u0432 (<a href=\"https:\/\/habr.com\/ru\/articles\/756976\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/758418\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/a> ) \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0449\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u044b\u0442\u0443\u0435\u043c\u043e\u0439 \u041e\u0421. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043a\u0430\u043a\u00a0\u0432\u0438\u0434\u043d\u043e \u0438\u0437\u00a0\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u00ab\u0433\u043e\u0442\u043e\u0432\u043a\u0443\u00bb \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d c \u043f\u043e\u043c\u043e\u0449\u044c\u044e nix\u2011build.<\/p>\n<p>\u0410\u00a0\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a\u00a0\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0\u0411\u0414\u00a0\u2014 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043a\u0430\u043c\u0438(\u044d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e).<\/p>\n<p>\u0427\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432 \u043c\u0435\u043d\u044e:<\/p>\n<ul>\n<li>\n<p>Qemu<\/p>\n<\/li>\n<li>\n<p>Postgresql<\/p>\n<\/li>\n<li>\n<p>Mysql<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f\u00a0\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438:<\/p>\n<p>1. PostgreSQL\u00a0\u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u2011\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 35\u00a0\u043b\u0435\u0442 \u0438 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u043b\u0430 \u043f\u0440\u043e\u0447\u043d\u0443\u044e \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u044e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. (<a href=\"https:\/\/www.postgresql.org\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.postgresql.org\/<\/a>)<\/p>\n<p>2.0. MySQL\u00a0\u2014 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0430\u044f \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0421\u0423\u0411\u0414). \u041f\u043e\u0434\u00a0\u0441\u043b\u043e\u0432\u043e\u043c \u00ab\u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0430\u044f\u00bb \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0434 \u00ab\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f\u00bb\u00a0\u2014 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u0432 1995\u00a0\u0433\u043e\u0434\u0443, \u0435\u0451 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f. ( <a href=\"https:\/\/dev.mysql.com\/\" rel=\"noopener noreferrer nofollow\">https:\/\/dev.mysql.com\/<\/a> )<\/p>\n<p>2.1\u00a0MariaDB Server\u00a0\u2014 \u043e\u0434\u043d\u0430 \u0438\u0437\u00a0\u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 MySQL \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u00a0\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432 Linux.<\/p>\n<p>\u041e\u043d \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430\u00a0\u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0441\u0442\u0438, \u0438 \u0424\u043e\u043d\u0434 MariaDB \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e\u00a0\u0432\u043a\u043b\u0430\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442 \u043d\u0430\u00a0\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445. \u041d\u0435\u0434\u0430\u0432\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432\u00a0\u0441\u0435\u0431\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0443\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e Galera Cluster 4, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u00a0\u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 Oracle \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0\u0442\u043e\u043c \u0432\u0438\u0434\u0435, \u0432\u00a0\u043a\u0430\u043a\u043e\u043c \u043e\u043d\u0438\u00a0\u0431\u044b\u043b\u0438 \u0432\u00a0\u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u00a0\u043f\u0440\u043e\u0448\u043b\u043e\u043c.<\/p>\n<p>( <a href=\"https:\/\/mariadb.org\/\" rel=\"noopener noreferrer nofollow\">https:\/\/mariadb.org\/<\/a> )<\/p>\n<p>3. \u0414\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0438\u0434\u0430\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u0447\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442\u00a0\u043e\u0431\u044a\u0435\u043c\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: \u0447\u0435\u043c \u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0418\u0418.<\/p>\n<p>\u0412\u00a0\u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0441\u00a0\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432,\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u043b\u044f\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u00a0\u043d\u0430\u0431\u043e\u0440\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0437\u00a0\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f\u00a0\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u0433\u043e wget.<\/p>\n<p>1) <a href=\"https:\/\/www.northlincs.gov.uk\" rel=\"noopener noreferrer nofollow\">https:\/\/www.northlincs.gov.uk<\/a><\/p>\n<p>2) <a href=\"https:\/\/www.fdic.gov\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.fdic.gov\/<\/a><\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u0435\u0441\u0442\u044c \u0438 \u043a\u0430\u043a\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 (\u043d\u0435\u043e\u0431\u044c\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e,\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f):<\/p>\n<p>\u0418\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>nix-shell --packages<\/code> \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430\u00a0tab, \u0447\u0442\u043e\u0431\u044b\u00a0\u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u0438\u0445 \u043d\u0435\u00a0\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u0435\u0441\u0442\u044c\u00a0\u043b\u0438 \u043e\u043d.<\/p>\n<details class=\"spoiler\">\n<summary>PostgreSQL<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># nix-shell --packages postgre postgresql               postgresql_11_jit        postgresql_12            postgresql12Packages     postgresql13JitPackages  postgresql_14_jit        postgresql_15            postgresql15Packages     postgresql_jdbc          postgresqlPackages postgresql_10            postgresql11JitPackages  postgresql_12_jit        postgresql_13            postgresql13Packages     postgresql14JitPackages  postgresql_15_jit        postgresql_9_6           postgresql_jit           postgresqlTestHook postgresql_11            postgresql11Packages     postgresql12JitPackages  postgresql_13_jit        postgresql_14            postgresql14Packages     postgresql15JitPackages  postgresql96             postgresqlJitPackages    postgrey<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>MariaDB<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># nix-shell -p mariadb mariadb                  mariadb_1011             mariadb_105              mariadb_108              mariadb-client           mariadb-connector-c_3_1  mariadb-embedded mariadb_1010             mariadb_104              mariadb_106              mariadb_109              mariadb-connector-c      mariadb-connector-c_3_2  mariadb-galera<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 (\u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f\u00a0\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f,\u0438\u043b\u0438 \u043a\u043e\u0433\u0434\u0430 \u043f\u0430\u043a\u0435\u0442 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b):<\/p>\n<pre><code>nix-shell --packages<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Example:<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># nix-shell --packages manticoresearch \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043c\u0430\u043d\u0442\u0438\u043a\u043e\u0440\u044b: #searchd --version Manticore 5.0.3 1e84bbd46@221013 dev Copyright (c) 2001-2016, Andrew Aksyonoff Copyright (c) 2008-2016, Sphinx Technologies Inc (http:\/\/sphinxsearch.com) Copyright (c) 2017-2022, Manticore Software LTD (https:\/\/manticoresearch.com) \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 \u0435\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c,\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0430\u043d\u0442\u0438\u043a\u043e\u0440\u044b. \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0448\u0435\u043b\u043b\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: # exit<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0432\u00a0\u043d\u0430\u0448\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430 Qemu \u0445\u043e\u0447\u0435\u0442 X11\u00a0\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443:<\/p>\n<pre><code>\u0427\u0435\u0441\u0442\u043d\u043e \u0441\u043a\u043e\u043c\u043c\u0443\u043d\u0438\u0437\u0436\u0435\u043d\u043d\u043e\u0435 \u0441 \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430: # Enable the X11 windowing system. services.xserver.enable = true; services.xserver.displayManager.sddm.enable = true; services.xserver.desktopManager.xfce.enable = true; \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u043e\u0434 \u0412\u041c virtualisation.vmVariant = {   # following configuration is added only when building VM with build-vm   virtualisation = {     memorySize =  2048; # Use 2048MiB memory.     cores = 2;            }; }; <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0441\u044f \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0441 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043f\u043b\u0435\u0439\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440.<\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0438\u0434\u0438\u043c(\u043e\u043d\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f):<\/p>\n<pre><code>nixos-rebuild build-vm<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c 3\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0434\u043b\u044f\u00a0\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0444\u0438\u0433 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b 1 \u0441 (postgresql)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>let   pkgs = import &lt;nixpkgs> { };   # This module defines the system that we want   PostgresModule = { ... }: {      services.postgresql = {         enable= true ;         enableTCPIP = true;         authentication = pkgs.lib.mkOverride 10 ''         #type database  DBuser  auth-method                 local all       all     trust                 host  all      all     127.0.0.1\/32   trust                 host  all      all     0.0.0.0\/0     trust                 '';         initialScript = pkgs.writeText \"backend-initScript\" ''                 CREATE ROLE murzik WITH LOGIN PASSWORD 'murzik' CREATEDB;                 CREATE DATABASE OpenData;                 GRANT ALL PRIVILEGES ON DATABASE OpenData TO Murzik;                 '';         };   };  debugVm = { modulesPath, ... }: {     imports = [       # The qemu-vm NixOS module gives us the `vm` attribute that we will later       # use, and other VM-related settings       \"${modulesPath}\/virtualisation\/qemu-vm.nix\"     ];         virtualisation.forwardPorts = [       { from = \"host\"; host.port = 2220; guest.port = 22; }       { from = \"host\"; host.port = 5432; guest.port = 5432; }     ];      # Root user without password and enabled SSH for playing around     networking.firewall.enable = false;     services.openssh.enable = true;     services.openssh.permitRootLogin = \"yes\";     users.extraUsers.root.password = \"\";   };    nixosEvaluation = pkgs.nixos [     debugVm     PostgresModule   ]; in  nixosEvaluation.config.system.build.vm<\/code><\/pre>\n<p>\u0441\u043e\u0431\u0435\u0440\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>nix-build postgresvm.nix<\/code><\/pre>\n<pre><code>\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 \u0432 \u0441\u0430\u043c\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 GUI Terminal :  .\/result\/bin\/run-nixos-vm<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0447\u0442\u043e Postgresql \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<pre><code>#  ssh -p 2220 root@localhost \"systemctl status postgresql.service\" (root@localhost) Password: \u25cf postgresql.service - PostgreSQL Server      Loaded: loaded (\/etc\/systemd\/system\/postgresql.service; enabled; preset: enabled)      Active: active (running) since Tue 2023-09-12 12:09:27 UTC; 22min ago     Process: 682 ExecStartPre=\/nix\/store\/hnlancn6bifxr75bf5j9zj9firgbpkp7-unit-script-postgresql-pre-start\/bin\/postgresql-pre-start (code=exited, status=0\/SUCCESS)     Process: 762 ExecStartPost=\/nix\/store\/lachsy0bx9yy51md02mw3gl81gzk8yh8-unit-script-postgresql-post-start\/bin\/postgresql-post-start (code=exited, status=0\/SUCCESS)    Main PID: 704 (postgres)          IP: 52.1K in, 52.1K out          IO: 996.0K read, 700.0K written       Tasks: 7 (limit: 1150)      Memory: 18.9M         CPU: 5.878s      CGroup: \/system.slice\/postgresql.service              \u251c\u2500704 \/nix\/store\/dsgziywn8ghg6g9xn7wr9q5cszjbpqng-postgresql-14.9\/bin\/postgres              \u251c\u2500754 \"postgres: checkpointer \"              \u251c\u2500755 \"postgres: background writer \"              \u251c\u2500756 \"postgres: walwriter \"              \u251c\u2500758 \"postgres: autovacuum launcher \"              \u251c\u2500759 \"postgres: stats collector \"              \u2514\u2500760 \"postgres: logical replication launcher \"  Sep 12 12:09:19 nixos postgres[704]: [704] LOG:  listening on IPv4 address \"0.0.0.0\", port 5432 Sep 12 12:09:19 nixos postgres[704]: [704] LOG:  listening on IPv6 address \"::\", port 5432 Sep 12 12:09:19 nixos postgres[704]: [704] LOG:  listening on Unix socket \"\/run\/postgresql\/.s.PGSQL.5432\" Sep 12 12:09:20 nixos postgres[731]: [731] LOG:  database system was interrupted; last known up at 2023-09-12 12:04:19 GMT Sep 12 12:09:23 nixos postgres[731]: [731] LOG:  database system was not properly shut down; automatic recovery in progress Sep 12 12:09:23 nixos postgres[731]: [731] LOG:  redo starts at 0\/1700098 Sep 12 12:09:23 nixos postgres[731]: [731] LOG:  invalid record length at 0\/17000D0: wanted 24, got 0 Sep 12 12:09:23 nixos postgres[731]: [731] LOG:  redo done at 0\/1700098 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s Sep 12 12:09:24 nixos postgres[704]: [704] LOG:  database system is ready to accept connections Sep 12 12:09:27 nixos systemd[1]: Started PostgreSQL Server.<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u00a0\u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432\u00a0\u043f\u0430\u043f\u043a\u0443 \u0433\u0434\u0435 \u0443\u00a0\u043f\u043e\u0441\u0442\u0433\u0440\u0438 \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0442\u0443\u0434\u0430 csv \u0444\u0430\u0439\u043b:<\/p>\n<pre><code> ssh -p 2220 root@localhost \"cd \/var\/lib\/postgresql\/ &amp;&amp; wget https:\/\/www.northlincs.gov.uk\/wp-content\/uploads\/2018\/10\/on_street_parking_points.csv &amp;&amp; chown postgres:postgres .\/on_street_parking_points.csv\"<\/code><\/pre>\n<p>\u0418\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u0443\u0436\u0435 \u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0\u043d\u0430\u0448\u0443 \u0431\u0434 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e\u00a0\u0432\u0441\u0435 \u043e\u043a.<\/p>\n<pre><code>[root@nixserver1:\/home\/vasya\/vm\/mysql]# ssh -p 2220 root@localhost (root@localhost) Password: Last login: Tue Sep 12 17:22:34 2023 from 10.0.2.2  [root@nixos:~]# su postgres  [postgres@nixos:\/root]$ psql psql (14.9) Type \"help\" for help.  postgres=# \\c opendata You are now connected to database \"opendata\" as user \"postgres\". opendata=# \\dt Did not find any relations. opendata=# CREATE TABLE parking_points ( id  SERIAL ,type VARCHAR(100),restrictn VARCHAR(1000),spaces VARCHAR(100),street VARCHAR(100),town VARCHAR(100),easting VARCHAR(100),northing VARCHAR(100),longitude VARCHAR(100),latitude VARCHAR(100),PRIMARY KEY(id)); CREATE TABLE opendata=# COPY parking_points<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\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-354761","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354761","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=354761"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354761\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=354761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=354761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}