IMUZA.com

Xserver<<WordPress(ConoHa)<<はてなブログ

ホーム / Linux / Plamo-5.2/phpMyAdminインストール(完了)

Plamo-5.2/phpMyAdminインストール(完了)

2014/02/14 Linux, Plamo

  • phpMyAdminのインストール
  •  mcrypt 拡張がありません
  • phpMyAdmin 環境保管領域が完全に設定されていないため…

phpMyAdminのインストール

Mysql を使う場合、必須というほどではないにしても、ブラウザから操作できるphpMyAdmin はとても便利なツールです。インストールは簡単で、最新版をダウンロードして、ブラウザでアクセス可能な場所に展開するだけです。

今回は、ドキュメントルート下に展開し、phpmyadmin とディレクトリ名を変更して使用しようとしたのですが、ここで問題が発生しました。ユーザディレクトリへのアクセスにチルダを使わないようにしている現在の設定では、AliasMatch の正規表現が phpmyadmin にもマッチングしてしまいます。考えてみれば当たり前です。

やっぱり、ユーザディレクトリで運用するというのも面倒ですね。さてどうしたものかですが、httpd.conf を変更するのもこれまた面倒ですので、

# cd /srv/httpd/
# ln -s /home/ユーザ名/public_html htdocs

と、ドキュメントルートをシンボリックリンクにしてしまいました。これってどうなんでしょう? 問題ないのでしょうか? いずれにしても、公開しないテスト用ですので、何か問題が起きたら、また変更しましょう。

と言うことで、再度、自分の public_html 下に phpmyadmin をインストールし、config.sample.inc.php を config.inc.php に変更してアクセスしてみます。

 いやあ簡単ですね。以前は、設定ファイルにいろいろサーバ情報を書き加えたような気がするのですが、今はサーバが localhost なら何もしなくてもOKなんですね。ただ、phpMyAdmin を狙った攻撃も多いそうですので、公開サーバの場合は慎重にやらないといけないとは思います。

で、とりあえず、root でログインしたところ、

mcrypt 拡張がありません。PHP の設定をチェックしてみてください。

phpMyAdmin 環境保管領域が完全に設定されていないため、いくつかの拡張機能が無効になっています。理由についてはこちらをご覧ください。

と、二つの警告が出ます。

 mcrypt 拡張がありません

PHP: Mcrypt – Manual を読みますと、libmcrypt をインストールして、php を –with-mcrypt パラメータ付でコンパイルし直さなくてはいけないようです。

# cd /usr/local/src
# wget http://softlayer.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz
# tar -zxvf libmcrypt-2.5.8.tar.gz
# cd libmcrypt-2.5.8
# ./configure –prefix=/usr  –disable-posix-threads –enable-dynamic-loading
# make
# make install

これで libmcrypt が入りましたので、php を -with-mcrypt=/usr/lib 付で再コンパイルしインストールします。

その後、php.ini に extension = libmcrypt.so とかするのかと思いましたが、何もしなくても警告が消えてしまいました。

phpMyAdmin 環境保管領域が完全に設定されていないため…

こちらは、警告の「こちら」のリンクをたどっていきますと、

 PMA Database … NG [ ドキュメント ]
一般的なリレーション機能 無効

「ドキュメント」のリンクをクリックしますと、

The requested URL /phpmyadmin/pmadb was not found on this server.

となります。やむを得ず、ググったところ、たくさん情報がありました。要は、phpMyAdmin が使うデータベースをつくり、設定ファイルにデータベース情報を追加しなくてはいけないようです。次のようにしました。

mysql に root でログインし、

MariaDB [(none)]> source /(略)/phpmyadmin/examples/create_tables.sql
MariaDB [(none)]> use phpmyadmin;
MariaDB [phpmyadmin]> grant all on phpmyadmin.* to pma@localhost identified by “password”;

config.inc.php の以下コメントアウトをはずします。

/* User used to manipulate with storage */
$cfg[‘Servers’][$i][‘controlhost’] = ”;
$cfg[‘Servers’][$i][‘controlport’] = ”;
$cfg[‘Servers’][$i][‘controluser’] = ‘pma’;
$cfg[‘Servers’][$i][‘controlpass’] = ‘pmapass’;
/* Storage database and tables */
$cfg[‘Servers’][$i][‘pmadb’] = ‘phpmyadmin’;
$cfg[‘Servers’][$i][‘bookmarktable’] = ‘pma__bookmark’;
$cfg[‘Servers’][$i][‘relation’] = ‘pma__relation’;
$cfg[‘Servers’][$i][‘table_info’] = ‘pma__table_info’;
$cfg[‘Servers’][$i][‘table_coords’] = ‘pma__table_coords’;
$cfg[‘Servers’][$i][‘pdf_pages’] = ‘pma__pdf_pages’;
$cfg[‘Servers’][$i][‘column_info’] = ‘pma__column_info’;
$cfg[‘Servers’][$i][‘history’] = ‘pma__history’;
$cfg[‘Servers’][$i][‘table_uiprefs’] = ‘pma__table_uiprefs’;
$cfg[‘Servers’][$i][‘tracking’] = ‘pma__tracking’;
$cfg[‘Servers’][$i][‘designer_coords’] = ‘pma__designer_coords’;
$cfg[‘Servers’][$i][‘userconfig’] = ‘pma__userconfig’;
$cfg[‘Servers’][$i][‘recent’] = ‘pma__recent’;
$cfg[‘Servers’][$i][‘users’] = ‘pma__users’;
$cfg[‘Servers’][$i][‘usergroups’] = ‘pma__usergroups’;
$cfg[‘Servers’][$i][‘navigationhiding’] = ‘pma__navigationhiding’;
/* Contrib / Swekey authentication */
$cfg[‘Servers’][$i][‘auth_swekey_config’] = ‘/etc/swekey-pma.conf’;

ログインし直すと見事に消えていました。

さて、次はやっとCMSのインストールです。

Plamo-5.2/apacheその他の設定userdir、FastCGI(完了)
Plamo-5.2/Joomla!3.2.2インストール(完了)
Twitter
Facebook
ブックマーク
LINEで送る

最初のサイドバー

最新記事

2023/05/25

WordPress:リビジョン削除、回数制限

2023/05/10

WordPress:裏技的サイトリニューアル

2023/04/28

XserverへのSSH接続がエラーになってしまった

2023/04/16

正規表現の最短一致でミスる

2023/04/4

WordPress:公開中サイトをサブディレクトリでリニューアルし公開する

最新記事を一覧で見る

よく読まれている記事

よく読まれている記事を一覧で見る

カテゴリー

  • はてなブログ215
  • WebTips109
  • javascript98
  • Joomla!88
  • Wordpress70
  • Windows68
  • CSS63
  • Joomla!更新53
  • Linux49
  • はてなテーマ45
  • Google34
  • Plamo33
  • はてなプラグイン25
  • php23
  • Node.js18
  • Ubuntu16
  • SASS16
  • laravel415
  • Chrome11
  • cms-style10
  • iPhone9
  • Git入門6
  • ConoHa WING6
  • genesis6
  • Python5
  • Android5
  • PC全般4
  • Facebook4
  • スマートフォン4
  • Xserver3
  • Firefox3
  • 静的サイトジェネレーター3
  • SSD3
  • Docker3
  • Blankslate3
  • Twitter2
  • Mactype2
  • GitHub2
  • youtube1
  • はてなブクマ1
  • rails入門1
  • 映画1

Footer

My Web Sites

  • @半径とことこ60分
  • そんなには褒めないよ。映画評
  • IMUZA.com
  • GitHub

Related Sites

  • WordPress公式
  • WordPress関数リファレンス
  • PHPマニュアル

Contact Us

  • お問い合わせフォーム
  • Twitter
  • Facebook
  • Feedly

Copyright © 2023 · IMUZA.com