树莓派media Wiki出现这个错误如何解决

隔壁老王 2019-10-0243 次点击

错误代码:

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
mediaWiki安装过程
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libaio1 libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libdbd-mysql-perl
libdbi-perl libhtml-template-perl libjs-jquery-cookie libjs-jquery-form libjs-jquery-tipsy liblua5.1-0 libmysqlclient18 libonig2 libperl4-corelibs-perl libqdbm14
libterm-readkey-perl lsof mediawiki-classes mediawiki-extensions-base mysql-client-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
php-wikidiff2 php5 php5-cli php5-common php5-json php5-mysql php5-readline ssl-cert
Suggested packages:
apache2-doc apache2-suexec-pristine apache2-suexec-custom php-pear libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libipc-sharedcache-perl
imagemagick php5-gd mediawiki-extensions-math memcached clamav mailx tinyca php5-user-cache openssl-blacklist
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libaio1 libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libdbd-mysql-perl
libdbi-perl libhtml-template-perl libjs-jquery-cookie libjs-jquery-form libjs-jquery-tipsy liblua5.1-0 libmysqlclient18 libonig2 libperl4-corelibs-perl libqdbm14
libterm-readkey-perl lsof mediawiki mediawiki-classes mediawiki-extensions-base mysql-client-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
php-wikidiff2 php5 php5-cli php5-common php5-json php5-mysql php5-readline ssl-cert
0 upgraded, 39 newly installed, 0 to remove and 414 not upgraded.
Need to get 27.5 MB of archives.
After this operation, 186 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libapr1 armhf 1.5.1-3 [77.1 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libaprutil1 armhf 1.5.4-1 [75.9 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libaprutil1-dbd-sqlite3 armhf 1.5.4-1 [17.7 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main libaprutil1-ldap armhf 1.5.4-1 [16.7 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ jessie/main liblua5.1-0 armhf 5.1.5-7.1 [83.7 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ jessie/main apache2-data all 2.4.10-10+deb8u16 [163 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ jessie/main apache2-bin armhf 2.4.10-10+deb8u16 [902 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian/ jessie/main libaio1 armhf 0.3.110-1 [9,228 B]
Get:9 http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-common all 5.5.62-0+deb8u1 [75.7 kB]
Get:10 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmysqlclient18 armhf 5.5.62-0+deb8u1 [619 kB]
Get:11 http://mirrordirector.raspbian.org/raspbian/ jessie/main libonig2 armhf 5.9.5-3.2+deb8u3 [102 kB]
Get:12 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdbi-perl armhf 1.631-3+b1 [807 kB]
Get:13 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdbd-mysql-perl armhf 4.028-2+deb8u2 [113 kB]
Get:14 http://mirrordirector.raspbian.org/raspbian/ jessie/main libterm-readkey-perl armhf 2.32-1+b2 [26.1 kB]
Get:15 http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-client-5.5 armhf 5.5.62-0+deb8u1 [1,540 kB]
Get:16 http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-server-core-5.5 armhf 5.5.62-0+deb8u1 [3,081 kB]
Get:17 http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-server-5.5 armhf 5.5.62-0+deb8u1 [1,701 kB]
Get:18 http://mirrordirector.raspbian.org/raspbian/ jessie/main libperl4-corelibs-perl all 0.003-1 [43.6 kB]
Get:19 http://mirrordirector.raspbian.org/raspbian/ jessie/main php5 all 5.6.40+dfsg-0+deb8u6 [1,304 B]
Get:20 http://mirrordirector.raspbian.org/raspbian/ jessie/main lsof armhf 4.86+dfsg-1 [321 kB]
Get:21 http://mirrordirector.raspbian.org/raspbian/ jessie/main libqdbm14 armhf 1.8.78-5+b1 [86.0 kB]
Get:22 http://mirrordirector.raspbian.org/raspbian/ jessie/main php5-common armhf 5.6.40+dfsg-0+deb8u6 [729 kB]
Get:23 http://mirrordirector.raspbian.org/raspbian/ jessie/main php5-json armhf 1.3.6-1 [16.9 kB]
Get:24 http://mirrordirector.raspbian.org/raspbian/ jessie/main php5-cli armhf 5.6.40+dfsg-0+deb8u6 [1,908 kB]
Get:25 http://mirrordirector.raspbian.org/raspbian/ jessie/main libapache2-mod-php5 armhf 5.6.40+dfsg-0+deb8u6 [1,882 kB]
Get:26 http://mirrordirector.raspbian.org/raspbian/ jessie/main libhtml-template-perl all 2.95-1 [66.8 kB]
Get:27 http://mirrordirector.raspbian.org/raspbian/ jessie/main libjs-jquery-cookie all 10-1 [7,978 B]
Get:28 http://mirrordirector.raspbian.org/raspbian/ jessie/main libjs-jquery-form all 10-1 [18.9 kB]
Get:29 http://mirrordirector.raspbian.org/raspbian/ jessie/main libjs-jquery-tipsy all 10-1 [8,434 B]
Get:30 http://mirrordirector.raspbian.org/raspbian/ jessie/main php5-mysql armhf 5.6.40+dfsg-0+deb8u6 [52.6 kB]
Get:31 http://mirrordirector.raspbian.org/raspbian/ jessie/main mediawiki-classes all 1:1.19.20+dfsg-2.3 [239 kB]
Get:32 http://mirrordirector.raspbian.org/raspbian/ jessie/main mediawiki all 1:1.19.20+dfsg-2.3 [11.8 MB]
Get:33 http://mirrordirector.raspbian.org/raspbian/ jessie/main mediawiki-extensions-base all 3.7 [408 kB]
Get:34 http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-server all 5.5.62-0+deb8u1 [73.9 kB]
Get:35 http://mirrordirector.raspbian.org/raspbian/ jessie/main php-wikidiff2 armhf 1.2+git03ea59f-1 [36.2 kB]
Get:36 http://mirrordirector.raspbian.org/raspbian/ jessie/main php5-readline armhf 5.6.40+dfsg-0+deb8u6 [11.2 kB]
Get:37 http://mirrordirector.raspbian.org/raspbian/ jessie/main ssl-cert all 1.0.35 [20.9 kB]
Get:38 http://mirrordirector.raspbian.org/raspbian/ jessie/main apache2-bin armhf 2.4.10-10+deb8u16 [902 kB]
Get:39 http://mirrordirector.raspbian.org/raspbian/ jessie/main apache2-utils armhf 2.4.10-10+deb8u16 [196 kB]
Get:40 http://mirrordirector.raspbian.org/raspbian/ jessie/main apache2 armhf 2.4.10-10+deb8u16 [209 kB]
Fetched 27.2 MB in 3min 11s (142 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package libapr1:armhf.
(Reading database ... 118080 files and directories currently installed.)
Preparing to unpack .../libapr1_1.5.1-3_armhf.deb ...
Unpacking libapr1:armhf (1.5.1-3) ...
Selecting previously unselected package libaprutil1:armhf.
Preparing to unpack .../libaprutil1_1.5.4-1_armhf.deb ...
Unpacking libaprutil1:armhf (1.5.4-1) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:armhf.
Preparing to unpack .../libaprutil1-dbd-sqlite3_1.5.4-1_armhf.deb ...
Unpacking libaprutil1-dbd-sqlite3:armhf (1.5.4-1) ...
Selecting previously unselected package libaprutil1-ldap:armhf.
Preparing to unpack .../libaprutil1-ldap_1.5.4-1_armhf.deb ...
Unpacking libaprutil1-ldap:armhf (1.5.4-1) ...
Selecting previously unselected package liblua5.1-0:armhf.
Preparing to unpack .../liblua5.1-0_5.1.5-7.1_armhf.deb ...
Unpacking liblua5.1-0:armhf (5.1.5-7.1) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../apache2-bin_2.4.10-10+deb8u16_armhf.deb ...
Unpacking apache2-bin (2.4.10-10+deb8u16) ...
Selecting previously unselected package apache2-utils.
Preparing to unpack .../apache2-utils_2.4.10-10+deb8u16_armhf.deb ...
Unpacking apache2-utils (2.4.10-10+deb8u16) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../apache2-data_2.4.10-10+deb8u16_all.deb ...
Unpacking apache2-data (2.4.10-10+deb8u16) ...
Selecting previously unselected package apache2.
Preparing to unpack .../apache2_2.4.10-10+deb8u16_armhf.deb ...
Unpacking apache2 (2.4.10-10+deb8u16) ...
Selecting previously unselected package libaio1:armhf.
Preparing to unpack .../libaio1_0.3.110-1_armhf.deb ...
Unpacking libaio1:armhf (0.3.110-1) ...
Selecting previously unselected package mysql-common.
Preparing to unpack .../mysql-common_5.5.62-0+deb8u1_all.deb ...
Unpacking mysql-common (5.5.62-0+deb8u1) ...
Selecting previously unselected package libmysqlclient18:armhf.
Preparing to unpack .../libmysqlclient18_5.5.62-0+deb8u1_armhf.deb ...
Unpacking libmysqlclient18:armhf (5.5.62-0+deb8u1) ...
Selecting previously unselected package libonig2:armhf.
Preparing to unpack .../libonig2_5.9.5-3.2+deb8u3_armhf.deb ...
Unpacking libonig2:armhf (5.9.5-3.2+deb8u3) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.631-3+b1_armhf.deb ...
Unpacking libdbi-perl (1.631-3+b1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.028-2+deb8u2_armhf.deb ...
Unpacking libdbd-mysql-perl (4.028-2+deb8u2) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.32-1+b2_armhf.deb ...
Unpacking libterm-readkey-perl (2.32-1+b2) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client-5.5_5.5.62-0+deb8u1_armhf.deb ...
Unpacking mysql-client-5.5 (5.5.62-0+deb8u1) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.62-0+deb8u1_armhf.deb ...
Unpacking mysql-server-core-5.5 (5.5.62-0+deb8u1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (215-17+deb8u4) ...
Setting up mysql-common (5.5.62-0+deb8u1) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 119128 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.62-0+deb8u1_armhf.deb ...
Unpacking mysql-server-5.5 (5.5.62-0+deb8u1) ...
Selecting previously unselected package libperl4-corelibs-perl.
Preparing to unpack .../libperl4-corelibs-perl_0.003-1_all.deb ...
Unpacking libperl4-corelibs-perl (0.003-1) ...
Selecting previously unselected package lsof.
Preparing to unpack .../lsof_4.86+dfsg-1_armhf.deb ...
Unpacking lsof (4.86+dfsg-1) ...
Selecting previously unselected package libqdbm14.
Preparing to unpack .../libqdbm14_1.8.78-5+b1_armhf.deb ...
Unpacking libqdbm14 (1.8.78-5+b1) ...
Selecting previously unselected package php5-common.
Preparing to unpack .../php5-common_5.6.40+dfsg-0+deb8u6_armhf.deb ...
Unpacking php5-common (5.6.40+dfsg-0+deb8u6) ...
Selecting previously unselected package php5-json.
Preparing to unpack .../php5-json_1.3.6-1_armhf.deb ...
Unpacking php5-json (1.3.6-1) ...
Selecting previously unselected package php5-cli.
Preparing to unpack .../php5-cli_5.6.40+dfsg-0+deb8u6_armhf.deb ...
Unpacking php5-cli (5.6.40+dfsg-0+deb8u6) ...
Selecting previously unselected package libapache2-mod-php5.
Preparing to unpack .../libapache2-mod-php5_5.6.40+dfsg-0+deb8u6_armhf.deb ...
Unpacking libapache2-mod-php5 (5.6.40+dfsg-0+deb8u6) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-1_all.deb ...
Unpacking libhtml-template-perl (2.95-1) ...
Selecting previously unselected package libjs-jquery-cookie.
Preparing to unpack .../libjs-jquery-cookie_10-1_all.deb ...
Unpacking libjs-jquery-cookie (10-1) ...
Selecting previously unselected package libjs-jquery-form.
Preparing to unpack .../libjs-jquery-form_10-1_all.deb ...
Unpacking libjs-jquery-form (10-1) ...
Selecting previously unselected package libjs-jquery-tipsy.
Preparing to unpack .../libjs-jquery-tipsy_10-1_all.deb ...
Unpacking libjs-jquery-tipsy (10-1) ...
Selecting previously unselected package php5.
Preparing to unpack .../php5_5.6.40+dfsg-0+deb8u6_all.deb ...
Unpacking php5 (5.6.40+dfsg-0+deb8u6) ...
Selecting previously unselected package php5-mysql.
Preparing to unpack .../php5-mysql_5.6.40+dfsg-0+deb8u6_armhf.deb ...
Unpacking php5-mysql (5.6.40+dfsg-0+deb8u6) ...
Selecting previously unselected package mediawiki-classes.
Preparing to unpack .../mediawiki-classes_1%3a1.19.20+dfsg-2.3_all.deb ...
Unpacking mediawiki-classes (1:1.19.20+dfsg-2.3) ...
Selecting previously unselected package mediawiki.
Preparing to unpack .../mediawiki_1%3a1.19.20+dfsg-2.3_all.deb ...
Unpacking mediawiki (1:1.19.20+dfsg-2.3) ...
Selecting previously unselected package mediawiki-extensions-base.
Preparing to unpack .../mediawiki-extensions-base_3.7_all.deb ...
Unpacking mediawiki-extensions-base (3.7) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.62-0+deb8u1_all.deb ...
Unpacking mysql-server (5.5.62-0+deb8u1) ...
Selecting previously unselected package php-wikidiff2.
Preparing to unpack .../php-wikidiff2_1.2+git03ea59f-1_armhf.deb ...
Unpacking php-wikidiff2 (1.2+git03ea59f-1) ...
Selecting previously unselected package php5-readline.
Preparing to unpack .../php5-readline_5.6.40+dfsg-0+deb8u6_armhf.deb ...
Unpacking php5-readline (5.6.40+dfsg-0+deb8u6) ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../ssl-cert_1.0.35_all.deb ...
Unpacking ssl-cert (1.0.35) ...
Processing triggers for systemd (215-17+deb8u4) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libapr1:armhf (1.5.1-3) ...
Setting up libaprutil1:armhf (1.5.4-1) ...
Setting up libaprutil1-dbd-sqlite3:armhf (1.5.4-1) ...
Setting up libaprutil1-ldap:armhf (1.5.4-1) ...
Setting up liblua5.1-0:armhf (5.1.5-7.1) ...
Setting up apache2-bin (2.4.10-10+deb8u16) ...
Setting up apache2-utils (2.4.10-10+deb8u16) ...
Setting up apache2-data (2.4.10-10+deb8u16) ...
Setting up apache2 (2.4.10-10+deb8u16) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Setting up libaio1:armhf (0.3.110-1) ...
Setting up libmysqlclient18:armhf (5.5.62-0+deb8u1) ...
Setting up libonig2:armhf (5.9.5-3.2+deb8u3) ...
Setting up libdbi-perl (1.631-3+b1) ...
Setting up libdbd-mysql-perl (4.028-2+deb8u2) ...
Setting up libterm-readkey-perl (2.32-1+b2) ...
Setting up mysql-client-5.5 (5.5.62-0+deb8u1) ...
Setting up mysql-server-core-5.5 (5.5.62-0+deb8u1) ...
Setting up mysql-server-5.5 (5.5.62-0+deb8u1) ...
Enabling191002 3:24:17 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
191002 3:24:17 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
191002 3:24:17 [Note] /usr/sbin/mysqld (mysqld 5.5.62-0+deb8u1) starting as process 20676 ...
Setting up libperl4-corelibs-perl (0.003-1) ...
Setting up lsof (4.86+dfsg-1) ...
Setting up libqdbm14 (1.8.78-5+b1) ...
Setting up php5-common (5.6.40+dfsg-0+deb8u6) ...

Creating config file /etc/php5/mods-available/pdo.ini with new version
php5_invoke: Enable module pdo for apache2 SAPI
php5_invoke: Enable module pdo for cli SAPI

Creating config file /etc/php5/mods-available/opcache.ini with new version
php5_invoke: Enable module opcache for apache2 SAPI
php5_invoke: Enable module opcache for cli SAPI
Setting up php5-json (1.3.6-1) ...
php5_invoke: Enable module json for apache2 SAPI
php5_invoke: Enable module json for cli SAPI
Setting up php5-cli (5.6.40+dfsg-0+deb8u6) ...
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar5 to provide /usr/bin/phar (phar) in auto mode

Creating config file /etc/php5/cli/php.ini with new version
Setting up libapache2-mod-php5 (5.6.40+dfsg-0+deb8u6) ...

Creating config file /etc/php5/apache2/php.ini with new version
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php5
Setting up libhtml-template-perl (2.95-1) ...
Setting up libjs-jquery-cookie (10-1) ...
Setting up libjs-jquery-form (10-1) ...
Setting up libjs-jquery-tipsy (10-1) ...
Setting up php5 (5.6.40+dfsg-0+deb8u6) ...
Setting up php5-mysql (5.6.40+dfsg-0+deb8u6) ...

Creating config file /etc/php5/mods-available/mysql.ini with new version
php5_invoke: Enable module mysql for apache2 SAPI
php5_invoke: Enable module mysql for cli SAPI

Creating config file /etc/php5/mods-available/mysqli.ini with new version
php5_invoke: Enable module mysqli for apache2 SAPI
php5_invoke: Enable module mysqli for cli SAPI

Creating config file /etc/php5/mods-available/pdo_mysql.ini with new version
php5_invoke: Enable module pdo_mysql for apache2 SAPI
php5_invoke: Enable module pdo_mysql for cli SAPI
Setting up mediawiki-classes (1:1.19.20+dfsg-2.3) ...
Setting up mediawiki (1:1.19.20+dfsg-2.3) ...
Setting up mediawiki-extensions-base (3.7) ...
Setting up mysql-server (5.5.62-0+deb8u1) ...
Setting up php-wikidiff2 (1.2+git03ea59f-1) ...
Setting up php5-readline (5.6.40+dfsg-0+deb8u6) ...

Creating config file /etc/php5/mods-available/readline.ini with new version
php5_invoke: Enable module readline for apache2 SAPI
php5_invoke: Enable module readline for cli SAPI
Setting up ssl-cert (1.0.35) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
Processing triggers for systemd (215-17+deb8u4) ...
Processing triggers for libapache2-mod-php5 (5.6.40+dfsg-0+deb8u6) ...
错误出在 :
编辑 sudo nano /etc/mediawiki/apache.conf(删除下列字符串之前的#以取消对mediawiki网站别名注释)
编辑内容
把 #Alias /mediawiki /var/lib/mediawiki
的#去掉了
然后重启了apache的服务器
代码
: sudo apachectl 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
各位大佬,这个怎么办

收藏 ♥ 感谢
Spoony 小组长 2019-10-03 
Set the 'ServerName' directive globally to suppress this message

这个就是解决方法了,修改 apache.conf 中的配置,指定主机名。

例如编辑 httpd.conf 文件,搜索"#ServerName",添加ServerName localhost:80
vi httpd.conf
#ServerName www.example.com:80
ServerName localhost:80

登录注册 后可回复。