コンテンツにスキップ

「Adminer」の版間の差分

提供: ArchWiki
削除された内容 追加された内容
編集の要約なし
同期
6行目: 6行目:
== インストール ==
== インストール ==


[[AUR]] から {{AUR|adminer}} を[[pacman|インストール]]してください。Adminer は {{ic|/usr/share/webapps/adminer/index.php}} にインストールされます
Adminer の古いコピーがないことを確認してください:
$ rm -r /srv/http/adminer


{{ic|/etc/php/php.ini}} で [[MySQL]] データベースを管理するのに必要な拡張をアンコメントしてください。例: {{ic|<nowiki>extension=pdo_mysql.so</nowiki>}}。
[[AUR]] から {{AUR|adminer}} を[[pacman|インストール]]してください。


== Apache の設定 ==
== Apache の設定 ==
22行目: 21行目:
{{Note|Adminer はブラウザで [http://localhost/adminer http://localhost/adminer] からアクセスできます。}}
{{Note|Adminer はブラウザで [http://localhost/adminer http://localhost/adminer] からアクセスできます。}}


(403) エラーが発生する場合、{{ic|/etc/httpd/conf/extra/httpd-adminer.conf}} ファイルの以下の行を変更してください:
(403) エラーが発生する場合、{{ic|/etc/httpd/conf/extra/httpd-adminer.conf}} の {{ic|php_admin_value}} 行をコメントアウトしてください
Alias /adminer "/usr/share/webapps/adminer"
<Directory "/usr/share/webapps/adminer">
AllowOverride All
Require all granted
#php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:/usr/share/pear/"
</Directory>


そして [[apache]] デーモンを再度[[再起動]]してください:
そして [[apache]] デーモンを再度[[再起動]]してください:
# systemctl restart httpd
# systemctl restart httpd

== Nginx の設定 ==

[[nginx#PHP を動かす|php の FastCGI インターフェイス]]を正しく設定してください。

そして以下の {{ic|server}} ブロックを {{ic|/etc/nginx/nginx.conf}} に追加するか {{ic|/etc/nginx/servers-available/}} 内のファイルに記述して[[nginx#サーバーブロック|有効化]]してください。

その後 {{ic|systemctl restart nginx.service}} でサーバーを再起動してください。

{{hc|/etc/nginx/nginx.conf|<nowiki>
server {
listen 80;
server_name db.domainname.dom;
root /usr/share/webapps/adminer;

# If you want to use a .htpass file, uncomment the three following lines.
#auth_basic "Admin-Area! Password needed!";
#auth_basic_user_file /usr/share/webapps/adminer/.htpass;
#access_log /var/log/nginx/adminer-access.log;

error_log /var/log/nginx/adminer-error.log;
location / {
index index.php;
try_files $uri $uri/ /index.php?$args;
}

location ~ .php$ {
include fastcgi.conf;
#fastcgi_pass localhost:9000;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/webapps/adminer$fastcgi_script_name;
}
}
</nowiki>}}


== 参照 ==
== 参照 ==

2016年1月9日 (土) 00:56時点における版

Adminer はデータベースを管理するためのシンプルなツールです。MySQL, PostgreSQL, Sqlite3, MS SQL, Oracle を管理することが可能です。PhpMyAdmin よりもシンプルなツールとなっています。プロジェクトの詳細は 公式ページWikipedia を見て下さい。

インストール

AUR から adminerAURインストールしてください。Adminer は /usr/share/webapps/adminer/index.php にインストールされます。

/etc/php/php.iniMySQL データベースを管理するのに必要な拡張をアンコメントしてください。例: extension=pdo_mysql.so

Apache の設定

以下の行を /etc/httpd/conf/httpd.conf に追加してください:

Include conf/extra/httpd-adminer.conf

そして apache デーモンを再起動してください:

# systemctl restart httpd
ノート Adminer はブラウザで http://localhost/adminer からアクセスできます。

(403) エラーが発生する場合、/etc/httpd/conf/extra/httpd-adminer.confphp_admin_value 行をコメントアウトしてください。

そして apache デーモンを再度再起動してください:

# systemctl restart httpd

Nginx の設定

php の FastCGI インターフェイスを正しく設定してください。

そして以下の server ブロックを /etc/nginx/nginx.conf に追加するか /etc/nginx/servers-available/ 内のファイルに記述して有効化してください。

その後 systemctl restart nginx.service でサーバーを再起動してください。

/etc/nginx/nginx.conf
server {
        listen 80;
        server_name db.domainname.dom;
        root /usr/share/webapps/adminer;

        # If you want to use a .htpass file, uncomment the three following lines.
        #auth_basic "Admin-Area! Password needed!";
        #auth_basic_user_file /usr/share/webapps/adminer/.htpass;
        #access_log /var/log/nginx/adminer-access.log;

        error_log /var/log/nginx/adminer-error.log;
        location / {
                index index.php;
                try_files $uri $uri/ /index.php?$args;
        }

       location ~ .php$ {
             include fastcgi.conf;
             #fastcgi_pass localhost:9000;
             fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
             fastcgi_index index.php;
             fastcgi_param SCRIPT_FILENAME /usr/share/webapps/adminer$fastcgi_script_name;
        }
}

参照