AlmaLinuxにGunicornいれてみた
いつものお勉強用AlmaLinuxにPythonを入れ終わったので、今度はGunicorn(Green Unicorn)を入れてみた
Gunicornとは
1. インストール
pip install gunicorn
(余談)
私がPythonをインストールした後には「pip-3」と「pip3」が利用できるようになっていて、どちらも同じものでした。
他のバージョンのPythonと共存することもないので、今回は「pip-3」コマンドを「pip」として利用できるようにしてます。
pip-3 -> /etc/alternatives/pip-3
pip3 -> /etc/alternatives/pip3
# pip-3 -V pip 20.2.4 from /usr/lib/python3.9/site-packages/pip (python 3.9)
# pip3 -V pip 20.2.4 from /usr/lib/python3.9/site-packages/pip (python 3.9)
また、Gunicornインストール時に「WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.」と警告が出たのですが、インストールはできているようなので問題なしとしてます。
[root@localhost ~]# pip install gunicorn
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
Collecting gunicorn
Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
|████████████████████████████████| 79 kB 1.7 MB/s
Requirement already satisfied: setuptools>=3.0 in /usr/lib/python3.9/site-packages (from gunicorn) (50.3.2)
Installing collected packages: gunicorn
Successfully installed gunicorn-20.1.0
詳しく調べようと思ったけど、私が調べたいことをまとめているページがありましたので、参考にしてください。