{"id":46367,"date":"2023-07-04T00:09:33","date_gmt":"2023-04-16T22:40:20","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/"},"modified":"2024-04-30T11:51:15","modified_gmt":"2024-04-30T03:51:15","slug":"46367-2","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/","title":{"rendered":""},"content":{"rendered":"<p>\u3053\u3046\u3044\u3046\u5185\u5bb9\u306fnote\u3088\u308aQiita\u304b\u306a\u3068\u601d\u3044\u3001\u8ee2\u8f09\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\nhttps:\/\/note.com\/inoccu\/n\/n9d5a74d2316b<\/p>\n<p>Google Cloud Platform\uff08GCP\uff09\u306b\u306f\u3001Always Free\u3068\u3044\u3046\u671f\u9650\u306e\u306a\u3044\u7121\u6599\u67a0\u304b\u3099\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u4e2d\u306b\u306f\u30b9\u30d8\u309a\u30c3\u30af\u306f\u305d\u308c\u307b\u3068\u3099\u3066\u3099\u306f\u306a\u3044\u3082\u306e\u306e\u3001\u4eee\u60f3\u30de\u30b7\u30f3\u304b\u3099\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u305d\u308c\u3092\u4f7f\u3063\u3066Ubuntu\u30b5\u30fc\u30cf\u3099\u3092\u7acb\u3066\u3001Jupyter Notebook\u30b5\u30fc\u30cf\u3099\u3068\u3057\u3066\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u3059\u3099\u3001GCP\u306eAlways Free\u304b\u3099\u3068\u3099\u306e\u3088\u3046\u306a\u3082\u306e\u304b\u3001\u3053\u3061\u3089\u306e\u30b5\u30a4\u30c8\u304b\u3089\u78ba\u8a8d\u3057\u3066\u304f\u305f\u3099\u3055\u3044\u3002\u4eee\u60f3\u30de\u30b7\u30f3\u306fComputing Engine\u3068\u3044\u3046\u30b5\u30fc\u30d2\u3099\u30b9\u306b\u306a\u308b\u306e\u3066\u3099\u3001\u305d\u306e\u90e8\u5206\u305f\u3099\u3051\u629c\u304d\u53d6\u3063\u305f\u306e\u304b\u3099\u4e0b\u8a18\u306e\u5185\u5bb9\u3066\u3099\u3059\u3002<\/p>\n<blockquote><p>1 \u3064\u306e\u975e\u30d5\u309a\u30ea\u30a8\u30f3\u30d5\u309a\u30c6\u30a3\u30d5\u3099\u30eb f1-micro VM \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\uff081 \u304b\u6708\u3042\u305f\u308a\uff09\u3002\u6b21\u306e\u7c73\u56fd\u30ea\u30fc\u30b7\u3099\u30e7\u30f3\u306e\u3044\u3059\u3099\u308c\u304b\u3066\u3099\u5229\u7528\u3066\u3099\u304d\u307e\u3059\u3002<br \/>\n\u30aa\u30ec\u30b3\u3099\u30f3: us-west1<br \/>\n\u30a2\u30a4\u30aa\u30ef: us-central1<br \/>\n\u30b5\u30a6\u30b9\u30ab\u30ed\u30e9\u30a4\u30ca: us-east1<br \/>\n30 GB \u6708\u306e HDD<\/p><\/blockquote>\n<p>f1-micro\u306f\u3068\u3099\u306e\u7a0b\u5ea6\u306e\u30b9\u30d8\u309a\u30c3\u30af\u304b\u3068\u3044\u3046\u3068\u3001CPU\u306f\u4eee\u60f31\u30b3\u30a2\u3001\u30e1\u30e2\u30ea\u306f614MB\u3066\u3099\u3059\u3002\u305f\u3063\u305f\u305d\u308c\u305f\u3099\u3051\uff1f\u3068\u601d\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304b\u3099\u3001\u305f\u3063\u305f\u305d\u308c\u305f\u3099\u3051\u3066\u3099\u3059\u3002\u305f\u305f\u3099\u3001\u3053\u306e\u30de\u30b7\u30f3\u3066\u3099Ubuntu\u306a\u3068\u3099\u306eLinux\u3066\u3099\u4f7f\u3063\u3066\u4e3b\u306b\u958b\u767a\u7528\u3001\u5b9f\u9a13\u7528\u306e\u30b5\u30fc\u30cf\u3099\u7528\u9014\u3068\u3059\u308b\u306a\u3089\u3001\u6c7a\u3057\u3066\u975e\u73fe\u5b9f\u7684\u306a\u74b0\u5883\u3066\u3099\u3082\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u203b\u3061\u306a\u307f\u306b\u3001GCP\u306e\u8cbb\u7528\u306fComputing Engine\u81ea\u4f53\u306e\u6599\u91d1\u4ee5\u5916\u306b\u30c6\u3099\u30fc\u30bf\u306e\u4e0b\u308a\u9001\u4fe1\u6599\u91d1\u304b\u3099\u3042\u308b\u306e\u3066\u3099\u3053\u3099\u6ce8\u610f\u304f\u305f\u3099\u3055\u3044\u3002\u305f\u305f\u3099\u3001\u3068\u3099\u306e\u7a0b\u5ea6\u4f7f\u3046\u304b\u306b\u3082\u3088\u308a\u307e\u3059\u304b\u3099\u3001\u6708\u306b100\u5186\u3082\u884c\u304b\u306a\u3044\u306e\u3066\u3099\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u8aac\u660e\u3092\u7aef\u6298\u308a\u307e\u3059\u304b\u3099\u3001\u6ce8\u610f\u3059\u308b\u3078\u3099\u304d\u306f\u30ea\u30fc\u30b7\u3099\u30e7\u30f3\u3092\u304d\u3061\u3093\u3068\u6307\u5b9a\u3055\u308c\u305f\u3082\u306e\u306b\u3059\u308b\u3053\u3068\u3068\u3001\u30c6\u3099\u30a3\u30b9\u30af\u5bb9\u91cf\u306f\u30d5\u3099\u30fc\u30c8\u30c6\u3099\u30a3\u30b9\u30af\uff08\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308bOS\u3092\u6c7a\u3081\u308b\uff09\u306e\u7de8\u96c6\u753b\u9762\u3066\u3099\u6307\u5b9a\u3059\u308b\uff08\u7121\u6599\u67a0\u3066\u3099\u6700\u5927\u306e30GB\u306b\u3057\u307e\u3057\u3087\u3046\uff09\u3053\u3068\u304f\u3089\u3044\u3066\u3099\u3059\u3002OS\u306f\u6700\u65b0\u306eUbuntu 20.04 LTS\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001\u5f8c\u3066\u3099Web\u30b5\u30fc\u30cf\u3099\u3092\u7acb\u3061\u4e0a\u3051\u3099\u308b\u306e\u3066\u3099\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306e\u8a2d\u5b9a\u3066\u3099HTTP\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3068HTTPS\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u6709\u52b9\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h3>\u65e5\u672c\u8a9e\u5316<\/h3>\n<p>\u4eee\u60f3\u30de\u30b7\u30f3\u304b\u3099\u7acb\u3061\u4e0a\u304b\u3099\u3063\u305f\u3089\u3001\u30e1\u30c3\u30bb\u30fc\u30b7\u3099\u306a\u3068\u3099\u306e\u65e5\u672c\u8a9e\u5316\u3068\u3001\u30bf\u30a4\u30e0\u30bd\u3099\u30fc\u30f3\u3092JST\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nb\">sudo <\/span>apt <span class=\"nt\">-y<\/span> <span class=\"nb\">install <\/span>language-pack-ja\r\n<span class=\"nb\">sudo <\/span>update-locale <span class=\"nv\">LANG<\/span><span class=\"o\">=<\/span>ja_JP.UTF-8\r\n<\/code><\/pre>\n<p>\u3053\u3053\u3066\u3099\u4e00\u65e6\u3001\u518d\u8d77\u52d5\u3057\u3066\u3001\u6b21\u306b\u30bf\u30a4\u30e0\u30bd\u3099\u30fc\u30f3\u306e\u8a2d\u5b9a\u3066\u3099\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nb\">sudo <\/span>dpkg-reconfigure tzdata\r\n<\/code><\/pre>\n<h3>\u30b9\u30ef\u30c3\u30d5\u309a\u306e\u8a2d\u5b9a<\/h3>\n<p>614MB\u306e\u30e1\u30e2\u30ea\u3066\u3099\u306f\u3055\u3059\u304b\u3099\u306b\u5c11\u306a\u3044\u306e\u3066\u3099\u3001\u30b9\u30ef\u30c3\u30d5\u309a\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u30021GB\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nb\">dd <\/span><span class=\"k\">if<\/span><span class=\"o\">=<\/span>\/dev\/zero <span class=\"nv\">of<\/span><span class=\"o\">=<\/span>\/swapfile <span class=\"nv\">bs<\/span><span class=\"o\">=<\/span>1M <span class=\"nv\">count<\/span><span class=\"o\">=<\/span>1024\r\n<span class=\"nb\">chmod <\/span>600 \/swapfile\r\nmkswap \/swapfile\r\nswapon \/swapfile\r\n<\/code><\/pre>\n<p>\u3053\u308c\u3066\u3099\u30b9\u30ef\u30c3\u30d5\u309a\u304b\u3099\u6709\u52b9\u306b\u306a\u308a\u307e\u3059\u304b\u3099\u3001\u518d\u8d77\u52d5\u5f8c\u3082\u30b9\u30ef\u30c3\u30d5\u309a\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u3001\/etc\/fstab\u306b\u4e0b\u8a18\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>\/swapfile swap swap defaults 0 0\r\n<\/code><\/pre>\n<h3>Apache\u306e\u5c0e\u5165<\/h3>\n<p>Jupyter Notebook\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5f8c\u3001Apache\u3066\u3099\u30ea\u30cf\u3099\u30fc\u30b9\u30d5\u309a\u30ed\u30ad\u30b7\u3059\u308b\u306e\u3066\u3099\u3001\u307e\u3059\u3099\u306fApache\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>apt <span class=\"nb\">install <\/span>apache2\r\n<\/code><\/pre>\n<p>\u79c1\u306f\u3055\u3089\u306bPHP\u3084\u3089MariaDB\u3084\u3089\u3092\u5165\u308c\u305f\u306e\u3066\u3099\u3059\u304b\u3099\u3001Jupyter Notebook\u3068\u306f\u7121\u95a2\u4fc2\u306a\u306e\u3066\u3099\u7aef\u6298\u308a\u307e\u3059\u3002\uff08\u30b9\u30ef\u30c3\u30d5\u309a\u304b\u3099\u6709\u52b9\u306a\u3089MariaDB\u3059\u3089\u4f7f\u3048\u308b\uff01\uff09<\/p>\n<p>\u307e\u305f\u3001SSL\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306a\u3089Let&#8217;s Encypt\u306e\u8a2d\u5b9a\u3082\u884c\u3044\u307e\u3059\u3002\uff08\u79c1\u3082\u3084\u308a\u307e\u3057\u305f\u3002\uff09\u3066\u3099\u3082\u3001Jupyter Notebook\u3068\u306f\u76f4\u63a5\u306e\u95a2\u4fc2\u304b\u3099\u7121\u3044\u306e\u3066\u3099\u3001\u305d\u308c\u3082\u7aef\u6298\u308a\u307e\u3059\uff65\uff65\uff65\u3002<\/p>\n<h3>Jupyter Notebook\u306e\u5c0e\u5165<\/h3>\n<p>Anaconda\u305f\u3099\u3068\u3061\u3087\u3063\u3068\u8377\u304b\u3099\u91cd\u3044\u304b\u306a\u3068\u601d\u3063\u305f\u306e\u3066\u3099\u3001Miniconda\u3092\u4f7f\u3044\u307e\u3059\u3002Miniconda\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306fanyenv\u3068pyenv\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>anyenv\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001\u3053\u3061\u3089\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306b\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>git clone https:\/\/github.com\/anyenv\/anyenv ~\/.anyenv\r\n<span class=\"nb\">echo<\/span> <span class=\"s1\">'export PATH=\"$HOME\/.anyenv\/bin:$PATH\"'<\/span> <span class=\"o\">&gt;&gt;<\/span> ~\/.bash_aliases\r\n~\/.anyenv\/bin\/anyenv init\r\n<\/code><\/pre>\n<p>\u3053\u3053\u3066\u3099\u3001\u3055\u3089\u306b.bash_aliases\u306b\u8ffd\u52a0\u3059\u308b\u6587\u5b57\u5217\u304b\u3099\u8868\u793a\u3055\u308c\u308b\u306e\u3066\u3099\u3001\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b7\u30a7\u30eb\u3092\u518d\u8d77\u52d5\u3057\u3066\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c8\u3099\u3002<\/p>\n<pre class=\"post-pre\"><code>anyenv <span class=\"nb\">install<\/span> <span class=\"nt\">--init<\/span>\r\n<\/code><\/pre>\n<p>\u6b21\u306f\u3001pyenv\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre class=\"post-pre\"><code>anyenv <span class=\"nb\">install <\/span>pyenv\r\n<\/code><\/pre>\n<p>pyenv\u3092\u4f7f\u3063\u3066Miniconda\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u6700\u65b0\u306eMiniconda\u305f\u3099\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304b\u3099\u7d42\u308f\u3089\u306a\u3044\uff08\u4eee\u60f3CPU\u304b\u30991\u30b3\u30a2\u305f\u3099\u3068\u30bf\u3099\u30e1\u3089\u3057\u3044\uff1f\uff09\u306e\u3066\u3099\u3001miniconda3-4.6.14\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>pyenv <span class=\"nb\">install <\/span>miniconda3-4.6.14\r\n<\/code><\/pre>\n<p>\u79c1\u306f\u30db\u30fc\u30e0\u30c6\u3099\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u306bdev\u30c6\u3099\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u3063\u3066\u3001\u305d\u3053\u3066\u3099Miniconda\u3092\u6709\u52b9\u306b\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u306e\u3066\u3099\u3001\u3053\u306e\u3088\u3046\u306a\u64cd\u4f5c\u3092\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nb\">cd<\/span> ~\/\r\n<span class=\"nb\">mkdir <\/span>dev\r\n<span class=\"nb\">cd <\/span>dev\r\npyenv <span class=\"nb\">local <\/span>miniconda3-4.6.14\r\n<\/code><\/pre>\n<p>\u3055\u3089\u306bJupyter Notebook\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>pip <span class=\"nb\">install <\/span>jupyter notebook\r\n<\/code><\/pre>\n<p>Jupyter Notebook\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u30cf\u309a\u30b9\u30ef\u30fc\u30c8\u3099\u3092\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>jupyter notebook <span class=\"nt\">--generate-config<\/span>\r\njupyter notebook password\r\n<\/code><\/pre>\n<h3>Jupyter Notebook\u306e\u81ea\u52d5\u8d77\u52d5<\/h3>\n<p>\u30b5\u30fc\u30cf\u3099\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u306b\u306fJupyter Notebook\u304b\u3099\u81ea\u52d5\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304b\u3099\u3042\u308a\u307e\u3059\u3002\u305d\u3053\u3066\u3099\u3001\/etc\/systemd\/system\/jupyter.service\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002{USER}\u3068{GROUP}\u306b\u3064\u3044\u3066\u306f\u3001\u9069\u5b9c\u7f6e\u304d\u63db\u3048\u3066\u304f\u305f\u3099\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>[Unit]\r\nDescription = Jupyter Notebook\r\n[Service]\r\nType=simple\r\nPIDFile=\/var\/run\/jupyter-notebook.pid\r\nExecStart=\/home\/{USER}\/.anyenv\/envs\/pyenv\/shims\/jupyter notebook\r\nWorkingDirectory=\/home\/{USER}\/dev\r\nUser={USER}\r\nGroup={GROUP}\r\nRestart=always\r\n[Install]\r\nWantedBy = multi-user.target\r\n<\/code><\/pre>\n<p>\u3042\u3068\u306f\u3001\u4e0b\u8a18\u306e\u3068\u304a\u308a\u3002<\/p>\n<pre class=\"post-pre\"><code>systemctl start jupyter\r\nsystemctl <span class=\"nb\">enable <\/span>jupyter\r\n<\/code><\/pre>\n<h3>Apache\u306e\u30ea\u30cf\u3099\u30fc\u30b9\u30d5\u309a\u30ed\u30ad\u30b7\u306e\u8a2d\u5b9a<\/h3>\n<p>\u6700\u5f8c\u306b\u30ea\u30cf\u3099\u30fc\u30b9\u30d5\u309a\u30ed\u30ad\u30b7\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002\u4eca\u56de\u306f\u3001https:\/\/\u30c8\u3099\u30e1\u30a4\u30f3\/notebook\/\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5148\u307b\u3068\u3099\u4f5c\u6210\u3057\u305fJupyter\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff08\u30db\u30fc\u30e0\u30c6\u3099\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u3001.jupyter\/jupyter_notebook_config.py\uff09\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002\u7de8\u96c6\u7b87\u6240\u306e\u307f\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>c.NotebookApp.allow_remote_access = True\r\nc.NotebookApp.base_url = '\/notebook\/'\r\nc.NotebookApp.open_browser = False\r\n<\/code><\/pre>\n<p>Apache2\u306esites-available\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002\u3053\u308c\u3082\u7de8\u96c6\u7b87\u6240\u306e\u307f\u3002SSLProxyEngine\u306f\u3001\u79c1\u306e\u74b0\u5883\u3066\u3099\u306f\u5b9f\u306fSSL\u5316\u3057\u3066\u3044\u308b\u305f\u3081\u3066\u3099\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nc\">SSLProxyEngine<\/span> <span class=\"ss\">On<\/span>\r\n<span class=\"nc\">ProxyRequests<\/span> <span class=\"ss\">Off<\/span>\r\n<span class=\"nc\">ProxyPreserveHost<\/span> <span class=\"ss\">On<\/span>\r\n<span class=\"p\">&lt;<\/span><span class=\"nl\">Proxy<\/span><span class=\"sr\"> https:\/\/localhost:443<\/span><span class=\"p\">&gt;\r\n<\/span>    <span class=\"nc\">Require<\/span> <span class=\"ss\">all<\/span> granted\r\n<span class=\"p\">&lt;\/<\/span><span class=\"nl\">Proxy<\/span><span class=\"p\">&gt;\r\n&lt;<\/span><span class=\"nl\">Location<\/span><span class=\"sr\"> \/notebook\/<\/span><span class=\"p\">&gt;\r\n<\/span>    <span class=\"nc\">ProxyPass<\/span> http:\/\/localhost:8888\/notebook\/\r\n    <span class=\"nc\">ProxyPassReverse<\/span> http:\/\/localhost:8888\/notebook\/\r\n<span class=\"p\">&lt;\/<\/span><span class=\"nl\">Location<\/span><span class=\"p\">&gt;\r\n&lt;<\/span><span class=\"nl\">Location<\/span><span class=\"sr\"> \/notebook\/terminals\/websocket\/<\/span><span class=\"p\">&gt;\r\n<\/span>    <span class=\"nc\">ProxyPass<\/span> ws:\/\/localhost:8888\/notebook\/terminals\/websocket\/\r\n    <span class=\"nc\">ProxyPassReverse<\/span> ws:\/\/localhost:8888\/notebook\/terminals\/websocket\/\r\n<span class=\"p\">&lt;\/<\/span><span class=\"nl\">Location<\/span><span class=\"p\">&gt;\r\n&lt;<\/span><span class=\"nl\">LocationMatch<\/span><span class=\"sr\"> \/notebook\/(api\/kernels\/[^\/]+\/channels.*)<\/span><span class=\"p\">&gt;\r\n<\/span>    <span class=\"nc\">ProxyPass<\/span> ws:\/\/localhost:8888\/notebook\/$1\r\n    <span class=\"nc\">ProxyPassReverse<\/span> ws:\/\/localhost:8888\/notebook\/$1\r\n<span class=\"p\">&lt;\/<\/span><span class=\"nl\">LocationMatch<\/span><span class=\"p\">&gt;\r\n<\/span><\/code><\/pre>\n<p>\u3044\u304f\u3064\u304b\u306eApache\u30e2\u30b7\u3099\u30e5\u30fc\u30eb\u3092\u6709\u52b9\u5316\u3059\u308b\u5fc5\u8981\u304b\u3099\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>a2enmod proxy\r\na2enmod proxy_http\r\na2enmod proxy_wstunnel\r\n<\/code><\/pre>\n<p>\u3042\u3068\u306fApache\u306e\u518d\u8d77\u52d5\u3092\u884c\u3048\u306f\u3099OK\u3066\u3099\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>systemctl restart apache2\r\n<\/code><\/pre>\n<p>Pandas\u3084Matplotlib\u3082\u554f\u984c\u306a\u304f\u52d5\u4f5c\u3057\u307e\u3059\u306e\u3066\u3099\uff08Miniconda\u306a\u306e\u3066\u3099\u3001\u305d\u308c\u305d\u3099\u308c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5fc5\u8981\u3066\u3099\u3059\u304b\u3099\uff65\uff65\uff65\uff09\u3001\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u662f\u975e\u8a66\u3057\u3066\u307f\u3066\u304f\u305f\u3099\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3046\u3044\u3046\u5185\u5bb9\u306fnote\u3088\u308aQiita\u304b\u306a\u3068\u601d\u3044\u3001\u8ee2\u8f09\u3057\u3066\u307f\u307e\u3059\u3002 https:\/\/note.com\/inocc [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-46367","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>- Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:description\" content=\"\u3053\u3046\u3044\u3046\u5185\u5bb9\u306fnote\u3088\u308aQiita\u304b\u306a\u3068\u601d\u3044\u3001\u8ee2\u8f09\u3057\u3066\u307f\u307e\u3059\u3002 https:\/\/note.com\/inocc [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-16T22:40:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T03:51:15+00:00\" \/>\n<meta name=\"author\" content=\"\u97f5, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u97f5, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/\",\"name\":\"- Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-04-16T22:40:20+00:00\",\"dateModified\":\"2024-04-30T03:51:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\",\"name\":\"\u97f5, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"caption\":\"\u97f5, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"- Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/","og_locale":"zh_CN","og_type":"article","og_description":"\u3053\u3046\u3044\u3046\u5185\u5bb9\u306fnote\u3088\u308aQiita\u304b\u306a\u3068\u601d\u3044\u3001\u8ee2\u8f09\u3057\u3066\u307f\u307e\u3059\u3002 https:\/\/note.com\/inocc [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-04-16T22:40:20+00:00","article_modified_time":"2024-04-30T03:51:15+00:00","author":"\u97f5, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u97f5, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/","name":"- Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-04-16T22:40:20+00:00","dateModified":"2024-04-30T03:51:15+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e","name":"\u97f5, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","caption":"\u97f5, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/46367-2\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/46367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=46367"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/46367\/revisions"}],"predecessor-version":[{"id":91743,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/46367\/revisions\/91743"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=46367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=46367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=46367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}