Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am on CentOS and have tried the following:

[root@XMPP tigase]# rpm -Uvh MySQL-server-5.5.15-1.linux2.6.x86_64.rpm
error: open of MySQL-server-5.5.15-1.linux2.6.x86_64.rpm failed: No such file or directory

SSH knocks people back to last century reminding me how flexible and unfriendly Linux can be.

How can I configure repos (in case they are not already)? How can I make RPM believe I would want it to upgrade from these repos?

share|improve this question
    
Every time someone misspells it "Lunix" I think of that article that said it was the work of Soviet spy Linyos Torovoltos. –  jcrawfordor Aug 10 '11 at 23:57
    
rofl had no idea, but I just like PUNs –  kellogs Aug 10 '11 at 23:58
1  
"...Lunix...(is a) version of an illegal hacker operation system, invented by a Soviet computer hacker named Linyos Torovoltos, before the Russians lost the Cold War. ... These programs are used by hackers to break into other people's computer systems to steal credit card numbers. They may also be used to break into people's stereos to steal their music, using the "mp3" program. Torovoltos is a notorious hacker, responsible for writing many hacker programs, such as "telnet", which is used by hackers to connect to machines on the internet without using a telephone." –  jcrawfordor Aug 11 '11 at 0:05
    
2  
you need to use your package management tool, then, not your package installation tool. I think this is yum on centOS. so you should issue something like $yum install mysql-server. No need to give the architecture and version, yum figures that out itself. –  jcrawfordor Aug 11 '11 at 0:22

1 Answer 1

up vote 1 down vote accepted

As mentioned in a comment, rpm is an package manager. yum, is also a package manager but it solves package dependencies for you, and uses rpm to actually install packages.

Both can be used to install software, but in case a package has a dependency (usually they do) rpm will abort if those packages are not included in the command line, where yum will automatically satisfy and install all dependencies for you.

yum requires you to configure at least one repository from where to fetch software, where rpm needs direct access to the package (either a downloaded .rpm or provided from ftp/http).

So, the answer. Check if there is any repo configured

ls /etc/yum.repos.d

If this returns files like *.repo, then something should already be there. If not, try:

# vim /etc/yum.repos.d/centos.repo

With the following contents (asuming you are running centos 6.0):

[centos]
name=centos
baseurl=http://mirror.centos.org/centos/6.0/os/x86_64
enabled=1
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/6.0/os/x86_64/RPM-GPG-KEY-CentOS-6

Then (if there were repos configured or you just did it), run:

# yum search mysql

This should connect to the configured repos, fetch the list of available packages matching the pattern mysql. Once you have identified the package name (should be mysql-server) just:

# yum install mysql-server

If you want to install/update software, use yum if you dont want to mess with dependency solving

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.