Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to install packages automatically by running a script

I can write

 yum install php

but I want it to install another package once installation of the php package is completed

Is there any solution to make it automatic?

I have around 20packages which are to be downloaded from remi repository

share|improve this question

migrated from Aug 27 '12 at 9:10

This question came from our site for professional and enthusiast programmers.

You mean yum doesn't accept yum install <package> <package> <package>? – mkaito Aug 27 '12 at 13:04
up vote 2 down vote accepted

Write your script named as:

yum -y install php
yum -y install <another_package>
yum -y install <yet_another_package>

Then run it $ bash

share|improve this answer
it wont be done automatic, because it will prompt for Yes/No and user has to type in Y inorder to continue, Is there a way to do it automatic without need of user – meWantToLearn Aug 27 '12 at 6:51
@meWantToLearn in that case use -y option, see the updated answer – Rohan Aug 27 '12 at 6:57
Thanks for your reply :) – meWantToLearn Aug 27 '12 at 6:59

You must log in to answer this question.