このチュートリアルでは、WHM/cPanelコントロールパネルがインストールされているサーバーにEngintronを使用してNginxをインストールする方法を説明します。
Engintronは無料のWHM/cPanelプラグインであり、デフォルトのApacheWebサーバーのリバースプロキシとしてNginxWebサーバーをインストールするために使用できます。 WHM / cPanelサーバーでApacheのリバースプロキシとしてNginxを使用する理由は、ApacheがPHP、Perlなどの動的コンテンツをサーバーし、NginxがCSS、Javascriptなどの静的コンテンツを提供する責任があるためです。 、および画像。
Nginx with EngintronをcPanelサーバーにインストールするのに数分かかる場合があり、非常に簡単なプロセスです。仕事に取り掛かりましょう!
- 2GB以上のRAMを搭載したサーバー
- 完全なSSHルートアクセスまたはsudo権限を持つユーザーも必要です。
- サーバーにWHM/cPanelコントロールパネルをインストールしました
インストールを開始する前に、システムを最新の状態に更新する必要があります
sudo yum update -y && sudo yum upgrade -y sudo /usr/local/cpanel/scripts/upcp
Engintronプラグインのインストール
システムが更新されたら、インストールプロセスに進むことができます。まず、サーバーの「ルート」ディレクトリに移動し、古い「engintron.sh」スクリプトが存在する場合はそれを削除して、最新のインストールスクリプトをダウンロードします。
cd / rm -f engintron.sh wget --no-check-certificate https://raw.githubusercontent.com/engintron/engintron/master/engintron.sh
スクリプトがダウンロードされたら、スクリプトを実行し、インストールプロセスが完了するまでしばらく待つ必要があります。
bash engintron.sh install
インストールが成功すると、apache、tailwatchd、apache_php_fpm、nginxなどのサービスがどのように再起動されているかが画面に表示されます。インストールの最後に次の出力が表示されます。
httpd started successfully. Redirecting to /bin/systemctl restart httpd.service Redirecting to /bin/systemctl restart nginx.service ************************************** * Installation Complete * **************************************
これで、Apacheがポート8080と8443をリッスンし、Nginxがポート80と443に設定されていることがわかります。これにより、Engintronのインストールが成功したことがわかります。これを確認するには、以下のコマンドを実行します。
netstat -tunlp | grep httpd && netstat -tunlp | grep nginx
Engintron CLI
Engintronの使用状況を確認するには、サーバーで次のコマンドを実行します。
bash /engintron.sh
次の出力が表示されます。
[root@test.vps /]# bash /engintron.sh
_______ _____________ ____________ ____ _ __
/ ____/ | / / ____/ _/ | / /_ __/ __ \/ __ \/ | / /
/ __/ / |/ / / __ / // |/ / / / / /_/ / / / / |/ /
/ /___/ /| / /_/ // // /| / / / / _, _/ /_/ / /| /
/_____/_/ |_/\____/___/_/ |_/ /_/ /_/ |_|\____/_/ |_/
https://engintron.com
Engintron (v1.16.0) is the easiest way to integrate Nginx on your cPanel/WHM server.
Usage: /engintron.sh [command] [flag]
Main commands:
install Install, re-install or update Engintron (enables Nginx by default).
Add optional flag "mainline" to install Nginx mainline release.
remove Remove Engintron completely.
enable Set Nginx to ports 80/443 & Apache to ports 8080/8443
disable Set Nginx to ports 8080/8443 & switch Apache to ports 80/443
purgecache Purge Nginx's "cache" & "temp" folders,
then restart both Apache & Nginx
purgelogs Purge Nginx's access & error log files
Utility commands:
res Restart web servers only (Apache & Nginx)
res force Restart Apache & force restart Nginx (kills all previous Nginx processes)
resall Restart Cron, CSF & LFD (if installed), Munin (if installed),
MySQL, Apache, Nginx
80 Show active connections on port 80 sorted by connection count & IP,
including total concurrent connections count
443 Show active connections on port 443 sorted by connection count & IP,
including total concurrent connections count
fixaccessperms Change file & directory access permissions to 644 & 755 respectively
in all user /public_html directories
fixownerperms Fix owner permissions in all user /public_html directories
restoreipfwd Restore Nginx IP forwarding in Apache
cleanup Cleanup Mac or Windows specific metadata & Apache error_log files
in all user /public_html directories
info Show basic system info
~~ Enjoy Engintron! ~~ WHM /cPanelGUIのEngintron
インストール後、EngintronプラグインにはWHM /cPanelGUIを介してアクセスできます。 「https:// your_ip_address:2087」のURLでWHMにアクセスします。
一度、左上の検索入力フィールドにアクセスして、「 Engintron」と入力します 「。 「EngintronforcPanel / WHM」があります 」オプションをクリックする必要があります。一度クリックすると、インストールされているEngintronとそのステータスに関する情報が表示されます。
それで全部です。 WHM/cPanelサーバーにEngintronプラグインを介してNginxを正常にインストールしました。もちろん、難しい場合はインストールする必要はありません。VPSホスティングサービスの1つを使用できます。その場合は、専門のLinuxVPSホスティング管理者にこのプラグインのインストールを依頼するだけです。 24時間年中無休でご利用いただけます。リクエストはすぐに処理されます。
PS。 WHM / cPanelにNginxをインストールする方法に関するこの投稿が気に入った場合は、左側のボタンを使用してソーシャルネットワーク上の友達と共有するか、下に返信を残してください。ありがとう。