Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
PhpPgAdminのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
PhpPgAdmin
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:ウェブサーバー]] [[en:phpPgAdmin]] {{lowercase title}} {{Related articles start}} {{Related|PostgreSQL}} {{Related articles end}} [http://phppgadmin.sourceforge.net/ phpPgAdmin] は Apache/PHP フロントエンドを使用して PostgreSQL データベースを管理するウェブベースのツールです。Apache/PHP のセットアップを必要とするので、[[LAMP]] を見てセットアップしてください。 == インストール == [[公式リポジトリ]]から {{Pkg|phppgadmin}} と {{Pkg|php-pgsql}} と {{Pkg|php-fpm}} パッケージを[[インストール]]してください。 == 設定 == ===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 By default, everyone can see the phpPgAdmin page, to change this, edit {{ic|/etc/httpd/conf/extra/phppgadmin.conf}} to your liking. For example, if you only want to be able to access it from the same machine, replace {{ic|Require all granted}} by {{ic|Require local}}. ====Lighttpd の設定==== The php setup for lighttpd is exactly the same as for apache. Make an alias for phppgadmin in your lighttpd config. alias.url = ( "/phppgadmin" => "/usr/share/webapps/phppgadmin/") Then enable mod_alias, mod_fastcgi and mod_cgi in your config ( server.modules section ) Make sure lighttpd is setup to serve php files, [[Lighttpd#FastCGI]] Restart lighttpd and browse to http://localhost/phppgadmin/index.php ====NGINX の設定==== Create a symbolic link to the /usr/share/webapps/phppgadmin directory from whichever directory your vhost is serving files from, e.g. /srv/http/<domain>/public_html/ sudo ln -s /usr/share/webapps/phppgadmin /srv/http/<domain>/public_html/phppgadmin You can also setup a sub domain with a server block like so (if using 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 上にない場合は、以下の行を編集してください: $conf['servers'][0]['host'] = ''; ==phpPgAdmin にアクセス== Your phpPgAdmin installation is now complete. Before start using it you need to restart your apache server by following command: # systemctl restart httpd.service You can access your phpPgAdmin installation by going to http://localhost/phppgadmin/ == トラブルシューティング == === セキュリティ上の理由でログインが拒否される === If extra login security is true, then logins via phpPgAdmin with no password or certain usernames (''pgsql'', ''postgres'', ''root'', ''administrator'') will be denied. Only set this to {{ic|false}} once you have read the FAQ and understand how to change PostgreSQL's {{ic|pg_hba.conf}} to enable passworded local connections. Edit {{ic|/etc/webapps/phppgadmin/config.inc.php}} and change the following line $conf['extra_login_security'] = true; to $conf['extra_login_security'] = false;
このページで使用されているテンプレート:
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Lowercase title
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
PhpPgAdmin
に戻る。
検索
検索
PhpPgAdminのソースを表示
話題を追加