OpenVZ Forum


Home » General » Support » yum command not found within openvz container
yum command not found within openvz container [message #49171] Fri, 05 April 2013 11:18 Go to next message
ChaiVz is currently offline  ChaiVz
Messages: 8
Registered: January 2013
Junior Member
I need to install LAMP stack(except L)on my OpenVZ container.However within the container yum command isn't found.So can I have it installed within the host instead.In that will a website hosted on it be accessible from within the container?
Re: yum command not found within openvz container [message #49173 is a reply to message #49171] Fri, 05 April 2013 18:14 Go to previous messageGo to next message
darinpeterson is currently offline  darinpeterson
Messages: 3
Registered: April 2013
Location: USA
Junior Member
Hi,

If you installed the base template from the hardware node, you would have done something like this:

vzctl create 101 --ostemplate my-template-name --config basic


If in fact you did that with a template from the precreated templates, I believe you would find that yum works as expected.

Running an OpenVZ container within an OpenVZ container doesn't sound like a good idea to me, but I'm no expert.

I hope this helps...

Darin
Re: yum command not found within openvz container [message #49195 is a reply to message #49173] Mon, 08 April 2013 02:15 Go to previous messageGo to next message
ChaiVz is currently offline  ChaiVz
Messages: 8
Registered: January 2013
Junior Member
Hi,

Thanks for the reply .Yes, i did exactly that.But within the container it still says bash:'yum command not found'.Looks like this will prevent me from installing anything within the container.
I don't intend to install a container within a container, but a web server within the container which needs a command like-'yum install httpd -y'.

[Updated on: Mon, 08 April 2013 02:20]

Report message to a moderator

Re: yum command not found within openvz container [message #49200 is a reply to message #49171] Mon, 08 April 2013 11:32 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
Post the exact command you used to create a container, so we can see which template you've used...

Please also post the output of the following commands, from within the container:
ls -als /usr/bin/yum
cat /etc/redhat-release


Re: yum command not found within openvz container [message #49207 is a reply to message #49200] Tue, 09 April 2013 02:04 Go to previous messageGo to next message
ChaiVz is currently offline  ChaiVz
Messages: 8
Registered: January 2013
Junior Member
Hello

The command that I used to create the container is -


'vzctl create 101 --ostemplate ubuntu-12.04-x86.tar.gz --config basic'

The output of command 'ls -als /usr/bin/yum
ls:cannot access /usr/bin/yum :No such file or directory found

cat /etc/redhat-release
cat:/etc/redhat/release :No such file or directory found

Thank you
Re: yum command not found within openvz container [message #49215 is a reply to message #49171] Tue, 09 April 2013 22:25 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
You created a contaner with Ubuntu linux. Ubuntu is based on Debian and uses deb packages, not rpms. Yum doesn't exist on Ubuntu systems, use apt.

I suggest starting with a how-to or a book about basic Ubuntu commands... Or create a CentOS 6 or Scientific Linux 6 container instead, if you're more familliar with yum and Red Hat based OS'es in general. Good luck!
Re: yum command not found within openvz container [message #49220 is a reply to message #49215] Wed, 10 April 2013 11:37 Go to previous message
ChaiVz is currently offline  ChaiVz
Messages: 8
Registered: January 2013
Junior Member
Ah,so that was the problem.I wasn't aware of these differences. Thanks a lot.
Previous Topic: NFSV4 client and CT OpenVZ
Next Topic: Caching nameserver
Goto Forum:
  


Current Time: Sat Sep 28 21:18:00 GMT 2024

Total time taken to generate the page: 0.04203 seconds