• 重新安装apahce2 服务器


    /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#


  • 相关阅读:
    tgttg
    在OpenStack虚拟机实例中创建swap分区的一种方法
    产品:我想要的产品是网络存储+网络备份
    《哪来的天才?》读书笔记——天才源于练习,而且是针对性的练习
    一万小时理论的解读(神贴真开眼界:有意识的刻苦训练是必须的,要有精神动力,还必须有及时的反馈,对实力占优的活动比较有效;玩这样的活动是不行的)
    Cross-compiling Qt Embedded 5.5 for Raspberry Pi 2
    MSYS2的源配置
    关于iOS 5 Could not instantiate class named NSLayoutConstraint错误
    BAT线下战争:巨额投资或培养出自己最大对手(包括美团、58、饿了么在内的公司都在计划推出自己的支付工具和金融产品,腾讯只做2不做O)
    欢聚移动互联时代 在腾讯的夹缝中低调崛起
  • 原文地址:https://www.cnblogs.com/yuzaipiaofei/p/4124176.html
Copyright © 2020-2023  润新知