Linux下apache+phppgadmin安裝配置

1.安裝pgphp

安裝PostgreSQL數據庫數據庫

修改pg_hba。conf配置文件,使得數據庫能夠經過外部訪問。apache

具體能夠配置爲:瀏覽器

# TYPE  DATABASE        USER            ADDRESS                 METHOD
# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
host    all             all             0.0.0.0/0            md5
# IPv6 local connections:
host    all             all             ::1/128                 trust
host    all             all             0.0.0.0/0               trust

 2.安裝apacheiview

下載安裝文件,如:httpd-2.4.4.tar.gzdom

默認會安裝到/etc/httd/下面socket

安裝完畢後,能夠先啓動服務service httpd start,而後到瀏覽器輸入地址:http://ip:80,正常會出現apache  test page。ide

3.安裝phPgAdminthis

下載:phpPgAdmin-5.1.tar.gzspa

到/var/www/解壓便可。

 4.配置php 文件目錄以及監聽端口

vi /etc/httpd/conf/httpd.conf

首先找到端口(默認爲80):

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80

而後是php的文件目錄

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory> 

#liuyy
#phpPgAdmin
Alias /phppgadmin "/var/www/phpPgAdmin"
<Directory "/var/www/phpPgAdmin">
  Options Indexes Multiviews
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>

 

注意:/phppgadmin纔是在瀏覽器中要輸入的地址,而不是文件名(phpPgAdmin)自己。

5.以上配置完畢後,在terminal中重啓apache服務:service httpd restart

到瀏覽器中輸入地址:http://ip:port/ phppgadmin

正常會出現phppgadmin的管理界面。

相關文章
相關標籤/搜索