両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン |
python:uwsgi [2020/04/02 03:05] – ともやん | python:uwsgi [2020/04/08 11:22] – [参考文献] ともやん |
---|
<html> | <html> |
<style> | <style> |
#result pre { | #result pre, #mincode pre { |
height: 200px; | |
overflow: scroll; | overflow: scroll; |
overflow-x: hidden; | overflow-x: hidden; |
| font-size: 10px; |
| } |
| #result_long pre { |
| height: 400px; |
| overflow: scroll; |
| overflow-x: hidden; |
| font-size: 10px; |
} | } |
</style> | </style> |
本家: [[https://uwsgi-docs.readthedocs.io/en/latest/|The uWSGI project — uWSGI 2.0 documentation]]\\ | 本家: [[https://uwsgi-docs.readthedocs.io/en/latest/|The uWSGI project — uWSGI 2.0 documentation]]\\ |
ソースコード: [[https://github.com/unbit/uwsgi|GitHub - unbit/uwsgi: uWSGI application server container]]\\ | ソースコード: [[https://github.com/unbit/uwsgi|GitHub - unbit/uwsgi: uWSGI application server container]]\\ |
| |
| ===== dnf によるインストール ===== |
| <code> |
| $ sudo dnf install uwsgi |
| </code> |
| <WRAP prewrap 100% #result_long> |
| <code> |
| メタデータの期限切れの最終確認: 0:00:16 時間前の 2020年04月08日 09時34分29秒 に実 施しました。 |
| 依存関係が解決しました。 |
| ================================================================================== |
| Package Architecture Version Repository Size |
| ================================================================================== |
| インストール: |
| uwsgi x86_64 2.0.18-2.fc31 fedora 383 k |
| |
| トランザクションの概要 |
| ================================================================================== |
| インストール 1 パッケージ |
| |
| ダウンロードサイズの合計: 383 k |
| インストール済みのサイズ: 898 k |
| これでよろしいですか? [y/N]: y |
| パッケージのダウンロード: |
| uwsgi-2.0.18-2.fc31.x86_64.rpm 670 kB/s | 383 kB 00:00 |
| ---------------------------------------------------------------------------------- |
| 合計 319 kB/s | 383 kB 00:01 |
| トランザクションの確認を実行中 |
| トランザクションの確認に成功しました。 |
| トランザクションのテストを実行中 |
| トランザクションのテストに成功しました。 |
| トランザクションを実行中 |
| 準備 : 1/1 |
| scriptletの実行中: uwsgi-2.0.18-2.fc31.x86_64 1/1 |
| インストール中 : uwsgi-2.0.18-2.fc31.x86_64 1/1 |
| scriptletの実行中: uwsgi-2.0.18-2.fc31.x86_64 1/1 |
| Executing systemd post-install tasks |
| |
| 検証 : uwsgi-2.0.18-2.fc31.x86_64 1/1 |
| |
| インストール済み: |
| uwsgi-2.0.18-2.fc31.x86_64 |
| |
| 完了しました! |
| </code> |
| </WRAP> |
| |
| ===== pip によるインストール ===== |
| <code> |
| $ pip install uwsgi |
| </code> |
| <WRAP prewrap 100% #result> |
| <code> |
| Collecting uwsgi |
| Downloading uwsgi-2.0.18.tar.gz (801 kB) |
| |████████████████████████████████| 801 kB 738 kB/s |
| Installing collected packages: uwsgi |
| Running setup.py install for uwsgi ... done |
| Successfully installed uwsgi-2.0.18 |
| </code> |
| </WRAP> |
| |
===== Apache 2.4 への mod_uwsgi.so のインストール ===== | ===== Apache 2.4 への mod_uwsgi.so のインストール ===== |
$ sudo -s | $ sudo -s |
</code> | </code> |
<WRAP prewrap 100%> | <WRAP prewrap 100% #result> |
<code> | <code> |
# cd ~ | # cd ~ |
# curl -O https://raw.githubusercontent.com/unbit/uwsgi/master/apache2/mod_uwsgi.c | # curl -O https://raw.githubusercontent.com/unbit/uwsgi/master/apache2/mod_uwsgi.c |
| </code> |
| </WRAP> |
| <WRAP prewrap 100% #result> |
| <code> |
% Total % Received % Xferd Average Speed Time Time Time Current | % Total % Received % Xferd Average Speed Time Time Time Current |
Dload Upload Total Spent Left Speed | Dload Upload Total Spent Left Speed |
</code> | </code> |
</WRAP> | </WRAP> |
<WRAP prewrap 100% #result> | |
<code> | <code> |
# apxs -i -a -c mod_uwsgi.c | # apxs -i -a -c mod_uwsgi.c |
| </code> |
| <WRAP prewrap 100% #result_long> |
| <code> |
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_uwsgi.lo mod_uwsgi.c && touch mod_uwsgi.slo | /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_uwsgi.lo mod_uwsgi.c && touch mod_uwsgi.slo |
mod_uwsgi.c: 関数 ‘uwsgi_handler’ 内: | mod_uwsgi.c: 関数 ‘uwsgi_handler’ 内: |
# vi /etc/httpd/conf/httpd.conf | # vi /etc/httpd/conf/httpd.conf |
</code> | </code> |
| <WRAP prewrap 100% #mincode> |
<file autoconf /etc/httpd/conf/httpd.conf> | <file autoconf /etc/httpd/conf/httpd.conf> |
# | # |
Include conf.modules.d/*.conf | Include conf.modules.d/*.conf |
</file> | </file> |
| </WRAP> |
| |
===== 参考文献 ===== | ===== 参考文献 ===== |
[[https://uwsgi-docs.readthedocs.io/en/latest/|The uWSGI project — uWSGI 2.0 documentation]]\\ | [[https://uwsgi-docs.readthedocs.io/en/latest/|The uWSGI project — uWSGI 2.0 documentation]]\\ |
[[https://uwsgi-docs.readthedocs.io/en/latest/Apache.html|Apache support — uWSGI 2.0 documentation]]\\ | [[https://uwsgi-docs.readthedocs.io/en/latest/Apache.html|Apache support — uWSGI 2.0 documentation]]\\ |
| [[https://chriswarrick.com/blog/2016/02/10/deploying-python-web-apps-with-nginx-and-uwsgi-emperor/|Deploying Python Web Applications with nginx and uWSGI Emperor | Chris Warrick]]\\ |
| [[https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/uwsgi/|How to use Django with uWSGI | Django documentation | Django]]\\ |
| |