GNU/Linux >> Linux の 問題 >  >> Panels >> Panels

Ubuntu 14.04 VPSにHHVM、Nginx、MariaDBを使用してphpMyAdminをインストールする方法

このチュートリアルでは、 phpMyAdminとHHVM、Nginx、MariaDBをUbuntu14.04VPSにインストールする方法について段階的に説明します。 。 PhpMyAdminは、PHPで記述されたオープンソースアプリケーションであり、直感的なウェブインターフェースを介してMySQL/MadiaDBデータベースの管理を処理することを目的としています。


次のコマンドを実行して、パッケージリストとOSパッケージが最新であることを確認してください。

apt-get update 
apt-get upgrade

Apacheサービスを停止し、無効にして起動時に開始します:

service apache2 stop
update-rc.d -f apache2 remove

Nginxをインストールして構成する

apt-get install python-software-properties software-properties-common
add-apt-repository ppa:nginx/stable
apt-get install nginx

Webサイト用の新しいnginxサーバーブロックを作成します:

vi /etc/nginx/sites-available/your-domain.com
server {
  server_name your-domain.com;
  listen 80;
  root /var/www/your-domain.com;
  access_log /var/www/your-domain.com/logs/access.log;
  error_log /var/www/your-domain.com/logs/error.log;
  index index.php;
  location / {
    try_files $uri $uri/ /index.php?$args;
  }

  location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
    access_log off;
    expires max;
  }

  location ~ /\.ht {
    deny  all;
  }

  location ~ \.php$ {
    fastcgi_index index.php;
    fastcgi_keep_conn on;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}

HHVMをインストールする
新しい「hhvm.list」ファイルを作成し、それにHHVMソースを追加します:

vi /etc/apt/sources.list.d/hhvm.list
deb http://dl.hhvm.com/ubuntu trusty main

次に、HHVMキーを追加し、hhvmパッケージをインストールします。

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
apt-get update
apt-get install hhvm
/usr/share/hhvm/install_fastcgi.sh
vi /etc/hhvm/php.ini
; php options
; session.save_handler = files
; session.save_path = /var/lib/hhvm/sessions
; session.gc_maxlifetime = 1440

; hhvm specific
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.mysql.typed_results = false
vi /etc/hhvm/server.ini
; php options

pid = /var/run/hhvm/pid

; hhvm specific

hhvm.server.port = 9000
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.log.use_log_file = true
hhvm.log.file = /var/log/hhvm/error.log
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc

MariaDBをインストールする

apt-get install mariadb-server

次のコマンドを実行します:

mysql_secure_installation

MariaDBの「root」ユーザーパスワードを設定し(英数字と文法記号を含む少なくとも8文字を使用する強力なパスワードを使用してください)、匿名ユーザーアカウントを削除し、rootログインをリモートで有効にする場合は「N」と入力し、「」と入力します。次の2つの質問でY'を実行して、テストデータベースを削除し、それにアクセスして特権テーブルを再読み込みします。

phpMyAdminをインストール

apt-get install phpmyadmin
ln -sf /usr/share/phpmyadmin/ /var/www/your-domain.com/

SSL経由でphpMyAdminにアクセスするには、SSL証明書を作成するか、ここで新しいSSL証明書を購入します。

cd /etc/nginx/
openssl genrsa -des3 -out server.key 1024
openssl req -new -x509 -nodes -sha1 -days 365 -key server.key -out server.crt

cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
chmod 400 server.key

次に、Nginx構成を編集し、新しいnginxサーバーブロックを作成します。

vi /etc/nginx/sites-available/your-domain.com

ファイルの最後に次の行を追加します:

server {
         listen       443;
    ssl on;
    ssl_certificate /etc/nginx/server.crt;
    ssl_certificate_key /etc/nginx/server.key;

  server_name your-domain.com;
  root /var/www/your-domain.com;
  access_log /var/www/your-domain.com/logs/access.log;
  error_log /var/www/your-domain.com/logs/error.log;
  index index.php;
  location / {
    try_files $uri $uri/ /index.php?$args;
  }

  location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
    access_log off;
    expires max;
  }

  location ~ /\.ht {
    deny  all;
  }

  location ~ \.php$ {
    fastcgi_index index.php;
    fastcgi_keep_conn on;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}

次のコマンドを実行します:

ln -s /etc/nginx/sites-available/your-domain.com /etc/nginx/sites-enabled/your-domain.com
rm /etc/nginx/sites-enabled/default
mkdir -p /var/www/your-domain.com/logs/
chown www-data: -R /var/www/your-domain.com/

「/usr/share/phpmyadmin/libraries/dbi/mysqli.dbi.lib.php」を編集して、次の行を検索します:

require_once './libraries/logging.lib.php';

その上に次の行を追加します:

$GLOBALS['cfg']['Server']['port']=3306;

HHVM、nginx、MariaDBサービスを再起動し、起動時に開始するように構成します。

service hhvm restart
service nginx restart
service mysql restart

update-rc.d nginx defaults
update-rc.d hhvm defaults
update-rc.d mysql defaults

https://your-domain.com/phpmyadminを開き、MariaDBユーザー名とそのパスワードを入力して、MariaDBデータベースの管理を開始します。

もちろん、Linux VPSホスティングサービスのいずれかを使用している場合は、これを行う必要はありません。その場合は、専門のLinux管理者に HHVM、Nginx、MariaDBを使用してphpMyAdminをインストールするように依頼するだけです。>> あなたのために。彼らは24時間年中無休で利用可能であり、あなたの要求をすぐに処理します。マネージドHHVMホスティングプランをご覧ください。

PS。 この投稿が気に入った場合は、左側のボタンを使用してソーシャルネットワーク上の友達と共有するか、下に返信を残してください。ありがとう。


Panels
  1. Nginx、MariaDB、PHP-FPMを使用してCentOS7VPSにVarnishとphpMyAdminをインストールする方法

  2. Ubuntu 12.04 LTSにHHVM、Nginx、MariaDBを使用してWordPressをインストールする

  3. NginxとMariaDBを使用してUbuntuVPSにHumHubをインストールします

  1. NginxとパスワードでUbuntuVPSにLinuxDashをインストールする方法

  2. MariaDB、Puma、Nginxを使用してUbuntu14.04サーバーにRedmineをインストールします。

  3. UbuntuVPSにNginxを使用してEspoCRMをインストールする方法

  1. Ubuntu VPSにNginxを使用してOdoo(以前のOpenERP)をインストールします

  2. NginxとMariaDBを使用してUbuntuVPSにCroogoをインストールします

  3. Nginx を使用して Ubuntu 20.04 に phpMyAdmin をインストールする