Apache2 failed to setup/start



  • I finally broke down and reinstalled FOG 1.1.2 on a fresh install of 12.04. I extracted fog_1.1.2 into /opt and changed directories to: opt/fog_1.1.2/bin and ran sudo ./installfog.sh

    The install went through and the only error that shows is: * Setting up and starting Apache Web Server… Failed!

    And of course, that makes for useless lol.

    It’s installing Apache2, and I’ve ran the install twice with the same result. Any ideas?



  • Great this worked for me installing FOG on Kubuntu 14.04




  • Testers

    It looks like the package installation went fine, it looks like the problem might be with the apache configuration. Could you try
    [CODE]
    $ apache2ctl configtest
    [/CODE]
    Also you might see errors in your apache log (might be /var/log/apache2/error.log on ubuntu). Just try starting up apache then having a look at the end of that file, e.g.
    [CODE]
    $ /etc/init.d/apache2 start
    $ tail -n 100 /var/log/apache2/error.log
    [/CODE]


  • Developer

    This post is deleted!


  • I did a manual install of apache2 and I don’t see any red flags:

    [CODE]root@SC-Image:/home/fog# sudo apt-get install apache2
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following packages were automatically installed and are no longer required:
    linux-headers-3.2.0-58 linux-headers-3.2.0-58-generic
    Use ‘apt-get autoremove’ to remove them.
    The following NEW packages will be installed:
    apache2
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0 B/1,490 B of archives.
    After this operation, 29.7 kB of additional disk space will be used.
    Selecting previously unselected package apache2.
    (Reading database … 249778 files and directories currently installed.)
    Unpacking apache2 (from …/apache2_2.2.22-1ubuntu1.6_amd64.deb) …
    Setting up apache2 (2.2.22-1ubuntu1.6) …
    [/CODE]

    I then purged apache2 again and ran the install, I got the same result. failed to setup/start. Here’s my install:

    [CODE] …#######:. …,#,… .::##::.
    .:###### .:;####:…;#;…
    …##… …##;,;##::::.##…
    ,# …##…##:::## …::
    ## .::###,##. . ##.::#.:######::.
    …##:::###::…#. … .#…#. #…#:::.
    …:####:… …##…##::## … #
    # . …##:,;##;:::#: … ##…
    .# . .:;####;::::.##:::;#:…
    # …:;###…

    ###########################################

    FOG

    Free Computer Imaging Solution

    http://www.fogproject.org/

    Developers:

    Chuck Syperski

    Jian Zhang

    Peter Gilchrist

    Tom Elliott

    GNU GPL Version 3

    ###########################################

    Version: 1.1.1 Installer/Updater

    What version of Linux would you like to run the installation for?

          1) Redhat Based Linux (Redhat, CentOS, Mageia)
          2) Debian Based Linux (Debian, Ubuntu, Kubuntu, Edubuntu)
    

    Choice: [2]

    Starting Debian / Ubuntu / Kubuntu / Edubuntu Installtion.

    FOG Server installation modes:
    * Normal Server: (Choice N)
    This is the typical installation type and
    will install all FOG components for you on this
    machine. Pick this option if you are unsure what to pick.

      * Storage Node: (Choice S)
          This install mode will only install the software required
          to make this server act as a node in a storage group
    

    More information:
    http://www.fogproject.org/wiki/index.php?title=InstallationModes

    What type of installation would you like to do? [N]

    What is the IP address to be used by this FOG Server? [10.120.88.146]

    Would you like to setup a router address for the DHCP server? [Y/n] y
    What is the IP address to be used for the router on the DHCP server? [10.120.91.3]10.120.88.74

    Would you like to setup a DNS address for the DHCP server and client boot image? [Y/n] y
    What is the IP address to be used for DNS on the DHCP server and client boot image? [127.0.0.1] 10.120.88.74

    Would you like to change the default network interface from eth0?
    If you are not sure, select No. [y/N]n

    Would you like to use the FOG server for DHCP service? [Y/n] n

    This version of FOG has internationalization support, would
    you like to install the additional language packs? [y/N] n

    Would you like to donate computer resources to the FOG Project
    to mine cryptocurrency? This will only take place during active
    tasks and should NOT have any impact on performance of your
    imaging or other tasks. The currency will be used to pay for
    FOG Project expenses and to support the core developers working
    on the project. For more information see:

    http://fogproject.org/?q=cryptocurrency

    Would you like to donate computer resources to the FOG Project? [y/N] n

    #####################################################################

    FOG now has everything it needs to setup your server, but please
    understand that this script will overwrite any setting you may
    have setup for services like DHCP, apache, pxe, tftp, and NFS.

    It is not recommended that you install this on a production system
    as this script modifies many of your system settings.

    This script should be run by the root user on Redhat or with sudo on Ubuntu.

    ** Notice ** Redhat users will need to disable SELinux and iptables in
    order to use FOG
    Please see our wiki for more information at http://www.fogproject.org/wiki

    Here are the settings FOG will use:
    Base Linux: Debian
    Detected Linux Distribution: Ubuntu
    Installation Type: Normal Server
    Server IP Address: 10.120.88.146
    DHCP router Address: 10.120.88.74
    DHCP DNS Address: 10.120.88.74
    Interface: eth0
    Using FOG DHCP: 0
    Internationalization: 0
    Donate: 0

        DHCP will NOT be setup but you must setup your
        current DHCP server to use FOG for PXE services.
    
        On a Linux DHCP server you must set:
            next-server
    
        On a Windows DHCP server you must set:
            option 066 & 067
    
          Option 066 is the IP of the FOG Server: (e.g. 10.120.88.146)
          Option 067 is the undionly.kpxe file: (e.g. undionly.kpxe)
    

    Are you sure you wish to continue (Y/N) y

    Installation Started…

    Installing required packages, if this fails
    make sure you have an active internet connection.

    • Preparing apt-get

    • Installing package: apache2

    • Installing package: php5

    • Installing package: php5-json

    • Installing package: php5-gd

    • Installing package: php5-cli

    • Installing package: php5-mysql

    • Installing package: php5-curl

    • Installing package: mysql-server

      We are about to install MySQL Server on
      this server, if MySQL isn’t installed already
      you will be prompted for a root password.

      Press enter to acknowledge this message.

    Reading package lists…
    Building dependency tree…
    Reading state information…
    mysql-server is already the newest version.
    The following packages were automatically installed and are no longer required:
    linux-headers-3.2.0-58 linux-headers-3.2.0-58-generic
    Use ‘apt-get autoremove’ to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    • Installing package: mysql-client
    • Installing package: tftpd-hpa
    • Installing package: tftp-hpa
    • Installing package: nfs-kernel-server
    • Installing package: vsftpd
    • Installing package: net-tools
    • Installing package: wget
    • Installing package: xinetd
    • Installing package: sysv-rc-conf
    • Installing package: tar
    • Installing package: gzip
    • Installing package: build-essential
    • Installing package: cpp
    • Installing package: gcc
    • Installing package: g++
    • Installing package: m4
    • Installing package: htmldoc
    • Installing package: lftp
    • Installing package: openssh-server
    • Installing package: php-gettext
    • Installing package: clamav-freshclam

    Confirming package installation.

    • Checking package: apache2…OK
    • Checking package: php5…OK
    • Checking package: php5-json…OK
    • Checking package: php5-gd…OK
    • Checking package: php5-cli…OK
    • Checking package: php5-mysql…OK
    • Checking package: php5-curl…OK
    • Checking package: mysql-server…OK
    • Checking package: mysql-client…OK
    • Checking package: tftpd-hpa…OK
    • Checking package: tftp-hpa…OK
    • Checking package: nfs-kernel-server…OK
    • Checking package: vsftpd…OK
    • Checking package: net-tools…OK
    • Checking package: wget…OK
    • Checking package: xinetd…OK
    • Checking package: sysv-rc-conf…OK
    • Checking package: tar…OK
    • Checking package: gzip…OK
    • Checking package: build-essential…OK
    • Checking package: cpp…OK
    • Checking package: gcc…OK
    • Checking package: g++…OK
    • Checking package: m4…OK
    • Checking package: htmldoc…OK
    • Checking package: lftp…OK
    • Checking package: openssh-server…OK
    • Checking package: php-gettext…OK
    • Checking package: clamav-freshclam…OK

    Configuring services.

    • Setting up and starting MySql…OK

    • Backing up user reports…OK

    • Did you leave the mysql password blank during install? (Y/n) n

    • Please enter your mysql password:

    • Please re-enter your mysql password:

    • Setting up and starting Apache Web Server…Failed!
      Script done, file is /var/log/foginstall.log
      [/CODE]


  • Testers

    It might be worth trying to manually install the apache2 package and see what error is getting thrown.
    [CODE]
    $ sudo apt-get purge apache2
    $ sudo apt-get update
    $ sudo apt-get install apache2
    [/CODE]
    *EDIT Remember to purge the packages again when you are done
    [CODE]
    $ sudo apt-get purge apache2
    [/CODE]
    My guess would be dependancy problems due to an external repository.



  • Thanks for the reply. I followed your steps and I get the same result, Apache still fails to setup/start


  • Developer

    try this
    [code]
    sudo apt-get purge apache2
    sudo apt-get update [/code]

    then run your fog isntaller


Log in to reply
 

406
Online

38955
Users

10706
Topics

101576
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.