{"id":475,"date":"2019-01-06T15:38:48","date_gmt":"2019-01-06T06:38:48","guid":{"rendered":"http:\/\/int-info.com\/?page_id=475"},"modified":"2020-02-25T14:18:08","modified_gmt":"2020-02-25T05:18:08","slug":"bp","status":"publish","type":"page","link":"http:\/\/int-info.com\/index.php\/bp\/","title":{"rendered":"bottle+python\u306e\u5916\u90e8\u516c\u958b"},"content":{"rendered":"<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> \u7c21\u6613\u7684\u306a\u52d5\u4f5c\u78ba\u8a8d <\/h4>\n<p>\u30b5\u30fc\u30d0\u3067python3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\nyum install -y https:\/\/centos7.iuscommunity.org\/ius-release.rpm<br \/>\nyum install -y python36u python36u-devel python36u-libs<\/p>\n<p>python\u3067web\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3059\u308bbottle\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\npip3 install bottle<\/p>\n<p>\u305d\u306e\u5f8c\u3001\u4ee5\u4e0b\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3059\u308b\u3002<\/p>\n<p>cd \/var\/www\/<\/p>\n<p>\u3053\u306e\u4e2d\u306b\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30eaxxx\u3092\u4f5c\u308b\u3002<\/p>\n<p>mkdir xxx<\/p>\n<p>\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u5916\u90e8\u304b\u3089\u7f6e\u3051\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3001\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6a29\u9650\u3092\u5909\u66f4\u3059\u308b\u3002<br \/>\nchown apache:zzz xxx<br \/>\nchmod 775 xxx<br \/>\nzzz\u306f\u4e00\u822c\u30e6\u30fc\u30b6\u540d\u3001CyberDuck\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u8ee2\u9001\u3059\u308b\u30e6\u30fc\u30b6\u3068\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<br \/>\n\u6b21\u306b\u3001CyberDuck\u3067\u3001test.py\u3001bottle.py\u3068\u30b5\u30fc\u30d0\u69cb\u6210\u7528py\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3002test.py\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3042\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"test.py\" >from bottle import route, run\r\n \r\n@route(\"\/sample\")\r\ndef index():\r\n    return \"Hello!\"\r\n \r\nrun(host='0.0.0.0', port=50000)<\/pre>\n<p>host\u306f\u3053\u306e\u30a2\u30c9\u30ec\u30b9\u3067\u56fa\u5b9a\u3059\u308b\u3002port\u306f\u4f55\u756a\u3067\u3082\u826f\u3044\u3002<\/p>\n<p>\u6b21\u306b\u3001py\u30d5\u30a1\u30a4\u30eb\u3067\u6307\u5b9a\u3057\u3066\u3044\u308b\u30dd\u30fc\u30c8\u3092\u89e3\u653e\u3059\u308b\u3002<\/p>\n<pre>\r\nfirewall-cmd  --permanent --add-port=50000\/tcp\r\nfirewall-cmd --reload\r\n<\/pre>\n<p>\u305d\u306e\u3042\u3068\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u30b5\u30fc\u30d0\u69cb\u6210\u7528py\u30d5\u30a1\u30a4\u30eb\u3092\u8d77\u52d5\u3059\u308b\u3002<br \/>\npython3 test.py<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308c\u3070\u6210\u529f\u3067\u3059\u3002<br \/>\nhttp:\/\/xxx.xxx.xxx.xxx:50000\/sample<br \/>\nhttp:\/\/[\u30c9\u30e1\u30a4\u30f3\u540d]:50000\/sample<\/p>\n<p>\u30b5\u30fc\u30d0\u3092\u5207\u65ad\u3059\u308b\u5834\u5408\u306b\u306f\u3001control+c\u3092\u62bc\u3059\u3002<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> \u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u5b9f\u884c <\/h4>\n<p>\u524d\u8ff0\u306e\u65b9\u6cd5\u3060\u3068\u3001\u516c\u958b\u3057\u3066\u3044\u308b\u9593\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ed6\u306e\u64cd\u4f5c\u304c\u51fa\u6765\u306a\u304f\u306a\u308b\u3057\u3001\u30ed\u30b0\u30a2\u30a6\u30c8\u3082\u3067\u304d\u306a\u304f\u306a\u308b\u3002<br \/>\n\u3053\u308c\u306f\u4e0d\u4fbf\u306a\u306e\u3067\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u52d5\u4f5c\u3055\u305b\u308b\u3002\u3053\u306e\u305f\u3081\u306b\u306f\u3001nohup\u3068&#038;\u3067\u30b3\u30de\u30f3\u30c9\u3092\u56f2\u3048\u3070\u826f\u3044\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >nohup python3 yyy.py &amp;<\/pre>\n<p>\u306a\u304a\u3001\u3053\u306e\u64cd\u4f5c\u306f\u3001py\u30d5\u30a1\u30a4\u30eb\u3092\u304a\u3044\u3066\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u5b9f\u65bd\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044<br \/>\n\uff08py\u30d5\u30a1\u30a4\u30eb\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u76f8\u5bfe\u30d1\u30b9\u3057\u304b\u4f7f\u7528\u3067\u304d\u306a\u3044\u305f\u3081\uff09\u3002<br \/>\n\u5b9f\u884c\u3092\u7d42\u3048\u308b\u5834\u5408\u306f\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u300cps u\u300d\u3068\u6253\u3061\u8fbc\u307f\u3001\u8d77\u52d5\u3057\u3066\u3044\u308bPID\u306e\u30ca\u30f3\u30d0\u30fc\u3092\u63a2\u3057\u3001\u305d\u308c\u3092\u300ckill zzz\u300d\u3067kill\u3059\u308b\uff08zzz\u306fPID\u306e\u30ca\u30f3\u30d0\u30fc\uff09\u3002<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> \u672c\u756a\u74b0\u5883\u3067\u306e\u30c7\u30d7\u30ed\u30a4 <\/h4>\n<p>\u524d\u8ff0\u3057\u305f\u65b9\u6cd5\u3060\u3068\u3001\u6bce\u56de\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u624b\u6253\u3061\u3067\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u304b\u306a\u308a\u7169\u308f\u3057\u3044\u306e\u3067\u3001apache\u3068wsgi\u3092\u5229\u7528\u3057\u3066\u81ea\u52d5\u7684\u306b\u30b5\u30fc\u30d0\u3092\u7acb\u3066\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8ff0\u3079\u307e\u3059\u3002<\/p>\n<p>wsgi\u3068\u547c\u3070\u308c\u308b\u3001web\u30b5\u30fc\u30d0\u3068py\u30d5\u30a1\u30a4\u30eb\u306e\u63a5\u7d9a\u3092\u62c5\u3046\u30c4\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\n\r\nyum -y install httpd-devel\r\npython3 -m pip install mod_wsgi<\/pre>\n<p>\u6b21\u306b\u3001\u3082\u3046\u4e00\u5ea6\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3064\u3068\u3001mod_wsgi\u306e\u3042\u308a\u304b\u304c\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\n\r\npython3 -m pip install mod_wsgi<\/pre>\n<p>\u300cmod_wsgi in \/usr\/lib64\/python3.6\/site-packages\u300d\u3068\u304d\u305f\u5834\u5408\u3001\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002site-packges\u306e\u4e0b\u5c64\u306bmod_wsgi\/server\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3042\u308a\u3001\u305d\u306e\u4e2d\u306b\u5165\u308b\u3068\u3001mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30eb\u30d1\u30b9\u3092\u899a\u3048\u3066\u304a\u304d\u307e\u3059\u3002\u53c2\u8003\u307e\u3067\u306b\u3001Cent OS7\u306e\u5834\u5408\u306f\u3001\u300c\/usr\/lib64\/python3.6\/site-packages\/mod_wsgi\/server\/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so\u300d\u3068\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u30e1\u30e2\u3063\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001https.conf\u306b\u3088\u308aapache\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\nvim \/etc\/httpd\/conf\/httpd.conf<\/pre>\n<p>httpd.conf\u304c\u958b\u304f\u306e\u3067\u3001\u4ee5\u4e0b\u304c\u3042\u308b\u304b\u63a2\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"httpd.conf\" >\r\nIncludeOptional conf.d\/*.conf<\/pre>\n<p>\u3082\u3057\u3042\u308c\u3070\u3001conf.d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3042\u308b*.conf\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u3067\u30ed\u30fc\u30c9\u3057\u3066\u304f\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u306a\u3044\u5834\u5408\u306f\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u5f8c\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30ebbottle.conf\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\nvim \/etc\/httpd\/conf.d\/bottle.conf<\/pre>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001bottle.conf\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u4e2d\u306b\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"bottle.conf\" >\r\nListen 80\r\n&lt;VirtualHost *:80&gt;\r\nDocumentRoot \/var\/www\/html\/\r\nServerName AAA.com\r\n&lt;\/VirtualHost&gt;\r\n\r\nListen 50000\r\nLoadModule wsgi_module \/usr\/lib64\/python3.6\/site-packages\/mod_wsgi\/server\/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so\r\n&lt;VirtualHost *:50000&gt;\r\n  DocumentRoot \/var\/www\/Contents\r\n  ServerName AAA.com\r\n  WSGIScriptAlias \/ \/var\/www\/Contents\/adapter.wsgi\r\n  &lt;Directory \"\/var\/www\/Contents\"&gt;\r\n   AddHandler wsgi-script .wsgi\r\n   AddHandler wsgi-script .py\r\n   Options ExecCGI\r\n   DirectoryIndex adapter.wsgi\r\n  &lt;\/Directory&gt;\r\n&lt;\/VirtualHost&gt;\r\n\r\n<\/pre>\n<p>\u4eca\u56de\u300180\u756a\u30dd\u30fc\u30c8\u306850000\u756a\u30dd\u30fc\u30c8\u306e2\u3064\u306b\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u7f6e\u304b\u308c\u3066\u3044\u308b\u3068\u3057\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u306b\u305d\u308c\u305e\u308c\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u3042\u308b\u3068\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u81ea\u5206\u306e\u30c9\u30e1\u30a4\u30f3\u3092\u300cAAA.com\u300d\u3068\u3057\u307e\u3059\u3002\u3082\u3057\u30c9\u30e1\u30a4\u30f3\u304c\u306a\u3044\u5834\u5408\u306f\u3001\u30b5\u30fc\u30d0\u306eip\u30a2\u30c9\u30ec\u30b9\u3067\u3082\u826f\u3044\u3067\u3059\u300280\u756a\u30dd\u30fc\u30c8\u306fbottle\u4ee5\u5916\uff08\u4f8b\u3048\u3070\u3001WordPress\u306a\u3069\uff09\u304c\u52d5\u3044\u3066\u3044\u308b\u3068\u3057\u307e\u3059\u3002\u305d\u3057\u3066\u300150000\u756a\u30dd\u30fc\u30c8\u3092bottle\u3068Python\u3067\u4f5c\u6210\u3057\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u3068\u3057\u307e\u3059\u3002<\/p>\n<p><b>DocumentRoot\uff1a<\/b><br \/>\n\u300c\/var\/www\/Contents\u300d\u3068\u3057\u307e\u3059\u3002\u3059\u306a\u308f\u3061\u3001\u300chttp:\/\/AAA.com:50000\u300d\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3068\u304d\u3001\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<p><b>AddHandler &#038; Options\uff1a<\/b><br \/>\n\u3053\u3053\u3067\u306f\u3001.wsgi\u3068.py\u306e\u5b9f\u884c\u3092\u8a31\u53ef\u3057\u3066\u3044\u307e\u3059\u3002python\u3067\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u5834\u5408\u306f\u3001\u3053\u306e\u62e1\u5f35\u5b50\u3092\u5b9f\u884c\u53ef\u80fd\u3068\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p><b>DirectoryIndex\uff1a<\/b><br \/>\n\u300chttp:\/\/AAA.com:50000\u300d\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3068\u304d\u3001\u5b9f\u884c\u3055\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u4eca\u56de\u306f\u3001\u300cadapter.wsgi\u300d\u3068\u3057\u307e\u3059\u3002<\/p>\n<p><b>WSGIScriptAlias\uff1a<\/b><br \/>\n\u300cadapter.wsgi\u300d\u304c\u7f6e\u304b\u308c\u3066\u3044\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u30d5\u30eb\u30d1\u30b9\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p><b>LoadModule\uff1a<\/b><br \/>\n\u300cmod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so\u300d\u304c\u7f6e\u304b\u308c\u3066\u3044\u308b\u5834\u6240\u3092\u3001\u30d5\u30eb\u30d1\u30b9\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001<b>bottle.conf\u5074\u306780\u756a\u30dd\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u305f\u306e\u3067\u3001httpd.conf\u5074\u3092\u958b\u304d\u300cListen 80\u300d\u3092\u300c#Listen 80\u300d\u306b\u5909\u66f4\u3057\u3001\u7121\u52b9\u5316\u3057\u307e\u3059\u3002<\/b><br \/>\n\u3053\u308c\u3092\u3057\u306a\u3044\u5834\u5408\u300180\u756a\u30dd\u30fc\u30c8\u306f\u3059\u3067\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u3068\u3044\u3046\u7406\u7531\u3067\u3001httpd\u306e\u30ea\u30b9\u30bf\u30fc\u30c8\u6642\u306b\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u300150000\u756a\u30dd\u30fc\u30c8\u3092\u89e3\u653e\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\n\r\nfirewall-cmd --permanent --add-port=50000\/tcp\r\nfirewall-cmd --reload<\/pre>\n<p>\u7d9a\u3044\u3066\u3001DocumentRoot\u3067\u6307\u5b9a\u3057\u305f\u300c\/var\/www\/Contents\u300d\u306b\u3001adapter.wsgi\u3068\u3001\u30b5\u30fc\u30d0\u306epy\u30d5\u30a1\u30a4\u30eb\uff08XXX.py\uff09\u3092\u7f6e\u304d\u307e\u3059\u3002adapter.wsgi\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002XXX\u306f\u62e1\u5f35\u5b50\u3092\u66f8\u3044\u3066\u3044\u306a\u3044py\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u306e\u3067\u3001\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"adapter.wsgi\" >\r\n\r\n# coding: utf-8\r\nimport sys, os\r\nimport bottle\r\n\r\ndirpath = os.path.dirname(os.path.abspath(__file__))\r\nsys.path.append(dirpath)\r\nos.chdir(dirpath)\r\n\r\nimport XXX\r\napplication = bottle.default_app()<\/pre>\n<p>\u307e\u305f\u3001XXX.py\u306f\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066\u4ee5\u4e0b\u306e\u901a\u308a\u3068\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"XXX.py\" >\r\n\r\nfrom bottle import route, run, template\r\nfrom bottle import TEMPLATE_PATH\r\n\r\n@route('\/')\r\ndef index():\r\n    return \"Deploy! Bottle!\"\r\n\r\n# run\u306f\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308b\u3053\u3068\uff01\r\n# run(host='AAA.com', port=50000)<\/pre>\n<p>\u6ce8\u610f\u70b9\u3001run\u95a2\u6570\u306f\u5fc5\u305a\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u6b21\u306b\u3001bottle\u304c\u8aad\u3081\u306a\u3044\u3068\u8a00\u308f\u308c\u306a\u3044\u3088\u3046\u306b\u3001bottle\u3082\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\n\r\npython3 -m pip install bottle<\/pre>\n<p>\u305d\u3057\u3066\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u7f6e\u304b\u308c\u3066\u3044\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3059\u3079\u3066\u306e\u30d5\u30eb\u30d1\u30b9\u3067\u3001\u6a29\u9650\u3092755\u306b\u5909\u3048\u3066\u7f6e\u304f\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\nchmod 755 adapter.wsgi\r\n<\/pre>\n<p>\u3053\u308c\u3067\u5916\u90e8\u516c\u958b\u3059\u308b\u6a29\u9650\u306e\u8a2d\u5b9a\u304c\u3067\u304d\u307e\u3057\u305f\u3002\u6700\u5f8c\u306b\u3001httpd\u3092\u30ea\u30b9\u30bf\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\n\r\nsystemctl restart httpd<\/pre>\n<p>\u3082\u3057\u3001\u30ea\u30b9\u30bf\u30fc\u30c8\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u306f\u3001httpd\u304c\u4e0d\u6b63\u72b6\u614b\u306b\u3042\u308b\u306e\u3067\u3001\u30d7\u30ed\u30bb\u30b9\u3092kill\u3057\u307e\u3059\u3002kill\u3059\u3079\u304d\u30d7\u30ed\u30bb\u30b9ID\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8abf\u3079\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\nps aux | grep httpd<\/pre>\n<p>kill\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002yyy\u306f\u30d7\u30ed\u30bb\u30b9\u306e\u6570\u5b57\u3067\u3059\u3002\u4e00\u756a\u4e0a\u306e\u30d7\u30ed\u30bb\u30b9\u3092kill\u3059\u308c\u3070ok\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\n\r\nkill yyy<\/pre>\n<p>\u305d\u306e\u5f8c\u3001httpd\u3092stop\u3057\u3066start\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\n\r\nsystemctl stop httpd\r\nsystemctl start httpd\r\n<\/pre>\n<p>\u3069\u3046\u3057\u3066\u3082\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a8\u30e9\u30fc\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" title=\"Terminal\" >\r\n\r\nsystemctl status httpd.service\r\nvim \/etc\/httpd\/logs\/error_log\r\n<\/pre>\n<p>\u6700\u5f8c\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u300cAAA.com:50000\u300d\u3068\u5165\u529b\u3057\u307e\u3059\u3002\u3053\u308c\u3067\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u8868\u793a\u3055\u308c\u308c\u3070\u6210\u529f\u3067\u3059\u3002\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u3068\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u300cAAA.com:80\u300d\u3067\u3082\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> \u30a4\u30f3\u30c6\u30ea\u30b8\u30a7\u30f3\u30c8\u306a\u30b7\u30b9\u30c6\u30e0\u306b\u3057\u305f\u3044\u5834\u5408 <\/h4>\n<p>\u3082\u3057\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u6a5f\u68b0\u5b66\u7fd2\u306a\u3069\u3092\u5165\u308c\u305f\u3044\u5834\u5408\u306b\u306f\u3001\u4ee5\u4e0b\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u95a2\u4fc2\uff1a<br \/>\n$ sudo yum install -y python36u-pip<br \/>\n$ sudo python3 -m ensurepip<\/p>\n<p>pip\u30b3\u30de\u30f3\u30c9\u306f\u3001\u4ee5\u4e0b\u3067\u4f7f\u7528\u53ef\u80fd\u306b\u306a\u308b\u3002<br \/>\n$ python3 -m pip install<\/p>\n<p>$ python3 -m pip install jinja2<br \/>\n$ python3 -m pip install numpy<br \/>\n$ python3 -m pip install sklearn<br \/>\n$ python3 -m pip install matplotlib<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7c21\u6613\u7684\u306a\u52d5\u4f5c\u78ba\u8a8d \u30b5\u30fc\u30d0\u3067python3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002 yum install -y https:\/\/centos7.iuscommunity.org\/ius-release.rpm yum install -y <\/p><\/div>\n<div class=\"blog-btn\"><a href=\"http:\/\/int-info.com\/index.php\/bp\/\" class=\"home-blog-btn\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-475","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages\/475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/comments?post=475"}],"version-history":[{"count":33,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages\/475\/revisions"}],"predecessor-version":[{"id":1581,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages\/475\/revisions\/1581"}],"wp:attachment":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/media?parent=475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}