用home-brew安装phpmyadmin

问题描述 投票:8回答:1

我曾尝试使用home-brew安装和配置phpmyadmin。要安装,我使用命令brew install phpmyadmin,这是终端中打印的消息的摘要。

==> Summary
🍺  /usr/local/Cellar/php71/7.1.0-beta.1: 342 files, 50.3M, built in 7 minutes 29 seconds
==> Installing homebrew/php/phpmyadmin
==> Downloading https://github.com/phpmyadmin/phpmyadmin/archive/RELEASE_4_6_2.t
==> Downloading from https://codeload.github.com/phpmyadmin/phpmyadmin/tar.gz/RE
######################################################################## 100.0%
==> Caveats
Note that this formula will NOT install mysql. It is not
required since you might want to get connected to a remote
database server.

Webserver configuration example (add this at the end of
your /etc/apache2/httpd.conf for instance) :
  Alias /phpmyadmin /usr/local/share/phpmyadmin
  <Directory /usr/local/share/phpmyadmin/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    <IfModule mod_authz_core.c>
      Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
      Order allow,deny
      Allow from all
    </IfModule>
  </Directory>
Then, open http://localhost/phpmyadmin

More documentation : file:///usr/local/Cellar/phpmyadmin/4.6.2/share/phpmyadmin/doc/

Configuration has been copied to /usr/local/etc/phpmyadmin.config.inc.php
Don't forget to:
  - change your secret blowfish
  - uncomment the configuration lines (pma, pmapass ...)

==> Summary
🍺  /usr/local/Cellar/phpmyadmin/4.6.2: 2,256 files, 63.2M, built in 39 seconds

我按照终端输出的指令,尽管如此,当我输入url http://localhost/phpmyadmin进入safari时,我仍然得到错误消息Safari can't open the page "localhost/phpmyadmin" because Safari can't connect to the server "localhost"。我认为我可能已经在phpmyadmin.config.in.php文件中正确设置了cookie配置,但不知道如何纠正这个问题。

php mysql configuration phpmyadmin
1个回答
7
投票

我发现说明书不完整,你还必须:

  1. 删除/etc/apache2/httpd.conf中为LoadModule php5_module开头的'#'注释: LoadModule php5_module libexec/apache2/libphp5.so
  2. 将/etc/apache2/httpd.conf中的DirectoryIndex设置编辑为: DirectoryIndex index.php index.html home.pl index.cgi
  3. 保存文件...
  4. 在终端应用程序中启动Apache Webserver: sudo apachectl start 如果它已经启动,它将显示一条消息:“服务已加载”,在这种情况下运行: sudo apachectl restart
  5. http://localhost/phpmyadmin 多次刷新页面(可能是先前的状态已缓存或服务尚未启动..)
© www.soinside.com 2019 - 2024. All rights reserved.