您的位置:首页 > 运维架构 > Apache

Ubuntu12.04卸载apache2后再安装出现的问题解决

2013-08-25 19:35 459 查看
/etc/init.d/apache2: 51: .: Can't open /etc/apache2/envvars

root@msm:/etc#
sudo dpkg --get-selections | grep apache

apache2 install

apache2-mpm-worker install

apache2-utils install

apache2.2-bin install

apache2.2-common install

root@msm:/etc#
sudo dpkg --get-selections | grep apache

apache2 install

apache2-mpm-worker install

apache2-utils install

apache2.2-bin install

apache2.2-common install

root@msm:/etc#
sudo apt-get remove --purge apache2 apache2-mpm-worker apache2.2-bin apache2.2-common apache2-utils

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

lynx-cur

The following packages will be REMOVED:

apache2* apache2-mpm-worker* apache2-utils* apache2.2-bin* apache2.2-common*

gitweb*

The following NEW packages will be installed:

lynx-cur

0 upgraded, 1 newly installed, 6 to remove and 308 not upgraded.

Need to get 1,060 kB of archives.

After this operation, 2,950 kB disk space will be freed.

Do you want to continue [Y/n]? y

Get:1 http://mirrors.163.com/ubuntu/ precise/main lynx-cur amd64 2.8.8dev.9-2 [1,060 kB]

Fetched 1,060 kB in 0s (1,785 kB/s)

(Reading database ... 155425 files and directories currently installed.)

Removing apache2 ...

Selecting previously unselected package lynx-cur.

(Reading database ... 155422 files and directories currently installed.)

Unpacking lynx-cur (from .../lynx-cur_2.8.8dev.9-2_amd64.deb) ...

Processing triggers for doc-base ...

Processing 1 added doc-base file...

Processing triggers for man-db ...

Setting up lynx-cur (2.8.8dev.9-2) ...

update-alternatives: using /usr/bin/lynx to provide /usr/bin/www-browser (www-browser) in auto mode.

(Reading database ... 155491 files and directories currently installed.)

Removing gitweb ...

Purging configuration files for gitweb ...

Removing apache2-mpm-worker ...

/etc/init.d/apache2: 51: .: Can't open /etc/apache2/envvars

invoke-rc.d: initscript apache2, action "stop" failed.

Removing apache2.2-common ...

Purging configuration files for apache2.2-common ...

Removing apache2-utils ...

Removing apache2.2-bin ...

Processing triggers for man-db ...

Processing triggers for ureadahead ...

ureadahead will be reprofiled on next reboot

Processing triggers for ufw ...

root@msm:/etc#
sudo apt-get install apache2

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common

Suggested packages:

apache2-doc apache2-suexec apache2-suexec-custom

The following NEW packages will be installed:

apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common

0 upgraded, 5 newly installed, 0 to remove and 308 not upgraded.

Need to get 0 B/1,659 kB of archives.

After this operation, 4,935 kB of additional disk space will be used.

Do you want to continue [Y/n]? y

Selecting previously unselected package apache2.2-bin.

(Reading database ... 154933 files and directories currently installed.)

Unpacking apache2.2-bin (from .../apache2.2-bin_2.2.22-1ubuntu1.1_amd64.deb) ...

Selecting previously unselected package apache2-utils.

Unpacking apache2-utils (from .../apache2-utils_2.2.22-1ubuntu1.1_amd64.deb) ...

Selecting previously unselected package apache2.2-common.

Unpacking apache2.2-common (from .../apache2.2-common_2.2.22-1ubuntu1.1_amd64.deb) ...

Selecting previously unselected package apache2-mpm-worker.

Unpacking apache2-mpm-worker (from .../apache2-mpm-worker_2.2.22-1ubuntu1.1_amd64.deb) ...

Selecting previously unselected package apache2.

Unpacking apache2 (from .../apache2_2.2.22-1ubuntu1.1_amd64.deb) ...

Processing triggers for man-db ...

Processing triggers for ufw ...

Processing triggers for ureadahead ...

Setting up apache2.2-bin (2.2.22-1ubuntu1.1) ...

Setting up apache2-utils (2.2.22-1ubuntu1.1) ...

Setting up apache2.2-common (2.2.22-1ubuntu1.1) ...

Enabling site default.

Enabling module alias.

Enabling module autoindex.

Enabling module dir.

Enabling module env.

Enabling module mime.

Enabling module negotiation.

Enabling module setenvif.

Enabling module status.

Enabling module auth_basic.

Enabling module deflate.

Enabling module authz_default.

Enabling module authz_user.

Enabling module authz_groupfile.

Enabling module authn_file.

Enabling module authz_host.

Enabling module reqtimeout.

Setting up apache2-mpm-worker (2.2.22-1ubuntu1.1) ...

* Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

[ OK ]

Setting up apache2 (2.2.22-1ubuntu1.1) ...

root@msm:/etc# ls /etc/ap

apache2/ apm/ apparmor.d/ apt/

apg.conf apparmor/ apport/

root@msm:/etc# ls /etc/ap

apache2/ apm/ apparmor.d/ apt/

apg.conf apparmor/ apport/

root@msm:/etc# ls /etc/apache2/

apache2.conf envvars magic mods-enabled sites-available

conf.d httpd.conf mods-available ports.conf sites-enabled

root@msm:/etc# service apache2 restart

* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

... waiting .apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

[ OK ]

root@msm:/etc#
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐