zoukankan      html  css  js  c++  java
  • Linux下apache+phppgadmin安装配置

    1.安装pg

    安装PostgreSQL数据库

    修改pg_hba。conf配置文件,使得数据库可以通过外部访问。

    具体可以配置为:

    # 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.安装apache

    下载安装文件,如:httpd-2.4.4.tar.gz

    默认会安装到/etc/httd/下面

    安装完毕后,可以先启动服务service httpd start,然后到浏览器输入地址:http://ip:80,正常会出现apache  test page。

    3.安装phPgAdmin

    下载:phpPgAdmin-5.1.tar.gz

    到/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的管理界面。

  • 相关阅读:
    win10 ,本地连接无法识别网络 ,无线正常,
    vba 声音
    win10 优化
    比较火和常用的命令
    手机电脑平板 查图纸、查点位图、查通病、自学维修知识等通通都有的工具
    e4a mysql
    e4a 对话框的 多选单选颜色日期时间
    e4s 文本操作 数组操作
    e4a sqlite案例
    e4a-窗口切换
  • 原文地址:https://www.cnblogs.com/liuyuanyuanGOGO/p/3483270.html
Copyright © 2011-2022 走看看