Find the answer to your Linux question:
Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By elija
.... in CentOS? I was trying to install Apache, it threw a big list of "requires this and this and this etc", so - how do I do it automatically? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Mar 2013
    Posts
    364

    How do I install a package and all its dependencies AUTOMATICALLY


    .... in CentOS?

    I was trying to install Apache, it threw a big list of "requires this and this and this etc", so - how do I do it automatically? I don't want to obviously type rpm -ivh <all of them> by hand...!!


    Thanks

  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,601
    As root run yum install httpd and answer yes when it lists the dependencies.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  3. #3
    Linux User
    Join Date
    Mar 2013
    Posts
    364
    How do I get yum to install httpd from the DVD, and NOT look on the net?

  4. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,601
    First, edit the file /etc/yum.repos.d/CentOS-Media.repo and change the line that says enabled=0 to enabled=1 and then yum --disablerepo=\* --enablerepo=c6-media install httpd

    What this does is enable the DVD as a repository and and then force yum to use it.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  5. #5
    Linux User
    Join Date
    Mar 2013
    Posts
    364
    Thanks so much elija

    I will try it.
    In the meantime...... what's the difference between rpm -ivh and yum install?

  6. #6
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,601
    Can't put it better than this...
    drl likes this.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  7. #7
    Linux User
    Join Date
    Mar 2013
    Posts
    364
    thanks elija

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •