简体   繁体   English

我如何在CentOS 6.5上创建一个可以使用最新的shell,diff,vim等的环境?

[英]How do I make an environment on CentOS 6.5 where I can use the latest shell, diff, vim, etc.?

I ssh to a CentOS 6.5 system, where I have root privileges. 我使用CentOS 6.5系统,并具有root特权。

I know that CentOS is intentionally limited to very old versions of the kernel and the commands so that software running on it, especially server software, is very reliable. 我知道CentOS特意限于非常旧的内核版本和命令,因此在它上面运行的软件(尤其是服务器软件)非常可靠。 I don't want to interfere with any of that. 我不想干涉任何一个。

But while I'm logged in as myself, I want all the commands I use to be the latest versions that can possibly run on this version of CentOS. 但是,当我以自己的身份登录时,我希望我使用的所有命令都是可以在此CentOS版本上运行的最新版本。

To that end I want to make a folder tree called /latest that has its own bin, etc, lib, and so on, so that with my PATH and ld environment variables set to point into this tree, I can run the latest versions of coreutils and other software. 为此,我想制作一个名为/ latest的文件夹树,该树具有自己的bin等,lib,依此类推,以便将我的PATH和ld环境变量设置为指向该树,我可以运行最新版本的coreutils和其他软件。 Especially, I want to be able to use yum to keep the tree up to date (without touching the CentOS versions of anything). 特别是,我希望能够使用yum来使树保持最新状态(而不涉及任何CentOS版本)。 More or less like this: 或多或少像这样:

PATH=/latest/bin:/bin:/usr/bin
yum update
yum install zsh

It seems to me that it must be possible to make a script that would set up a /latest folder like this so that yum can take it from there, but I can't find anything like that anywhere. 在我看来,必须有一个脚本可以像这样建立一个/ latest文件夹,以便yum可以从那里获取它,但是我在任何地方都找不到这样的东西。

What sort of rabbit hole might this approach lead to? 这种方法会导致什么样的兔子洞?

You could install a recent Linux distribution in a chroot -ed environment (perhaps using schroot if it exists). 您可以在基于chroot环境中安装最新的Linux发行版(如果存在,则可能使用schroot )。

You could also compile recent versions of software from their source code. 您也可以从其源代码中编译软件的最新版本。 You probably want to have a directory $HOME/soft/ then 您可能想要一个目录$HOME/soft/然后

 configure --prefix=$HOME/soft

You might consider ugrading the distribution on your server (if you have the appropriate permissions from the machine owner). 您可以考虑升级服务器上的发行版(如果您具有计算机所有者的适当权限)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM