「Adminer」の版間の差分
en:Adminerへの転送ページ |
Kusanaginoturugi (トーク | 投稿記録) →Nginx: 飜訳 |
||
| (2人の利用者による、間の8版が非表示) | |||
| 1行目: | 1行目: | ||
[[Category:ウェブ管理インターフェイス]] |
|||
| ⚫ | |||
[[cs:Adminer]] |
|||
| ⚫ | |||
[http://www.adminer.org/ Adminer] はデータベースを管理するためのシンプルなツールです。[[MySQL]], [[PostgreSQL]], [[Sqlite|Sqlite3]], MS SQL, [[Oracle]], [[Elasticsearch]] を管理することが可能です。[[PhpMyAdmin]] よりもシンプルなツールとなっています。プロジェクトの詳細は [http://www.adminer.org/en/ 公式ページ] や [[Wikipedia:Adminer|Wikipedia]] を見て下さい。 |
|||
== インストール == |
|||
[[AUR]] から {{AUR|adminer}} を[[pacman|インストール]]してください。あるいは [https://www.adminer.org/#download Adminer] のホームページから手動でダウンロードして適当な場所に配置してください。 |
|||
{{AUR|adminer}} パッケージを使用する場合、Adminer は {{ic|/usr/share/webapps/adminer/index.php}} にインストールされます。 |
|||
{{ic|/etc/php/php.ini}} で [[MySQL]] データベースを管理するのに必要な拡張をアンコメントしてください。例: {{ic|<nowiki>extension=pdo_mysql.so</nowiki>}}。 |
|||
== 設定 == |
|||
=== Apache === |
|||
以下の行を {{ic| /etc/httpd/conf/httpd.conf}} に追加してください: |
|||
Include conf/extra/httpd-adminer.conf |
|||
そして [[Apache HTTP Server]] デーモンを[[再起動]]してください。 |
|||
Adminer はブラウザで [http://localhost/adminer http://localhost/adminer] からアクセスできます。 |
|||
=== Nginx === |
|||
{{Note|[[nginx#PHP を動かす|php の FastCGI インターフェイス]]を正しく設定してください。}} |
|||
{{ic|root}} で {{ic|/usr/share/webapps/adminer}} への[[Nginx#Managing_server_entries|サーバーエントリ]]を作成します。 |
|||
{{hc|/etc/nginx/sites-available/adminer.conf|<nowiki> |
|||
server { |
|||
listen 443 ssl http2; |
|||
listen [::]:443 ssl http2; |
|||
server_name adminer.domain; |
|||
root /usr/share/webapps/adminer; |
|||
# Only allow certain IPs |
|||
#allow 192.168.1.0/24; |
|||
#deny all; |
|||
index index.php; |
|||
location / { |
|||
try_files $uri $uri/ =404; |
|||
} |
|||
error_page 404 /index.php; |
|||
# PHP configuration |
|||
location ~ \.php$ { |
|||
... |
|||
} |
|||
} |
|||
</nowiki>}} |
|||
{{ic|adminer.conf}} を {{ic|sites-enabled}} にシンボリックリンクを作成して、[[nginx]] を[[再起動]]してください。 |
|||
=== Hiawatha === |
|||
[[Hiawatha#PHP|FastCGI インターフェイス]]を正しく設定してください。 |
|||
そして以下の {{ic|VirtualHost}} ブロックを {{ic|/etc/hiawatha/hiawatha.conf}} に追加してください: |
|||
{{hc|head=/etc/hiawatha/hiawatha.conf|output= |
|||
VirtualHost { |
|||
# If you set WebsiteRoot to /usr/share/webapps/adminer you don't need followsymlinks |
|||
# I symlinked the adminer folder to '/srv/http/adminer' so that I can easily remember where it's located but |
|||
# still set 'WebsiteRoot' to the real source directory. You could point WebsiteRoot to the |
|||
# symlinked directory, but you will have to set 'FollowSymlinks = yes' for that to function properly |
|||
Hostname = db.domainname.dom |
|||
#FollowSymlinks = yes |
|||
#WebsiteRoot = /srv/http/adminer |
|||
WebsiteRoot = /usr/share/webapps/adminer |
|||
AccessLogfile = /var/log/hiawatha/adminer/access.log |
|||
ErrorLogfile = /var/log/hiawatha/adminer/error.log |
|||
StartFile = index.php |
|||
UseFastCGI = PHP7 |
|||
} |
|||
}} |
|||
設定したら {{ic|hiawatha.service}} を[[systemd#ユニットを使う|再起動]]します。 |
|||
== 参照 == |
|||
* [http://www.adminer.org/en/ Adminer 公式ウェブページ] |
|||
* [http://php.vrana.cz/ 開発者のウェブログ] |
|||
2021年10月28日 (木) 15:56時点における最新版
Adminer はデータベースを管理するためのシンプルなツールです。MySQL, PostgreSQL, Sqlite3, MS SQL, Oracle, Elasticsearch を管理することが可能です。PhpMyAdmin よりもシンプルなツールとなっています。プロジェクトの詳細は 公式ページ や Wikipedia を見て下さい。
インストール
AUR から adminerAUR をインストールしてください。あるいは Adminer のホームページから手動でダウンロードして適当な場所に配置してください。
adminerAUR パッケージを使用する場合、Adminer は /usr/share/webapps/adminer/index.php にインストールされます。
/etc/php/php.ini で MySQL データベースを管理するのに必要な拡張をアンコメントしてください。例: extension=pdo_mysql.so。
設定
Apache
以下の行を /etc/httpd/conf/httpd.conf に追加してください:
Include conf/extra/httpd-adminer.conf
そして Apache HTTP Server デーモンを再起動してください。
Adminer はブラウザで http://localhost/adminer からアクセスできます。
Nginx
root で /usr/share/webapps/adminer へのサーバーエントリを作成します。
/etc/nginx/sites-available/adminer.conf
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name adminer.domain;
root /usr/share/webapps/adminer;
# Only allow certain IPs
#allow 192.168.1.0/24;
#deny all;
index index.php;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /index.php;
# PHP configuration
location ~ \.php$ {
...
}
}
adminer.conf を sites-enabled にシンボリックリンクを作成して、nginx を再起動してください。
Hiawatha
FastCGI インターフェイスを正しく設定してください。
そして以下の VirtualHost ブロックを /etc/hiawatha/hiawatha.conf に追加してください:
/etc/hiawatha/hiawatha.conf
VirtualHost {
# If you set WebsiteRoot to /usr/share/webapps/adminer you don't need followsymlinks
# I symlinked the adminer folder to '/srv/http/adminer' so that I can easily remember where it's located but
# still set 'WebsiteRoot' to the real source directory. You could point WebsiteRoot to the
# symlinked directory, but you will have to set 'FollowSymlinks = yes' for that to function properly
Hostname = db.domainname.dom
#FollowSymlinks = yes
#WebsiteRoot = /srv/http/adminer
WebsiteRoot = /usr/share/webapps/adminer
AccessLogfile = /var/log/hiawatha/adminer/access.log
ErrorLogfile = /var/log/hiawatha/adminer/error.log
StartFile = index.php
UseFastCGI = PHP7
}
設定したら hiawatha.service を再起動します。