Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 05-04-2016, 12:21 PM   #1
Registered: Jan 2008
Posts: 111

Rep: Reputation: 0
Question CentOS6 to CentOS7 - How To?

My brother had to go out of town, so he left me with this situation and I need your help.

Rather than have many machines we have 4 large ones that we make multi-function.

One of the things we were doing sine CentOS5 was to place this bash script we wrote that did certain things based on your userid (i.e. we installed several versions of Sun Java and depending on what your userid is got get a different version). This meant we didn't have to modify every individual userid resource script.

Our issue is that in CentOS 7 there is no /etc/profile.d directory.

Where did it go? Can I define it and things work like they used to? IS there a new way to do this in CentOS 7 and if so where can I find the explanation?

Old 05-04-2016, 01:25 PM   #2
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: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
/etc/profile.d itself is added by the package named "setup".

The contents of /etc/profile.d are added by various packages.

On your CENTOS6 you can run "rpm -qf /etc/profile.d" to determine the former.

You can then run "rpm -qf /etc/profile.d/*" to see which packages are adding other contents.

CentOS is a binary compile of RHEL7 source. Since I still have this on RHEL7 you ought to have it on CentOS7:

On my RHEL7 installation I still see /etc/profile.d and files in it such as:
-rw-r--r--. 1 root root 771 Sep 16 2015 256term.csh
-rw-r--r--. 1 root root 841 Sep 16 2015
-rw-r--r--. 1 root root 1298 Oct 30 2015
-rw-r--r--. 1 root root 660 Nov 25 2013
-rw-r--r--. 1 root root 196 Apr 29 2015 colorgrep.csh
-rw-r--r--. 1 root root 201 Apr 29 2015
-rw-r--r--. 1 root root 1741 Nov 25 10:50 colorls.csh
-rw-r--r--. 1 root root 1609 Nov 25 10:50
-rw-r--r--. 1 root root 607 Nov 14 2014 kde.csh
-rw-r--r--. 1 root root 692 Nov 14 2014
-rw-r--r--. 1 root root 1706 Sep 16 2015 lang.csh
-rw-r--r--. 1 root root 2703 Sep 16 2015
-rw-r--r--. 1 root root 123 May 25 2015 less.csh
-rw-r--r--. 1 root root 121 May 25 2015
-rw-r--r--. 1 root root 1157 Sep 14 2015
-rw-r--r--. 1 root root 313 Jun 29 2012 qt-graphicssystem.csh
-rw-r--r--. 1 root root 379 Jun 13 2012
-rw-r--r--. 1 root root 105 Jan 30 2014 vim.csh
-rw-r--r--. 1 root root 269 Jan 30 2014
-rw-r--r--. 1 root root 1940 Jul 1 2015
-rw-r--r--. 1 root root 164 Jan 27 2014 which2.csh
-rw-r--r--. 1 root root 169 Jan 27 2014

On running "rpm -qf /etc/profile.d/*" I see the various packages that have installed files there:

To see which package installed which of those files you could run the "rpm -qf" on the specific file.

Of course you could manually create the directory with "mkdir /etc/profile.d" then create whatever files you want.
Old 05-04-2016, 07:48 PM   #3
Registered: Jan 2008
Posts: 111

Original Poster
Rep: Reputation: 0
You are correct! I think we had a error when we did the initial install, and he never rechecked when we reinstalled CentOS7

Thank You


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
[SOLVED] CentOS6 to CentOS7 Ethernet Definition Question etpoole60 Linux - Networking 8 05-04-2016 04:17 PM
Kickstart issue in centos7 sakshi123 CentOS 2 03-02-2016 01:02 PM
How to install Centos7 manh12a3 Linux - Desktop 3 12-10-2015 01:29 AM
[SOLVED] VodafoneK4203 ( Huawei) on Centos7 jvermeulen Linux - Hardware 4 05-20-2015 02:37 AM > Forums > Linux Forums > Linux - Software

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

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