安装phpmyadmin

时间:2017-01-11 18:59:47

标签: apache phpmyadmin apache2

你好我试图安装phpmyadmin然后我坚持用apache2重新启动... 当我试图解决它时,我做了以下事情:

sudo apt-get remove apache2
sudo apt-get autoremove
sudo apt-get install apache2

然后:

sudo nano /etc/apache2/apache2.conf 

我最后补充道:

Include /etc/phpmyadmin/apache.conf

然后重新启动

/etc/init.d/apache2 restart

它仍然无效,所以我决定安装以下两个包:

apt-get install libapache2-mod-php5
apt-get install php5.6 libapache2-mod-php5.6

重启时有以下输出:

 * Restarting Apache httpd web server apache2                                    [fail] 
 * The apache2 configtest failed.
Output of config test was:
Segmentation fault (core dumped)
Action 'configtest' failed.
The Apache error log may have more information.

日志文件:

cat /var/log/apache2/access.log

127.0.0.1 - - [11/Jan/2017:19:17:01 +0100] "GET / HTTP/1.1" 200 3595 "-" "Mozilla/5.0 ($
127.0.0.1 - - [11/Jan/2017:19:17:01 +0100] "GET /icons/ubuntu-logo.png HTTP/1.1" 404 51$
127.0.0.1 - - [11/Jan/2017:19:17:01 +0100] "GET /favicon.ico HTTP/1.1" 404 500 "http://$
127.0.0.1 - - [11/Jan/2017:19:17:06 +0100] "GET /phpmyadmin HTTP/1.1" 404 499 "-" "Mozi$
127.0.0.1 - - [11/Jan/2017:19:17:56 +0100] "GET /phpmyadmin/setup/index.php HTTP/1.1" 4$
127.0.0.1 - - [11/Jan/2017:19:20:27 +0100] "GET /phpmyadmin HTTP/1.1" 404 500 "-" "Mozi$

错误日志的输出:

[Wed Jan 11 18:58:27.464400 2017] [mpm_prefork:notice] [pid 1174] AH00163: Apache/2.4.23 (Ubuntu) configured -- resuming normal operations
[Wed Jan 11 18:58:27.464420 2017] [core:notice] [pid 1174] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jan 11 19:19:27.443455 2017] [mpm_prefork:notice] [pid 1174] AH00169: caught SIGTERM, shutting down
[Wed Jan 11 19:20:18.120230 2017] [mpm_prefork:notice] [pid 4527] AH00163: Apache/2.4.23 (Ubuntu) configured -- resuming normal operations
[Wed Jan 11 19:20:18.120268 2017] [core:notice] [pid 4527] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jan 11 19:21:19.771711 2017] [mpm_prefork:notice] [pid 4527] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Wed Jan 11 19:21:19.787009 2017] [mpm_prefork:notice] [pid 4527] AH00163: Apache/2.4.23 (Ubuntu) configured -- resuming normal operations
[Wed Jan 11 19:21:19.787018 2017] [core:notice] [pid 4527] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jan 11 19:21:20.670808 2017] [mpm_prefork:notice] [pid 4527] AH00169: caught SIGTERM, shutting down

我正在使用elementaryOS。在这种情况下,任何人都知道该怎么办?

1 个答案:

答案 0 :(得分:0)

  1. 通过查找目录,检查已安装的php数量以及apache中需要/启用的数量: ls / etc / apache2 / mods-enabled
  2. 禁用不需要的php模块。在我的情况下它是php5(我必须使用php7.1而不是php5),所以输入: a2dismod php5 < / LI>
  3. 然后重新启动您的apache服务器: /etc/init.d/apache2 restart