LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rpm & yum (https://www.linuxquestions.org/questions/linux-newbie-8/rpm-and-yum-4175446767/)

1300 01-22-2013 11:56 AM

rpm & yum
 
hey,,

I have a redhat satellite server and I needed to install mysql, php and httpd
so I obviously used "#yum install ...." to do the job, which will install the packages in the default location!

but what came up is that I have to install them in separate folders so I can give the ownership of it to the developer to do all his work by him self,

So I have to remove the packages again using yum and I have to write down all packages used in dependency so I can copy them manually from the satellite and install it one by one using "rpm -ivh <package name> <folder name>" (they are 4 packages in total)

got to get them by "#yum list ... then #rpm -qa ..."
1- mysql-5.1.66-2.el6_3.x86_64
2- mysql-server-5.1.66-2.el6_3.x86_64

3- php-5.3.3-14.el6_3.x86_64

4- httpd-2.2.15-15.el6_2.1.x86_64

CONFUSION:
-couldn't find the package in the satellite, i was using "#find / -name <package name>"
-how can i make sure that the above package name are the only one needed and I wont screw any thing else
-am I doing right ?

btmiller 01-22-2013 12:10 PM

This sounds like a rather strange way of doing things. Normally, you'd install the packages as normal and then give the developer whatever access rights he needs to perform his work. That is, you'd give his account the ability to write into the web server root directory and, if necessary, the ability to edit the Apache and PHP configuration files and restart the server. Giving him the ability to create and edit files can be done by setting group ownership and permissions appropriately (e.g. create a "devel" group, put the developer into it, and make the web root, config files, etc. editable by memebers of that group). You can use sudo to give the developer the ability to restart the server.

In general, development should be done on a separate machine (physical or virtual) from any system running production services (not sure if your satellite server is serving packages to other systems). This system should be inaccessible to the public via firewall rules. Developed code should be tested/QA'd and then moved to a separate production server.

TB0ne 01-22-2013 12:16 PM

Quote:

Originally Posted by 1300 (Post 4875557)
hey,,
I have a redhat satellite server and I needed to install mysql, php and httpd so I obviously used "#yum install ...." to do the job, which will install the packages in the default location!

but what came up is that I have to install them in separate folders so I can give the ownership of it to the developer to do all his work by him self,

No, you don't. Create a database in MySQL, and give that developer rights to it. Create one directory in the web document root and give him read/write access to it, or even make a symbolic link to a directory in his own home directory.
Quote:

So I have to remove the packages again using yum and I have to write down all packages used in dependency so I can copy them manually from the satellite and install it one by one using "rpm -ivh <package name> <folder name>" (they are 4 packages in total)

got to get them by "#yum list ... then #rpm -qa ..."
1- mysql-5.1.66-2.el6_3.x86_64
2- mysql-server-5.1.66-2.el6_3.x86_64
3- php-5.3.3-14.el6_3.x86_64
4- httpd-2.2.15-15.el6_2.1.x86_64
So why install them with RPM, since you'll then have to satisfy dependencies manually?? And did you read the man pages on both the yum and rpm commands?? Pay particular attention to the "--prefix" and "--relocate" options.
Quote:

CONFUSION:
-couldn't find the package in the satellite, i was using "#find / -name <package name>"
The package names as listed in a database aren't the same thing as a file name.
Quote:

-how can i make sure that the above package name are the only one needed and I wont screw any thing else
You don't mess with the default paths on packages that you install, that's how.
Quote:

-am I doing right ?
Nope....use sudo, group rights, and database grant commands to give users what they need. Also, if you have a Red Hat satellite server, you're obviously under Red Hat support. They can assist you with things, and you are also paying for access to their knowledgebase, too. Have you tried them for help?

1300 01-22-2013 10:59 PM

Quote:

Originally Posted by btmiller (Post 4875568)
This sounds like a rather strange way of doing things. Normally, you'd install the packages as normal and then give the developer whatever access rights he needs to perform his work. That is, you'd give his account the ability to write into the web server root directory and, if necessary, the ability to edit the Apache and PHP configuration files and restart the server. Giving him the ability to create and edit files can be done by setting group ownership and permissions appropriately (e.g. create a "devel" group, put the developer into it, and make the web root, config files, etc. editable by memebers of that group). You can use sudo to give the developer the ability to restart the server.

In general, development should be done on a separate machine (physical or virtual) from any system running production services (not sure if your satellite server is serving packages to other systems). This system should be inaccessible to the public via firewall rules. Developed code should be tested/QA'd and then moved to a separate production server.

thanks chap for you response,,

I might missed explaining the situation well,,

this is a developing server, and we are currently in the level of building it for them,, and the vendor brought by them is asking to install what I mentioned in my first post

and the idea is to create a separate folder for each to make them able to create the database them selves and configure them httpd as they wish because they will be fully responsible about them apps. i don't know how would i adjust that!

1300 01-22-2013 11:16 PM

Quote:

Originally Posted by TB0ne (Post 4875572)
No, you don't. Create a database in MySQL, and give that developer rights to it. Create one directory in the web document root and give him read/write access to it, or even make a symbolic link to a directory in his own home directory.

thanks TB0ne for your response,,
please read my previous answer to btmiller

Quote:

Originally Posted by TB0ne (Post 4875572)
So why install them with RPM, since you'll then have to satisfy dependencies manually?? And did you read the man pages on both the yum and rpm commands?? Pay particular attention to the "--prefix" and "--relocate" options.

yeah,, sorry I missed to write "--prefix="

Quote:

Originally Posted by TB0ne (Post 4875572)
The package names as listed in a database aren't the same thing as a file name.

OK then,, what is the right way ?

Quote:

Originally Posted by TB0ne (Post 4875572)
You don't mess with the default paths on packages that you install, that's how.

Agree

Quote:

Originally Posted by TB0ne (Post 4875572)
Nope....use sudo, group rights, and database grant commands to give users what they need. Also, if you have a Red Hat satellite server, you're obviously under Red Hat support. They can assist you with things, and you are also paying for access to their knowledgebase, too. Have you tried them for help?

redhat support will waste too much time in responding back for a development server and they are rather annoying and demanding,, exactly like what you are doing now, talking in details that don't matter :P

here I am meeting much more opinions and experiences as of yours :)

TB0ne 01-23-2013 08:48 AM

Quote:

Originally Posted by 1300 (Post 4875870)
thanks TB0ne for your response,,
please read my previous answer to btmiller

Ok, so if it's a development server, why does it matter where things go, since the purpose of a development server is for testing and development. Let the developers have rights to what they need...it's not production. And, if they develop programs/pages for use in non-standard locations, it's only going to make things harder to migrate to a production server later. And you didn't bother mentioning the fact that this was a new development-only server when you asked your question, which puts a whole different light on things.
Quote:

yeah,, sorry I missed to write "--prefix="
Reading the man pages should be the first thing you do.
Quote:

OK then,, what is the right way ?
Did you not read post #3, where I told you??? "Nope....use sudo, group rights, and database grant commands to give users what they need. " If you don't understand those terms, then ask specific questions about them, or look them up.
Quote:

redhat support will waste too much time in responding back for a development server and they are rather annoying and demanding,, exactly like what you are doing now, talking in details that don't matter :P

here I am meeting much more opinions and experiences as of yours :)
If you want help with Red Hat systems and your PAYING for it, you should use it. Otherwise, pay attention...your question was answered, and instead of even saying "thanks", you respond with insults.

Want a better answer? Call Red Hat, or get someone else at your company who knows more to help you.

1300 01-23-2013 09:43 AM

Quote:

Originally Posted by TB0ne (Post 4876126)
Ok, so if it's a development server, why does it matter where things go, since the purpose of a development server is for testing and development. Let the developers have rights to what they need...it's not production. And you didn't bother mentioning the fact that this was a new development-only server when you asked your question, which puts a whole different light on things.

Reading the man pages should be the first thing you do.

Did you not read post #3, where I told you??? "Nope....use sudo, group rights, and database grant commands to give users what they need. " If you don't understand those terms, then ask specific questions about them, or look them up.

If you want help with Red Hat systems and your PAYING for it, you should use it. Otherwise, pay attention...your question was answered, and instead of even saying "thanks", you respond with insults.

Want a better answer? Call Red Hat, or get someone else at your company who knows more to help you.

i didnt insult you, it was a joke and I added a stupid tonque for you to get it, but u seems like insisting to waste time in unnecessary matters :/

but anyways,, I found alternatives

mysql + php + httpd is not relocatable by using rpm or yum
but I found a solution searching around

mysql and PHP will be installed normally by yum again and I have created a filesystem to be used as a database and gaved them "mysql" ID to do them work

and as of httpd,,
you can change the source file for httpd from /var/www/html to any location you want by changing the "DocumentRoot" to direct to the demanded folder which have the ownership of the developer

and added a sudo privilege to only stop and start the concerned services

job done :)

NOTE: am not the one who payed to redhat for the support, my employer did so. and I will still wont have the well to call them

1300 01-23-2013 09:53 AM

by the way

you can also search by the package name and the version

+example:
"#find / -name httpd-2.2.15-15*" <<<< you will find it in this way

as the full name is having extra info which will interrupt your search process

+example of the full name displayed by "#rpm -qa ..."
httpd-2.2.15-15.el6_2.1.x86_64

TB0ne 01-23-2013 09:53 AM

Quote:

Originally Posted by 1300 (Post 4876164)
i didnt insult you, it was a joke and I added a stupid tonque for you to get it, but u seems like insisting to waste time in unnecessary matters :/

Yes, you did insult me. The "unnecessary matters" were you going out of your way to do it, and ignoring the advice you were given.
Quote:

but anyways,, I found alternatives
So the 'alternatives" you found, was doing what I suggested to you??
Quote:

mysql + php + httpd is not relocatable by using rpm or yum but I found a solution searching around

mysql and PHP will be installed normally by yum again and I have created a filesystem to be used as a database and gaved them "mysql" ID to do them work
This is the "database grant" advice I gave you in post #3, which gives user(s) admin rights to a MySQL database, without giving them admin rights to the WHOLE database and/or system. PHP doesn't need any special rights, since its executed by the webserver, and can be run by any 'regular' user at the command line.
Quote:

and as of httpd,,
you can change the source file for httpd from /var/www/html to any location you want by changing the "DocumentRoot" to direct to the demanded folder which have the ownership of the developer
Right...this is again what I gave you in post #3: "Create one directory in the web document root and give him read/write access to it, or even make a symbolic link to a directory in his own home directory. "
Quote:

and added a sudo privilege to only stop and start the concerned services job done :)
Again, I told you about sudo in post #3: "use sudo, group rights, and database grant commands to give users what they need"
Quote:

NOTE: am not the one who payed to redhat for the support, my employer did so. and I will still wont have the well to call them
If your employer pays for support, they pay for support for the WHOLE COMPANY, and all its servers. Call them or not, that's up to you...you're paying for it regardless.

unSpawn 01-23-2013 10:02 AM

Please cut it out both of you and focus on the technological issue at hand,
TIA.

1300 01-23-2013 10:05 AM

Quote:

Originally Posted by unSpawn (Post 4876172)
Please cut it out both of you and focus on the technological issue at hand,
TIA.

thanks mate,, I was just writing the below post

"as I already mentioned,, am gaining alot just in talking to you people,, but I think I came up to ur nerves and I would like to apologize for that TB0ne,, sorry chap :) "


All times are GMT -5. The time now is 08:12 PM.