編譯在ESXi 5.1下可用的nano原網址失效,把內容轉貼過來備查

原網址:
http://www.kioptrix.com/blog/a-few-nice-esxi-5-5-binaries/

過程可以借鑑但是
一、按下面文章的介紹
https://damiendebin.net/blog/2013/12/06/esxi-5-dot-1-and-rsync/
rsync 3.0.9在ESXi下使用會有問題,最低得是3.1.0,上面網頁上有編譯好的rsync 3.1.0可下載
二、提供CentOS3和CentOS4的yum的源也失效了
http://mirror.hmc.edu/centos/

轉貼:
---------------------------------------------------------------------
A few nice ESXi 5.5 binaries
Category: IT, kioptrix, tutorials / Tags: no tag /	Add Comment
So it has been a while hasn’t it? I really do like having a blog, but life/work keeps getting in the way. It’s not from a lack of subject matter, it really is just about time. At the time of this writing, it’s November 30th so hoping to get this out there today.

It’s funny that my first post, in what seems like an eternity, won’t be security related. Still doesn’t mean I can’t share stuff, regardless if some find it interesting or not. It’s my blog damn it!
If I want to post pictures of cats into BDSM I shall!… ANYwho.

To start off, I really like virtual machines… The flavour I mostly use at home is VMware’s ESXi. Now before anyone gets all huffy, don’t worry I’ll be giving you more reasons to hate me. I choose VMware for a few reasons, mostly it’s what I’ve used in previous places of employment, and I also had hardware to run it. So I figured I’d learn it.

One thing any ESXi user has had to do at some point, is log into via ssh in the host…then the fun starts, file editing.
Personally, I prefer “nano” over “vi” why? Because I keep forgetting “vi” commands. As simple as that. Go ahead, hate me for it.

Going to the googles I figured someone’s bound to have uploaded a file.. or something. Apparently not. I even thought about it really really hard for 24 hours, and it didn’t appear on SourceForge nor Github. So I figured I’d try my hand at compiling “nano” for use on ESXi. Much like this guy here: rsync statically linked binary.
Mind you, I’m not a coder/dev type person. No gcc guru here, just a system admin. For many this would’ve been a walk in the park. Wasn’t so simple for me. Something new is always hard, it’s called trying\learning.

After much reading, trial & error I finally got a functioning “nano” text editor working on my ESXi 5.5 host. Hence the blog post of me whining, and me showing how I did it.

As per the above linked tutorial for “rsync”, you’ll need a few things in order to get this done.
Grocery list:

CentOS 3.9 ISO
nano source code from gnu.org
And this…
Please keep in mind the OS is rather old, and may contain vulnerable software by default. So minimal usage… no cats.

Following the post on Kickinass, we need to adjust the repositories in order to get our VM ready to compile.

# Lets point those repos to hmc.edu instead of centos.org At time of writing they still worked
[root@localhost root]# perl -pi -e “s/centos\.org/hmc.edu/g” /etc/yum.conf

# Next let’s remove GPG check (yeah I know)
[root@localhost root]# sed -i “s/gpgcheck\=1/gpgcheck\=0/g” /etc/yum.conf

# Install gcc & make etc.
[root@localhost root]# yum groupinstall ‘Development Tools’
pretty lines…

Next get nano’s source code, and transfer it over to your CentOS virtual machine. Extract it, and we’re at the half way mark!
[root@localhost nano-2.4.3]# ./configure
pretty lines…
[root@localhost nano-2.4.3]# make EXEEXT=”-static” CFLAGS=”-g -02 -Wall -static”
more pretty lines…
[root@localhost nano-2.4.3]# ls src/nano-static

There you have it, a statically linked binary of “nano” that will work on ESXi 5.5. Copy it over to your host, and you should be able to edit files without constantly screaming & swearing at your screen because you’re spending more time on Google finding “vi” commands and actual editing.

nano running on esxi

As I’m far from being the most knowledgable about this stuff, if anyone sees anything wrong, inaccurate pretty sure you can find me somehow. Just don’t expect much of a reply if you send an email to my @kioptrix.com address. Best find another place.

So just in case you don’t want, or just can’t, to go through all of this. I’ve made my CentOS VM available for download. Development tools installed, source code for nano a few others already compiled. You can use it to compile yourself a “nano”, or anything else you may need. If you don’t want to go through all the hassle, I’ve made a few of the binaries available for download here.

CentOS VM 652Megs
username: root
password: !!abc123
MD5 (CentOS-3.9.tar.gz) = 99d451b6da2d55630b7c8f5b6aaf46a6

–== Some pre-compiled tools that will work on ESXi 5.5 ==–

nano-static 2.4.3
MD5 (nano-static-2.4.3.tar.gz) = 16b1a3003d9d02a99d5385c986c94ed3
rsync-static 3.0.9
MD5 (rsync-static-3.0.9.tar.gz) = 69d2220fbcaddc0ff441c223400d0aa7
bash-static 2.05
MD5 (bash-static-2.05.tar.gz) = 7a6d03f673ff5d5a9b49eecd2b7cc6ff
bc-1.04-static*
MD5 (bc-1.04.tar.gz) = 02b8f00b12015758d7994c73ff0d3043
These have been tested and working on my ESXi 5.5 install, hope someone found this useful.
* Not included in VM

Ref.:
http://www.kickinass.net/vmware-esxi-5-1-rsync-3-0-9-statically-linked-binary-erstellen/
http://www.virtuallyghetto.com/2011/02/how-to-compile-statically-linked-rsync.html

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章