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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-03-2011, 08:53 AM
|
#1
|
|
Member
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 248
Rep:
|
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?
|
|
|
|
11-03-2011, 09:19 AM
|
#2
|
|
Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,644
|
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.
|
11-03-2011, 09:28 AM
|
#3
|
|
Member
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 248
Original Poster
Rep:
|
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?
|
|
|
|
11-03-2011, 01:29 PM
|
#4
|
|
Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,644
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:40 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|