LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2011, 08:53 AM   #1
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Rep: Reputation: 16
How to stop config files I deleted from getting re-added after a yum upgrade


There are some httpd config files in /etc/httpd/conf.d/ that I don't want, such as ssl.conf, so I rename it from ssl.conf to ssl.conf.bak so that it doesn't get read by httpd. But when I do a 'sudo yum upgrade httpd', the file comes back (which seems about right). So if renaming or deleting a file that I don't want doesn't keep it gone after an upgrade, is there any other way to ensure it stays gone, or will I simply have to remember to rename these files again every time I upgrade?
 
Old 11-03-2011, 09:19 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
It is the /etc/httpd/conf/httpd.conf file that tells Apache to use conf.d.

What you might want to do is create a new directory e.g. myconf.d to contain only the files you want from httpd.conf then modify the /etc/httpd/conf/httpd.conf to point to myhttpd.conf.d instead of httpd.conf.d. The relevant section in httpd.conf is:

Code:
#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf
 
1 members found this post helpful.
Old 11-03-2011, 09:28 AM   #3
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
That's a great idea, I'll certainly do that. Out of curiosity, let's say for other packages that aren't httpd and aren't as flexible as this is in their configuration, would there be a way to maybe 'exclude' certain files from the yum upgrade or mark them as deleted? Or would I simply have to remember to delete the files after doing a yum upgrade?
 
Old 11-03-2011, 01:29 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
I'm not aware of a way to do it with yum itself. It allows exclude of packages so you could exclude httpd entirely (see "man yum" and "man yum.conf") but not of files so far as I'm aware.

The files installed by yum are RPMs (RedHat Package Manager packages) and there is an exclude for files in rpm (I haven't used it but saw in "man rpm"). So one way to do it might be to download the htttpd package RPM from the repository then use rpm command to install it with the exclude option.
 
  


Reply



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
What about config Files during upgrade ? njb Slackware 2 11-14-2010 03:31 AM
are config files from uninstalled programs automatically deleted? newbiesforever Linux - General 2 05-09-2010 11:46 PM
added yum files rebooted and wont load gnome - OpenGL/Cairo/Yum pckg help UmmJiga Linux - Newbie 3 11-03-2009 11:12 AM
YUM: Repository already added, not adding again linmix Linux - Software 2 01-16-2005 11:39 AM
apache config files deleted!!! HELP! tris Linux - Software 2 10-11-2003 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05: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
Open Source Consulting | Domain Registration