CentOSにLiteSpeedをインストールする方法

LiteSpeedは、Apacheのフォークである人気のあるWebサーバーです。最適化され、一般的に高速になるように構築されています。CentOSがクリーンインストールされていると想定します。

このガイドでは、LiteSpeed Standardをインストールします。これは、OpenLiteSpeedの代替となるLiteSpeedの無料バージョンです(LiteSpeedのオープンソースバージョンでもあり、無料です)。

ステップ1:すべてのソフトウェアを更新する

サーバーが完全に最新であることを確認する必要があります。次のように更新して、そうであることを確認してくださいyum

yum update -y

これにより、サーバーにインストールされているすべてのソフトウェアが更新されます。アップグレード後、LiteSpeedを続行してインストールできます。

ステップ2:開発ツールのインストール

LiteSpeedには、開発者ツールのインストールが必要です。それらをインストールするyum

sudo yum groupinstall 'Development Tools'
sudo yum install libxml2-devel.x86_64 openssl-devel.x86_64 bzip2-devel.x86_64 libcurl-devel.x86_64 db4-devel.x86_64 \ 
libjpeg-devel.x86_64 libpng-devel.x86_64 libXpm-devel.x86_64 freetype-devel.x86_64 gmp-devel.x86_64 \ 
libc-client-devel.x86_64 openldap-devel.x86_64 libmcrypt-devel.x86_64 mhash-devel.x86_64 freetds-devel.x86_64 \ 
zlib-devel.x86_64 mysql-devel.x86_64 ncurses-devel.x86_64 pcre-devel.x86_64 unixODBC-devel.x86_64 postgresql-devel.x86_64 \ 
sqlite-devel.x86_64 aspell-devel.x86_64 readline-devel.x86_64 recode-devel.x86_64 net-snmp-devel.x86_64 \
libtidy-devel.x86_64 libxslt-devel.x86_64 t1lib-devel.x86_64

このコマンドが完了すると、開発者ツールがインストールされ、LiteSpeedをダウンロードできます。

ステップ3:LiteSpeedのダウンロード

このガイドでは、LiteSpeed Standardをインストールします。これは、LiteSpeed Webサイトからダウンロードできます。下にスクロールして、Linux(x86)用のLiteSpeed Standardエディションを探します。ダウンロードボタンを右クリックしてリンクをコピーすると、のようなリンクが作成されhttp://www.litespeedtech.com/packages/4.0/lsws-4.2.24-std-i386-linux.tar.gzます。サーバーで、次を実行します。

wget URL

例えば:

wget http://www.litespeedtech.com/packages/4.0/lsws-4.2.24-std-i386-linux.tar.gz

次にLiteSpeedを解凍し.tar.gzます。これを行うには、以下を実行します。

tar -zxvf lsws*

ステップ4:LiteSpeedのインストール

LiteSpeedをダウンロードしたら、cdLiteSpeedフォルダーに移動してinstall.shファイルを実行します。

./install.sh

用語が表示されます。同意する場合は、スペースバーを数回押して下にスクロールします。これを数回実行すると、次のようになります。

IMPORTANT: In order to continue installation you must agree with above 
           license terms by typing "Yes" with capital "Y"! 

Do you agree with above license? 

Y同意する場合は、大文字で「はい」と入力します。

LiteSpeedをインストールする場所を尋ねられます。デフォルトのディレクトリにインストールする場合は、Enterキーを押します。

Please specify the destination directory. You must have permissions to 
create and manage the directory. It is recommended to install the web server 
at /opt/lsws, /usr/local/lsws or in your home directory like '~/lsws'.

ATTENTION: The user 'nobody' must be able to access the destination
           directory.

Destination [/usr/local/lsws]: 

Webインターフェースにログインできるように、管理者のユーザー名を入力するように求められます。

Please specify the user name of the administrator.
This is the user name required to log into the administration web interface.

User name [admin]: 

「admin」という名前を使用する場合は、Enterキーを押します。ただし、セキュリティ上の理由から名前を変更することをお勧めします。別の名前を使用する場合は、その名前を入力してEnterキーを押します。

管理者のパスワードを入力するように求められます。Webインターフェースにアクセスするには、このパスワードを使用する必要があります。

Please specify the administrator's password.
This is the password required to log into the administration web interface.

Password: 

管理者ユーザーでアクセスできるすべてのユーザーがサーバーを管理できるため、安全なパスワードであることを確認してください。

メールアドレス(または必要に応じてそれ以上)を入力するように求められます。サーバー/ LiteSpeedのインストールに関連する通知を受け取る必要がある場合、ソフトウェアはここにリストされているメールアドレスにメールで通知します。

Please specify administrators' email addresses.
It is recommended to specify a real email address,
Multiple email addresses can be set by a comma 
delimited list of email addresses. Whenever something
abnormal happened, a notificiation will be sent to 
emails listed here.

Email addresses [root@localhost]: 

例えば:

Email addresses [root@localhost]: [email protected]

または、複数のメールアドレスを使用する場合は、次のようにカンマ区切りのリストを使用します。

    Email addresses [root@localhost]: [email protected], [email protected]

Webサーバーを実行するユーザーを入力するように求められます。root権限を持つユーザーを使用することは非常に安全でないので、これが非rootユーザーであることを確認してください!

As you are the root user, you must choose the user and group
whom the web server will be running as. For security reason, you should choose
a non-system user who does not have login shell and home directory such as
'nobody'.

User [nobody]: 

ここに何を入力するかわからない場合は、「nobody」のままにしてください。

次の質問についても同じようにします。

Please choose the group that the web server running as.

User 'nobody' is the member of following group(s):  nobody
Group [nobody]: 

Webサーバーがリッスンするポートを尋ねられます。一般的に、訪問者はURLの後にポートを入力する必要がないため、これをポート80に設定します。特定の状況では、これを変更したい場合がありますが、明確な理由がない場合は、ここに80を入力してください。

Please specify the port for normal HTTP service.
Port 80 is the standard HTTP port, only 'root' user is allowed to use 
port 80, if you have another web server running on port 80, you need to
specify another port or stop the other web server before starting LiteSpeed
Web Server.
You can access the normal web page at http://<YOUR_HOST>:<HTTP_PORT>/

HTTP port [8088]: 80

LiteSpeed Webサーバーの管理に使用できる管理Webインターフェイスがあります。このWebインターフェースは、7080(デフォルト)などの別のポートで実行する必要があります。別のポートでリッスンしたくない場合は、デフォルトのままにしておくことができます。次に、と入力して、管理Webインターフェースにアクセスできますhttp://domain.com:port

Please specify the HTTP port for the administration web interface,
which can be accessed through http://<YOUR_HOST>:<ADMIN_PORT>/

Admin HTTP port [7080]: 

PHPを使用するかどうか尋ねられます。CMS(Joomla!やWordPressなど)を使用する必要がある場合は、これを有効にする必要があります。YPHPを有効にするかどうかを入力しnます。

You can setup a global script handler for PHP with the pre-built PHP engine
shipped with this package now. The PHP engine runs as Fast CGI which  
outperforms Apache's mod_php. 
You can always replace the pre-built PHP engine with your customized PHP 
engine.

Setup up PHP [Y/n]: Y

次の質問については、上級ユーザーでなく、ここで何をしているのかを理解していない限り、Enterキーを押してください。

Suffix for PHP script(comma separated list) [php]:

AWStatsを使用するかどうかを尋ねられます。AWStatsは、訪問者に関する詳細情報を確認できるように統計を生成するプログラムです。入力yあなたはAWStatsのを使用する場合、またはNあなたはこれをしたくない場合。

AWStats is a popular log analyzer that generates advanced web server 
statistics. LiteSpeed web server seamlessly integrates AWStats into 
its Web Admin Interface. AWStats configuration and statistics update
have been taken care of by LiteSpeed web server.

Note: If AWStats has been installed already, you do not need to
      install again unless a new version of AWStats is available.

Would you like to install AWStats Add-on module [y/N]? N

次に、サーバーの再起動時にLiteSpeedを自動的に起動するかどうかを尋ねられます。ダウンタイムを防ぐには、おそらくこれが必要なので、と入力しYます。

Would you like to have LiteSpeed Web Server started automatically
when the server restarts [Y/n]? Y

今すぐLiteSpeedを起動する場合は、と入力しYます。後で手動で開始する場合は、と入力しnます。

[OK] The startup script has been successfully installed!
Would you like to start it right now [Y/n]? Y

すべてがうまくいった場合、次のメッセージが表示されます。

LiteSpeed Web Server started successfully! Have fun!

ここでサーバーのIPまたはドメイン名にアクセスすると、デフォルトのページが表示されます。これでウェブサイトの作成を開始できます!

ステップ5:ファイアウォールを構成する

LiteSpeed Webサーバーへのトラフィックを許可するには、Webサーバー(80)と管理Webインターフェイス(7080)のポートを開く必要があります。

iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 7080 -j ACCEPT
service iptables save

インストール中にこれらのポートを変更した場合は、iptablesルールでもそれらを変更してください。

おめでとうございます。これで、完全に機能するLiteSpeed Webサーバーが完成しました。質問や問題がある場合は、ドキュメントまたはLiteSpeedサポートフォーラムを参照してください。



Leave a Comment

CentOS 7にApacheをインストールする方法

CentOS 7にApacheをインストールする方法

CentOS 7サーバーにApache 2.4をインストールする方法を説明します。安定したウェブサーバーを構築するための前提条件と手順を解説します。

FreeBSD 11.1にBlacklistdをインストールする方法

FreeBSD 11.1にBlacklistdをインストールする方法

FreeBSD 11.1におけるBlacklistdのインストール方法について詳しく解説します。この方法を通じて、強力なセキュリティ対策を実装できます。

Windows Serverのサーバーマネージャーを使用した複数サーバーの管理

Windows Serverのサーバーマネージャーを使用した複数サーバーの管理

サーバーマネージャーを使用して、Windows Serverの管理が向上します。セキュリティリスクを軽減し、効率的な管理を実現します。

CentOS 7にSeafileサーバーをインストールする方法

CentOS 7にSeafileサーバーをインストールする方法

CentOS 7にSeafileサーバーをインストールする方法。Seafile(コミュニティバージョン)は、ownCloudに似た無料のオープンソースファイル同期および共有ソリューションです。

DebianでSnortを設定する方法

DebianでSnortを設定する方法

Snortは無料のネットワーク侵入検知システムです。最新の方法で、SnortをDebianにインストールし、設定する手順を紹介します。ネットワークのセキュリティを強化しましょう。

CentOS 7にGraylogサーバーをインストールする方法

CentOS 7にGraylogサーバーをインストールする方法

CentOS 7にGraylogサーバーをインストールし、ログ管理を行う方法を学びます。

WindowsでhMailServerを使用してメールサーバーを構築する

WindowsでhMailServerを使用してメールサーバーを構築する

WindowsサーバーでWebサイトを実行している場合、電子メールも受信できるようにするためにhMailServerを使用する方法を解説します。

Ubuntu 19.04にFiveMサーバーをインストールする方法

Ubuntu 19.04にFiveMサーバーをインストールする方法

FiveMサーバーをUbuntu 19.04にインストールするための詳細なガイド。必要条件からインストール、起動、トラブルシューティングまで、すべてのステップを含みます。

WsgiDAVを使用してDebian 10にWebDAVをデプロイする

WsgiDAVを使用してDebian 10にWebDAVをデプロイする

Debian 10にWebDAVをデプロイする方法を学び、WsgiDAVとSSL証明書で安全な接続を実現しましょう。

ヘルスケア2021における人工知能の影響

ヘルスケア2021における人工知能の影響

ヘルスケアにおけるAIは、過去数十年から大きな飛躍を遂げました。したがって、ヘルスケアにおけるAIの未来は、日々成長を続けています。