LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-13-2009, 09:37 PM   #1
jerel4565
Member
 
Registered: Jun 2009
Distribution: Red Hat/ Centos
Posts: 33

Rep: Reputation: 16
Creating rpm to run specify commands


Hello All,

I have 50 plus servers to install software on and was wondering if I could just create an rpm and push it to all of the servers. The commands that I have to run to install the software are:


tar xfz NetBackup_6.5_CLIENTS2.tar.gz
cd NB_65_CLIENTS2_20070723/
yum -y install xinetd
./install
service xinetd start
service nbclient start

I was going to create a script but there are security issues that prevent me from login into most of the machines that I am unable to change. I have a satellite server that can push the rpms though.

Thanks in advance for any suggestions.
 
Old 11-14-2009, 04:17 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
I wouldn't say this is a best practice but sure it is possible. Could you expand on the "security issues that prevent me from login into most of the machines" part? Maybe there's an opportunity for addressing the cause instead of symptoms...
 
Old 11-14-2009, 08:33 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
Just a side note: You should probably make sure your script deletes the installation archive after installing, to free up disk space.
 
Old 11-14-2009, 10:00 AM   #4
jerel4565
Member
 
Registered: Jun 2009
Distribution: Red Hat/ Centos
Posts: 33

Original Poster
Rep: Reputation: 16
The security policies were set by previous administrators and I have to wait till the end of the month to change them.
But here is my sample spec file, let me know what you all think.

Code:
Summary: Installs NetBackup Client.
Name: NetbackupClient
Version: 6.5
Release: 1
Group: System Environment/Base
Requires: xinetd
Source: http://ip/pub/NetBackup_6.5_CLIENTS2.tar.gz
Prefix: /usr/openv
Vender: Symantec
Packager: me
BuildRoot: /tmp/%{name}-buildroot

%description
This rpm will install the NetBackup Client software.

%prep
%setup -q

%build

%install
./install

%clean
rm -rf $RPM_BUILD_ROOT

%post
service xinetd start
service nbclient start

%files
/usr/openv/
 
Old 11-15-2009, 07:13 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
Having a discussion in two places is unnecessary and inefficient, so please don't. Let's continue the .spec discussion solely at http://www.linuxquestions.org/questi...-fails-769159/.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a script that will log into root and enter password and then run commands. tananthulus Linux - Newbie 8 11-02-2009 06:37 PM
Creating an RPM that installs in a directory made by another RPM erinfin Linux - Software 4 11-15-2007 06:10 PM
Creating a script to run two commands anjaan Programming 11 06-15-2004 03:51 AM
creating my own commands Veteq Programming 3 06-06-2004 03:38 PM
Creating Batch Commands? reefadt Linux - Newbie 3 08-17-2003 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration