Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
PhpPgAdminのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
PhpPgAdmin
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
{{lowercase title}} [[Category:ウェブサーバー]] [[en:phpPgAdmin]] {{Related articles start}} {{Related|PostgreSQL}} {{Related articles end}} [http://phppgadmin.sourceforge.net/ phpPgAdmin] は Apache/PHP フロントエンドを使用して PostgreSQL データベースを管理するウェブベースのツールです。 == インストール == PhpPgAdmin は Apache など PHP が使えるウェブサーバーを必要とします。[[Apache HTTP Server]] と [[Apache HTTP Server#PHP]] を見てセットアップしてください。 {{Pkg|phppgadmin}} パッケージを[[インストール]]してください。 == 設定 == ===PHP=== {{ic|/etc/php/php.ini}} を編集して以下の行をアンコメントして PHP の {{ic|pgsql}} 拡張を有効にする必要があります: extension=pgsql.so PHP が {{ic|/etc/webapps}} にアクセスできるか確認してください。必要ならば {{ic|/etc/php/php.ini}} の {{ic|open_basedir}} に追加します: open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps ===ウェブサーバー=== ====Apache==== Apache 設定ファイルを作成: {{hc|/etc/httpd/conf/extra/phppgadmin.conf| Alias /phppgadmin "/usr/share/webapps/phppgadmin" <Directory "/usr/share/webapps/phppgadmin"> DirectoryIndex index.php AllowOverride All Options FollowSymlinks Require all granted </Directory> }} そして {{ic|/etc/httpd/conf/httpd.conf}} でインクルード: # phpPgAdmin configuration Include conf/extra/phppgadmin.conf デフォルトでは誰でも phpPgAdmin のページを閲覧できてしまいます。変更するには {{ic|/etc/httpd/conf/extra/phppgadmin.conf}} を編集してください。例えば、同じマシンからのアクセスだけを許可するには {{ic|Require all granted}} を {{ic|Require local}} に置き換えます。 ====Lighttpd==== lighttpd の php の設定は apache と全く同じです。 lighttpd の設定に phppgadmin のエイリアスを作成してください: alias.url = ( "/phppgadmin" => "/usr/share/webapps/phppgadmin/") そして設定で mod_alias, mod_fastcgi, mod_cgi を有効にしてください (server.modules セクション)。 lighttpd で php ファイルを使えるようにする方法は [[Lighttpd#FastCGI]] を参照。 lighttpd を再起動して http://localhost/phppgadmin/index.php を開いてください。 ====nginx==== バーチャルホストのディレクトリ (例: {{ic|/srv/http/<domain>/public_html/}}) から {{ic|/usr/share/webapps/phppgadmin}} ディレクトリにシンボリックリンクを作成してください: # ln -s /usr/share/webapps/phppgadmin /srv/http/<domain>/public_html/phppgadmin 同じように server ブロックを使ってサブドメインを設定することもできます (php-fpm を使用している場合)。 Also, you need to use at less php-fpm (you need it), you have to make it running first (if you not do it, you will have a "502 bad gateway" error instead of the phpPgadmin first page). For make it running after install the package, make a "systemctl start php-fpm" (and enable it if you want to use it all the time and/or after reboot, by "systemctl enable php-fpm) server { server_name phppgadmin.<domain.tld>; access_log /srv/http/<domain>/logs/phppgadmin.access.log; error_log /srv/http/<domain.tld>/logs/phppgadmin.error.log; location / { root /srv/http/<domain.tld>/public_html/phppgadmin; index index.html index.htm index.php; } location ~ \.php$ { root /srv/http/<domain.tld>/public_html/phppgadmin; fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /srv/http/<domain.tld>/public_html/phppgadmin/$fastcgi_script_name; include fastcgi_params; } } but there is an other simple way to do it running (also, if you need some other web apps, it would be easy more after): server { listen 80; server_name localhost default_server; root /srv/http/www/public_html; index index.html index.html index.php; location ~ \.php$ { try_files $uri =404; include fastcgi_params; fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } with this config, your phppgadmin will be accessible at http://localhost/phppgadmin directly and you will be able also to add some other web apps easy in the same way (just have to paste/link them under public_html directory and find it at localhost/your_webapps) this config make working all php file inside your localhost directly (also it is a good idea to allow a user http http in the top of this nginx file and make directory srv/http/ under http owner/group) the "server" serve only if you want to create some other server name designed only for this... also, make a root inside the location of php is not a simple way to do and make the config file in trouble... ===phpPgAdmin の設定=== phpPgAdmin の設定ファイルは {{ic|/etc/webapps/phppgadmin/config.inc.php}} にあります。ローカルで PostgreSQL サーバーを動かしている場合は、何も設定しなくても動作するはずです。 PostgreSQL サーバーが localhost 上にない場合は、以下の行を編集してください: <nowiki>$conf['servers'][0]['host'] = '';</nowiki> ==phpPgAdmin にアクセス== phpPgAdmin のインストールが完了したら、使用する前に以下のコマンドで apache サーバーを再起動してください: # systemctl restart httpd.service http://localhost/phppgadmin/ から phpPgAdmin にアクセスできます。 == トラブルシューティング == === セキュリティ上の理由でログインが拒否される === extra login security が true の場合、phpPgAdmin でパスワードを指定しなかったり特定のユーザー名 (''pgsql'', ''postgres'', ''root'', ''administrator'') でのログインが拒否されます。{{ic|false}} に設定したい場合 FAQ を読んで PostgreSQL の {{ic|pg_hba.conf}} を変更してパスワードによるローカル接続を有効にしてください。 {{ic|/etc/webapps/phppgadmin/config.inc.php}} を編集して以下の行を: $conf['extra_login_security'] = true; 以下のように変更: $conf['extra_login_security'] = false;
このページで使用されているテンプレート:
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Lowercase title
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
PhpPgAdmin
に戻る。
検索
検索
PhpPgAdminのソースを表示
話題を追加