+ Responder ao Tópico



  1. #1

    Padrão Reinstalação Apache

    Saudações galera, então estou com um probleminha no meu servidor. Eu tinha o apache + php rodando nele perfeitamente, um dia restartei a maquina e surpresa, nao funcionava mais apache nem PHP, fui tentar reinstalar tudo(remover e instalar denovo os pacotes), comecei pelo do PHP, foi perfeito, quando cheguei no apache2 ele dá a segunte mensagem:

    fatecorg:/# apt-get install apache2
    Reading Package Lists... Done
    Building Dependency Tree... Done
    The following NEW packages will be installed:
    apache2
    0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
    Need to get 0B/33.5kB of archives.
    After unpacking 81.9kB of additional disk space will be used.
    Selecting previously deselected package apache2.
    (Reading database ... 16588 files and directories currently installed.)
    Unpacking apache2 (from .../apache2_2.0.54-5sarge1_i386.deb) ...
    Setting up apache2 (2.0.54-5sarge1) ...
    fatecorg:/#

    E não instala(não sei se nao instala ou o que, só sei que nao funciona) o apache, alguém sabe me dizer o por que?

    VAleu pela atenção!

  2. #2

    Padrão

    Vc acha que ele não está instalado pq? não está achando os scripts de inicialização? Arquivos de configuração??? ....??

  3. #3

    Padrão

    /# ls etc/init.d/
    atd hotplug-net mountall.sh README
    bootclean.sh hwclockfirst.sh mountnfs.sh reboot
    bootlogd hwclock.sh mountvirtfs rmnologin
    bootmisc.sh ifupdown mysql sendsigs
    checkfs.sh ifupdown-clean mysql.dpkg-dist single
    checkroot.sh inetd mysql-ndb skeleton
    console-screen.sh initrd-tools.sh mysql-ndb-mgm ssh
    cron keymap.sh networking stop-bootlogd
    discover klogd nviboot sysklogd
    dns-clean libdevmapper1.01 ppp umountfs
    exim4 libdevmapper1.02 pppd-dns umountnfs.sh
    glibc.sh lvm procps.sh urandom
    halt makedev proftpd
    hostname.sh module-init-tools rc
    hotplug modutils rcS


    Ele nem na inicialização se encontra.

    Gostaria de saber como remover ele e todas dependencias dele e instalar ele do zero novamente.

  4. #4

    Padrão

    Você tem que instalar também os pacotes referentes ao PHP.

    Código :
    # apt-get install php4


    Abraços!

  5. #5

    Padrão

    Código :
    /# apt-get install php4
    Reading Package Lists... Done
    Building Dependency Tree... Done
    The following extra packages will be installed:
      apache2-mpm-prefork libapache-mod-php4 libapache2-mod-php4 php4-common
    Suggested packages:
      php-pear php4-pear
    The following packages will be REMOVED:
      apache2-mpm-worker
    The following NEW packages will be installed:
      apache2-mpm-prefork libapache2-mod-php4 php4
    The following packages will be upgraded:
      libapache-mod-php4 php4-common
    2 upgraded, 3 newly installed, 1 to remove and 2 not upgraded.
    Need to get 3483kB/3686kB of archives.
    After unpacking 3424kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://packages.dotdeb.org stable/all libapache-mod-php4 4:4.4.6-0.dotdeb.2 [1640kB]
    Get:2 http://packages.dotdeb.org stable/all php4-common 4:4.4.6-0.dotdeb.2 [202kB]
    Get:3 http://packages.dotdeb.org stable/all libapache2-mod-php4 4:4.4.6-0.dotdeb.2 [1641kB]
    Get:4 http://packages.dotdeb.org stable/all php4 4:4.4.6-0.dotdeb.2 [1152B]
    Fetched 3483kB in 1m8s (51.1kB/s)
    dpkg: apache2-mpm-worker: dependency problems, but removing anyway as you request:
     apache2 depends on apache2-mpm-worker (= 2.0.54-5sarge1) | apache2-mpm-prefork (= 2.0.54-5sarge1) | apache2-mpm-perchild (= 2.0.54-5sarge1); however:
      Package apache2-mpm-worker is to be removed.
      Package apache2-mpm-prefork is not installed.
      Package apache2-mpm-perchild is not installed.
    (Reading database ... 16590 files and directories currently installed.)
    Removing apache2-mpm-worker ...
    invoke-rc.d: unknown initscript, /etc/init.d/apache2 not found.
    dpkg: error processing apache2-mpm-worker (--remove):
     subprocess pre-removal script returned error exit status 100
    Errors were encountered while processing:
     apache2-mpm-worker
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    fatecorg:/# apt-get install apache2-mpm-worker
    Reading Package Lists... Done
    Building Dependency Tree... Done
    apache2-mpm-worker is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

    Ele requer o apache lá na inicialização!

  6. #6

    Padrão

    Então faz assim

    dpkg -P apache2

    depois

    dpkg -L |grep apache

    e verifica se lista alguma coisa, caso positivo, desinstale também.

    instale novamente o apache e o php e posta aqui o que aconteceu.

  7. #7

    Padrão

    Código :
    /etc/init.d# dpkg -P apache2
    dpkg - warning: ignoring request to remove apache2 which isn't installed.
     
     
    /etc/init.d# dpkg -L |grep apache
    dpkg-query: --listfiles needs at least one package name argument
     
    Use --help for help about querying packages;
    Use --licence for copyright licence and lack of warranty (GNU GPL).

    E outra coisa, eu removi ele do etc/init.d, tenho que dar jeito de descobrir como fazer ele dar auto-start denovo também, pois acho que pelo apt-get install apache2, ele até esteja instalando, só nao to conseguindo dar start nele por que deletei do etc/init.d, alguém sabe como coloca ele denovo lá? Um abraço e desculpe o encomodo!

  8. #8

    Padrão

    Tu tá misturando release no seu /etc/apt/sources.list???

    Para criar os scripts novamente, remova (Se não estiver instalado, reinstale) - e remova com:

    Código :
    # apt-get remove --purge $pacote

    E instale novamente.

    Abraços!

  9. #9

    Padrão

    Removendo ele:
    Código :
    /# apt-get remove --purge apache2
    Reading Package Lists... Done
    Building Dependency Tree... Done
    The following packages will be REMOVED:
      apache2*
    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
    Need to get 0B of archives.
    After unpacking 81.9kB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ... 16590 files and directories currently installed.)
    Removing apache2 ...

    Instalando:
    Código :
    /# apt-get install apache2
    Reading Package Lists... Done
    Building Dependency Tree... Done
    Note, selecting apache2-mpm-worker instead of apache2
    apache2-mpm-worker is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    Olha, ele nao instala. não cria o etc/init.d/apache2, não faz nada! Acho que remover nao é mais o porblema, agora é instalá-lo!

  10. #10

    Padrão

    Tenta remover também o apache2-mpm-worker

    Eu tinha escrito o comando errado, correto é com 'l' em minúsculo,

    dpkg -l |grep apache

    xstefanox, o comando dpkg -P faz o mesmo que o apt-get remove --purge

  11. #11

    Padrão

    Código :
    /# dpkg -l |grep apache2
    ii  apache2-common 2.0.54-5sarge1 next generation, scalable, extendable web se
    pi  apache2-mpm-wo 2.0.54-5sarge1 high speed threaded model for Apache2
    ii  apache2-utils  2.0.54-5sarge1 utility programs for webservers
    rc  apache2.2-comm 2.2.3-3.3      Next generation, scalable, extendable web se
    rc  libapache2-mod 5.2.1-0.dotdeb server-side, HTML-embedded scripting languag

    Neste caso eu teria que remover todas estas dependencias?

  12. #12

    Padrão

    Melhor prevenir que remediar...Faz ai e posta o resultado.

  13. #13

    Padrão

    Galera no fim o apache2 estava dando muito problema, e eu resolvi colocar um apache 1.X, problema resolvido, agradeço a todos os amigos que pelo menos leram o tópico e tentaram me ajudar.