目次
文書の過去の版を表示しています。
Fedora 31 に OpenLiteSpeed をインストールする方法
本家: Get OpenLiteSpeed!
LiteSpeed | Internet. Accelerated. - LiteSpeed Technologies
ソースコード: litespeedtech/openlitespeed: Our high-performance, lightweight, open source HTTP server
OpenLiteSpeed は、LiteSpeed Web Server Enterprise のオープンソース版である。
主な特徴は、NGINX よりも高速、イベント駆動型アーキテクチャ、Apache 書き換えルールの理解、使いやすい管理インターフェイス、スピードとセキュリティのためのビルド、インテリジェントキャッシュアクセラレーション、PageSpeed の最適化、PHP LiteSpeed SAPI などである。
インストール
バイナリ インストール
参考文献: How to Install OpenLiteSpeed from Binary • OpenLiteSpeed
ダウンロード ページから OpenLiteSpeed バイナリを ダウンロード する。
$ curl -O https://openlitespeed.org/packages/openlitespeed-1.6.6.tgz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 49.1M 100 49.1M 0 0 1674k 0 0:00:30 0:00:30 --:--:-- 3083k $ tar zxvf openlitespeed-1.6.6.tgz openlitespeed/ openlitespeed/modules/ openlitespeed/modules/modinspector.so ... $ cd openlitespeed $ sudo ./install.sh $ sudo systemctl start lshttpd $ sudo systemctl status lshttpd ● lshttpd.service - OpenLiteSpeed HTTP Server Loaded: loaded (/usr/lib/systemd/system/lshttpd.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2020-01-28 05:52:08 JST; 36min ago Main PID: 17435 (litespeed) CGroup: /system.slice/lshttpd.service ├─17435 openlitespeed (lshttpd - main) ├─17440 openlitespeed (lscgid) ├─17441 openlitespeed (lshttpd - #01) ├─17442 openlitespeed (lshttpd - #02) ├─17443 openlitespeed (lshttpd - #03) └─17444 openlitespeed (lshttpd - #04) 1月 28 05:52:06 cmon-fc systemd[1]: Starting OpenLiteSpeed HTTP Server... 1月 28 05:52:06 cmon-fc lswsctrl[124]: [OK] litespeed: pid=137. 1月 28 05:52:08 cmon-fc systemd[1]: Started OpenLiteSpeed HTTP Server. $ sudo firewall-cmd --set-default-zone=FedoraServer $ sudo firewall-cmd --permanent --add-service=http $ sudo firewall-cmd --permanent --add-service=https $ sudo firewall-cmd --reload
※インストール先は /usr/local/lsws である。
http://localhost:8088 にアクセスする。
Demos の phpinfo が何も表示されない場合
恐らく libnsl がシステムにインストールされていないのでインストールする。
$ sudo dnf install libnsl -y
ソースコードのビルド
※configure でエラーになり上手く行かない。
参考文献: OpenLiteSpeed installation from source code • OpenLiteSpeed
依存パッケージのインストール。
$ sudo dnf install gcc gcc-c++ make autoconf glibc rcs $ sudo dnf install pcre-devel openssl-devel expat-devel geoip-devel zlib-devel udns-devel
ソースコードのダウンロード。
$ git clone https://github.com/litespeedtech/openlitespeed.git
configure & make
$ cd openlitespeed $ ./configure $ make
LiteSpeed WebAdmin Console
https://localhost:7080/ にアクセスする。
LiteSpeed WebAdmin Console で 503 Server Unavailable エラーが発生する場合
恐らく libnsl がシステムにインストールされていないのでインストールする。
$ sudo dnf install libnsl -y
LiteSpeed WebAdmin Console のユーザー/パスワードが分からない
初期設定では admin/123456 である。
/usr/local/lsws/admin/misc/admpass.sh でリセットできる。
$ sudo /usr/local/lsws/admin/misc/admpass.sh Please specify the user name of administrator. This is the user name required to login the administration Web interface. User name [admin]: Please specify the administrator's password. This is the password required to login the administration Web interface. Password: Retype password: Administrator's username/password is updated successfully!
WSGI Web アプリの実行
参考文献: Running Python WSGI Apps with LSAPI • OpenLiteSpeed
Documentation for Python LiteSpeed Server API - LiteSpeed Technologies
Python ライブラリのインストール
$ sudo dnf install python3-devel python3-pip
Python モジュールのインストール
LiteSpeed Server API Downloads - LiteSpeed Technologies より Python Module をダウンロードしてインストールする。
$ curl -O https://www.litespeedtech.com/packages/lsapi/wsgi-lsapi-1.5.tgz $ tar xvzf wsgi-lsapi-1.5.tgz $ cd wsgi-lsapi-1.5 $
トラブルシューティング
error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory が発生する
依存するライブラリがインストールされていないのでインストールする。
$ sudo dnf install libxcrypt-compat