Python 2.7 installation on centos 5 without distrurbing yum

Issues related to software problems.
r_hartman
Posts: 711
Joined: 2009/03/23 15:08:11
Location: Netherlands
Contact:

Re: Python 2.7 installation on centos 5 without distrurbing yum

Post by r_hartman » 2012/01/24 09:34:35

[quote]
sturdyworks wrote:
You really need to get a clue. [ ... ] You ned to edulate yourself.[/quote]
Tough talk, wow. However, I'd say [b]you[/b] are the one this applies to.

Have you ever considered the basic difference between package-managed and non-package-managed distributions?
As soon as you move away from the basics and start doing source installs, it is you who will be responsible for maintaining the software, updating when security fixes are being released, recompiling affected packages, etc. Not to mention being on your own for support. Not doing source installs is not just about not 'touching' the core distro. If you [b]must[/b] install stuff that's not available in a package you should either move to a distro that has the required package, or use a source rpm to create your own package, to be installed through yum.

Anything you install outside of the package management system is invisible to that system, and thus prone to being forgotten and becoming stability and/or security risks. The prime reason for using a package managed distro is to ensure the system can be easily and safely maintained, with minimal stability risks, as all packages are kept current with discovered exploits and already have been tested to work without issues on the vast majority of installed systems.

If the OP really, really needs python 2.7, the best advice has already been given: pick a Fedora version that has it natively. If whatever he wants to develop depends on stuff in 2.7, he won't be able to distribute it to CentOS based systems anyway. If CentOS/RHEL is the target platform, he should really reconsider [i]why[/i] 2.7 is so important to him and possibly re-evaluate 'need-to-haves' versus 'nice-to-haves'.

EDIT: Looks like I should've [url=https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=35354&forum=38]saved my breath[/url] here. What a clown.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Python 2.7 installation on centos 5 without distrurbing yum

Post by pschaff » 2012/01/24 18:34:17

Thanks for the very nice essay on the philosophy of using packages, and the nature of EL, anyway. I'm sure future readers, and hopefully the OP, will benefit from it. :-)

sturdyworks
Posts: 22
Joined: 2011/06/12 23:35:19
Location: Orange County, CA area
Contact:

Re: Python 2.7 installation on centos 5 without distrurbing yum

Post by sturdyworks » 2012/01/24 23:23:04

@r_hartman "you who will be responsible for maintaining the software, updating when security fixes are being released, recompiling affected packages, etc. Not to mention being on your own for support"

I am ware of this. I suppose I should precede every statement with "I am a software engineer", that just what I do.

@r_hartman "Anything you install outside of the package management system is invisible to that system"

I think that software engineers who use latest Python, openssl, zlib, libxml2, Eclipse, emacs, etc., ect. (all the basics really) do everything they can to avoid letting CentOS know they even exist.

Here is an ls of my /opt
bzip2-1.0.6 firefox4.0 gdbm-1.10 libxml2-2.7.8 openssl-1.0.0 python2.7.2 sqlite3.7.9 zlib-1.2.5
firefox9.0 libjpeg-8c libxslt-1.1.26 python2.6.2 readline6.2 tiff-4.0.0
And I have to add more, quickly...

Do you any idea what would happen if I installed any these in /usr/local yet alone /usr, well I do, bzip, readline would be fine that's why I am considering hacking the 6.2 src.rpm for older versions to let CentOS know about them. But this a HUGE risk. Creating an RPM that overrites any thing /usr/local or /usr is a HUGE risk. I think the Python6.2 RPM must just do an make altinstall like I suggested.

Here is an ldd of my Python 2.7.2

$ ldd /opt/python2.7.2/bin/python
/opt/python2.7.2/bin/python: /lib/libz.so.1: no version information available (required by /opt/python2.7.2/lib/libpython2.7.so.1.0)
linux-gate.so.1 => (0x0035b000)
libpython2.7.so.1.0 => /opt/python2.7.2/lib/libpython2.7.so.1.0 (0x00ad6000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00977000)
libdl.so.2 => /lib/libdl.so.2 (0x00945000)
libutil.so.1 => /lib/libutil.so.1 (0x007bf000)
libssl.so.1.0.0 /opt/openssl-1.0.0/lib/libssl.0 (0x007c6000)
libcrypto.so.1.0.0 => /opt/openssl-1.0.0/lib/libcrtpyo.0 (0x008c8000)
libreadline.so.6 => /opt/readline6.2/lib/libreadline.so.6 (0x00fc0000)
libtermcap.so.2 => /lib/libtermcap.so.2 (0x0526b000)
libz.so.1 => /opt/zlib-1.2.5/lib/libz.so.1 (0x00992000)
libm.so.6 => /lib/libm.so.6 (0x0094c000)
libc.so.6 => /lib/libc.so.6 (0x007ea000)
/lib/ld-linux.so.2 (0x007c6000)
libgdbm.so.4 => /opt/gdbm-1.10/lib/libgddm.1 (0x007c6000)

There's alot of /opts in there, and each is compiled with -pthreads to work effectively with the Apache MPM worker and optimized for size.

Why use latest gdmb, not because the CentOS version is from the early 70s, but because I never intent to touch CentOS with it, or the precious RPM DB or something.

My /opt/python2.7.2/lib/python2.7/site-packages contain the stuff my dreams are made of

The CentOS /usr/lib/python2.4/site-packages contains stuff like audit, dbus, mod_python (ack!), rpmUtils, semanage -- good for sysadmin but not for web application development.

CentOS is terrified of me doing something like 'python2.4 easy_install SQObject' so I just do 'python2.7 easy_install SQObject' and it won't panic and reboot.

It is easy for me to 'ls opt' and 'ls site-packages' to see what I've got and I can actually link things with RPATH in much more interesting ways than yum.

When someone asks me how to install Python 2.7.2 on CentOS I don't assume they are a tinkerer, or that they should really use Fedora. I assume they have a GoDaddy VPS or some legacy server running a bunch of stuff and need to setup their own little virtual environment. There are lots of ways to do that.

This is not bleeding edge stuff, it is basic software engineering. Don't be scared!

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Python 2.7 installation on centos 5 without distrurbing yum

Post by pschaff » 2012/01/24 23:38:36

Software engineering and system administration are distinct disciplines. If nobody else has to depend on your system, then hacking it any way you please is certainly your privilege. In fact, even if others use the system it is still your privilege, but the impact and consequences to yourself and other users may differ.

Similarly, if you are developing solely for your own use, then whatever works for you is good. If developing for ELx and derivatives, then sticking to ELx tools is highly advisable.

[url=http://photo.frostnet.net/chris/photos/2000_2001/imgc_20132b.jpeg.small.html]I Are An Engineer[/url] too. :-)

Edit: Enough with the thread hijacking.

Post Reply