{"id":144,"date":"2016-07-03T21:43:07","date_gmt":"2016-07-03T12:43:07","guid":{"rendered":"https:\/\/www.agent-grow.com\/self20percent\/?p=144"},"modified":"2016-07-03T21:43:07","modified_gmt":"2016-07-03T12:43:07","slug":"fake2db%e3%81%a7%e3%83%80%e3%83%9f%e3%83%bc%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e4%bd%9c%e6%88%90","status":"publish","type":"post","link":"https:\/\/www.agent-grow.com\/self20percent\/2016\/07\/03\/fake2db%e3%81%a7%e3%83%80%e3%83%9f%e3%83%bc%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e4%bd%9c%e6%88%90\/","title":{"rendered":"fake2db\u3067\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u3092\u4f5c\u6210"},"content":{"rendered":"<h1>fake2db\u3068\u306f<\/h1>\n<p>\u3053\u308c\u3067\u3082\u4e00\u5fdc\u8077\u7a2e\u306f\u30a8\u30f3\u30b8\u30cb\u30a2\u306a\u3082\u306e\u3067\u3057\u3066\u30fb\u30fb\u30fb\u3002\u4e00\u5ea6\u304f\u3089\u3044\u306f\u307e\u3058\u3081\u306b\u6280\u8853\u7684\u306a\u3053\u3068\u3092\u66f8\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u79c1\u81ea\u8eab\u30a2\u30fc\u30ea\u30fc\u30a2\u30c0\u30d7\u30bf\u3067\u3082\u306a\u3093\u3067\u3082\u306a\u3044\u306e\u3067\u3001\u500b\u4eba\u7684\u306b\u6c17\u306b\u306a\u3063\u305f\u3053\u3068\u304b\u3001<\/p>\n<p>\u5f61(\uff9f)(\uff9f)\u300c\u3053\u3044\u3064\u3041\u7d20\u6674\u3089\u3057\u3044\u300d<\/p>\n<p>\u3068\u601d\u3063\u305f\u3053\u3068\u3092\u6c17\u307e\u307e\u306b\u7db4\u3063\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3055\u3066\u3001\u4eca\u56de\u3054\u7d39\u4ecb\u3059\u308b\u306e\u306f<a href=\"https:\/\/github.com\/emirozer\/fake2db\">fake2db<\/a>\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u3053\u308c\u306fPython\u3067\u4f5c\u3089\u308c\u3066\u3044\u308b\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30ef\u30f3\u30e9\u30a4\u30ca\u30fc\u3067\u3055\u304f\u3063\u3068\u30c7\u30fc\u30bf\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u304c\u9b45\u529b\u3067\u3059\u3002<\/p>\n<p>\u5143\u3005\u4f7f\u304a\u3046\u3068\u601d\u3063\u305f\u304d\u3063\u304b\u3051\u306f\u3001PHP\u3067\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066\u3044\u305f\u6642\u306b\u3001\u3068\u308a\u3042\u3048\u305a\u306a\u3093\u3067\u3082\u3044\u3044\u306e\u3067\u30c7\u30fc\u30bf\u304c\u307b\u3057\u3044\u3068\u3044\u3046\u72b6\u6cc1\u304c\u3042\u308a\u3001\u30b0\u30b0\u3063\u305f\u3089\u4e00\u767a\u76ee\u306b\u51fa\u3066\u304d\u305f\u306e\u3067\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u79c1\u306f\u7c21\u5358\u306a\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u306e\u3088\u3046\u306a\u3082\u306e\u306f\u57fa\u672cPython\u3067\u63a2\u3059\u50be\u5411\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p>\u3067\u306f\u65e9\u901f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304b\u3089\u3002<\/p>\n<p>\u52d5\u4f5c\u74b0\u5883\u306b\u306f\u307e\u305aPython\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>CentOS\u3060\u30682\u7cfb\u304c\u6700\u521d\u304b\u3089\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u3042\u3048\u30663\u3092\u5165\u308c\u307e\u3059\u3002<\/p>\n<h2>Python3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u307e\u305a\u306f\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0\u304b\u3089\u3067\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo rpm -ivh http:\/\/mirror.yandex.ru\/fedora\/russianfedora\/russianfedora\/free\/el\/releases\/6\/Everything\/x86_64\/os\/puias-release-6-2.R.noarch.rpm\n<\/pre>\n<p>\u305d\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo yum install -y python3 python3-tools\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u6e08\u3093\u3060\u3089\u3061\u3083\u3093\u3068\u306f\u3044\u3063\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npython3 -V\n<\/pre>\n<h2>Python\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u7d9a\u3044\u3066Python\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo yum install python3-devel\n\n# \u3082\u3057\u304b\u3057\u305f\u3089\u5165\u3063\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u5ff5\u306e\u70ba\u306b\nsudo yum install MySQL-python\n<\/pre>\n<h2>pip\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u3064\u3065\u3044\u3066Python\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb\u3067\u3042\u308bpip\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl -kL https:\/\/bootstrap.pypa.io\/get-pip.py | python3\n<\/pre>\n<h2>Virtualenv\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u524d\u8ff0\u306e\u3068\u304a\u308a\u3001CentOS\u306b\u306fPython2\u7cfb\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fPython3\u3092\u4f7f\u3044\u307e\u3059\u306e\u3067Virtualenv\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<p>Virtualenv\u306fPython\u306e\u5b9f\u884c\u74b0\u5883\u3092\u8907\u6570\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo pip3 install virtualenv\n<\/pre>\n<h2>Virtualenv\u3092\u4f7f\u3063\u3066Python3\u5b9f\u884c\u74b0\u5883\u3092\u4f5c\u6210\u3057\u3066\u6d3b\u6027\u5316<\/h2>\n<p>\u4f5c\u696d\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u6d3b\u6027\u5316\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmkdir \/work\ncd \/work\npython3 -m venv venv\nsource \/work\/venv\/bin\/activate\n<\/pre>\n<h2>fake2db\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u3055\u3066\u3001\u3053\u3053\u3067\u3084\u3063\u3068fake2db\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo pip install fake2db\n<\/pre>\n<h2>mysqlconnector\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>MySQL\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u5165\u308c\u307e\u3059<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo pip install mysql-connector\n<\/pre>\n<h1>\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u306e\u4f5c\u6210<\/h1>\n<p>\u307e\u305a\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u4e00\u89a7\u3092\u8868\u793a\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u3075\u3080\u3075\u3080\u3002\u8272\u3005\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u3093\u306a\u306b\u6570\u306f\u591a\u304f\u306a\u3044\u3067\u3059\u3057\u3001\u610f\u5473\u3082\u4f55\u3068\u306a\u304f\u5206\u304b\u308a\u307e\u3059\u306d\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n--rows argument is pretty clear :) integer\n\n--db argument takes 6 possible options : sqlite, mysql, postgresql, mongodb, redis, couchdb\n\n--name argument is OPTIONAL. When it is absent fake2db will name db&amp;#039;s randomly.\n\n--host argument is OPTIONAL. Hostname to use for database connection. Not used for sqlite.\n\n--port argument is OPTIONAL. Port to use for database connection. Not used for sqlite.\n\n--username argument is OPTIONAL. Username for the database user.\n\n--password argument is OPTIONAL. Password for database user. Only supported for mysql &amp;amp; postgresql.\n<\/pre>\n<p>\u3067\u306f\u5b9f\u884c\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fMySQL\u306b\u5bfe\u3057\u3066\u3068\u308a\u3042\u3048\u305a\u30ec\u30b3\u30fc\u30c9\u3092200\u4ef6\u307b\u3069\u4f5c\u3063\u3066\u307f\u3088\u3046\u304b\u306a\u3041\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfake2db --rows 200 --db mysql --host localhost -- username root --password *** --name\u00a0my_db\n<\/pre>\n<p>\u4eca\u56de\u306fMySQL\u306b\u5bfe\u3057\u3066\u884c\u3063\u305f\u306e\u3067 <code>mysql_handler.py<\/code> \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u306b\u7559\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306b\u30c6\u30fc\u30d6\u30eb\u306e\u69cb\u9020\u3084\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3059\u308b\u30ed\u30b8\u30c3\u30af\u304c\u30d9\u30bf\u66f8\u304d\u3055\u308c\u3066\u3044\u307e\u3059\uff08\uff3e\uff3e\uff1b<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u306f\u3001\u305d\u3093\u306a\u306b\u96e3\u3057\u304f\u306a\u3044\u306e\u3067\u4f8b\u3048\u3070\u73fe\u5834\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3042\u3063\u305f\u30c6\u30fc\u30d6\u30eb\u69cb\u9020\u306b\u66f8\u304d\u63db\u3048\u308b\u3053\u3068\u3082\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>fake2db\u306b\u306f\u4e00\u822c\u7684\u306b\u3088\u304f\u4f7f\u308f\u308c\u308b\u3067\u3042\u308d\u3046\u30c6\u30fc\u30d6\u30eb\u69cb\u9020\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>company\u30c6\u30fc\u30d6\u30eb\u3084customer\u30c6\u30fc\u30d6\u30eb\u306a\u3069\u3067\u3059\u3002<\/p>\n<p>\u4f5c\u6210\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u4ef6\u6570\u3082\u6307\u5b9a\u3067\u304d\u308b\u306e\u3067\u79c1\u306f\u3053\u308c\u3067\u30dc\u30ea\u30e5\u30fc\u30e0\u30c6\u30b9\u30c8\u306a\u3093\u305e\u3082\u3084\u3063\u3066\u304a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3093\u306a\u3053\u3093\u306a\u3067fake2db\u306e\u3054\u7d39\u4ecb\u3067\u3057\u305f\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>fake2db\u3068\u306f \u3053\u308c\u3067\u3082\u4e00\u5fdc\u8077\u7a2e\u306f\u30a8\u30f3\u30b8\u30cb\u30a2\u306a\u3082\u306e\u3067\u3057\u3066\u30fb\u30fb\u30fb\u3002\u4e00\u5ea6\u304f\u3089\u3044\u306f\u307e\u3058\u3081\u306b\u6280\u8853\u7684\u306a\u3053\u3068\u3092\u66f8\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002 \u79c1\u81ea\u8eab\u30a2\u30fc\u30ea\u30fc\u30a2\u30c0\u30d7\u30bf\u3067\u3082\u306a\u3093\u3067\u3082\u306a\u3044\u306e\u3067\u3001\u500b\u4eba\u7684\u306b\u6c17\u306b\u306a\u3063\u305f\u3053\u3068\u304b\u3001 \u5f61(\uff9f)(\uff9f)\u300c\u3053\u3044\u3064\u3041\u7d20 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":245,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[30],"class_list":["post-144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-python"],"jetpack_featured_media_url":"https:\/\/www.agent-grow.com\/self20percent\/wp-content\/uploads\/2016\/06\/e8e4d2fb2cf6071352ee749fc272e687_m.jpg","jetpack_shortlink":"https:\/\/wp.me\/p7Bq4F-2k","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":0,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/media\/245"}],"wp:attachment":[{"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}