Linux - NewbieThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do I know if my installation is using the rpm or source code files? I upgraded my ssh using source code, which you manually compile the code (make, make install). I notice one change, the configuration file is now located in /usr/local/etc & sbin & etc. The original ssh is rpm located /etc/ssh.
My question; Is my ssh using the new version or still using the old rpm version? How do I verify?
If you just used the default ./configure without passing --prefix=/usr to it then it defaulted to install in /usr/local instead of /usr. If /usr/local/bin is not in your PATH$ then you're most likely still calling the old version. Try starting it from the command line with --version after it. Most programs recognize this and will output the version and exit. Hope that helps.
How do you know where should you place the ssh files /usr/ or default? Yes /usr/local/bin is already in my PATH. Where do I type the command --version? What is the whole command?
I was just looking at mine and I guess it doesn't recognize --version (grumble grumble) so that way won't work. if you rpm -e openssh (in a terminal, as root) it will remove the rpm of the old version, leaving you with the newer version which you installed from source. Since /usr/local is in your PATH$ then it will be found/used.
Generally, if you're upgrading something that was originally an rpm and now you're building it from source the best way to do it is to remove the rpm package first.
Something you may want to look into if you're going to build from source is a program called 'checkinstall.' http://asic-linux.com.mx/~izto/checkinstall/ it will create an .rpm (or a .deb or a .tgz) which can be installed/uninstalled (it's explained on their site) from the source code. Since I've found it I use it all the time. Quite a handy little tool.
As to whether you should put the ssh in /usr or /usr/local, as long as it's in your PATH$ and the lib directory (/usr/local/lib) is in /etc/ld.so.conf you're fine just using /usr/local. (if /usr/local/lib is not in /etc/ld.so.conf, add it (open it in a text editor as root), save it, then run (as root) ldconfig.)
Apart from that, the OpenSSH tarball does contain a spec file, which means you could do "rpm -tb openssh-3.71p2.tar.gz" and generate the binary rpm.
Use "-ta" to generate .rpm's and .src.rpm's.
dingding.....I downloaded the binary in RPM. I notice checkinstall file created on /usr/doc. I'm a little puzzle with the README instructions. Do we created a running scripts??
checkinstall 1.5.3, Copyright 2001 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
*** No known documentation files were found. The new package
*** won't include a documentation directory.
Installing with "openssl-0.9.6l.tar.gz"...
========================= Installation results ===========================
/var/tmp/phVVqRRHhZQTkCAdNPRD/installscript.sh: openssl-0.9.6l.tar.gz: command not found
tar zxvf openssl-0.9.6l.tar.gz
cd openssl-0.9.6l
./configure --prefix=/usr
make
su
(root password)
checkinstall
then it will ask a few things... it needs a description (you can just say openssl and hit enter twice or if you want to be more descriptive you can), you'll want to choose "R" for an RPM package. It will then give you a summary and you just hit Enter to continue.
Try to find out:
Binary linkage: running "ldd /usr/sbin/sshd |grep crypt" should show "libcrypt.so.1 => /lib/libcrypt.so.1". Linker cache: running "ldconfig -p|grep crypt" should show "libcrypt.so.1 => /lib/libcrypt.so.1". Stat or "file /lib/libcrypt.so.1" should show "/lib/libcrypt.so.1: symbolic link to libcrypt-(version).so"
If running "file" doesn't show the file, then you need to install it (part of Glibc AFAIK). If "ldconfig" doesnt show it but you have the file, then you need to run "ldconfig" to update the linker cache.
First, run updatedb as root then do
locate lybcrypto.so.1
It should have been installed as part of openssl. If it is found, make note of the location then:
1) as root, edit /etc/ld.so.conf
2) add the path to the directory containing lybcrypto.so.1
(for example, if locate tells you it's in /usr/local/lib/libcrypto.so.1 you would add /usr/local/lib)
3) save and exit
4) as root, run ldconfig
Last edited by dingding66; 12-19-2003 at 09:17 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.