{"id":12401,"date":"2019-03-26T22:54:41","date_gmt":"2019-03-26T22:54:41","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12401"},"modified":"2019-03-26T22:54:41","modified_gmt":"2019-03-26T22:54:41","slug":"exodus-safely-copy-linux-binaries-from-one-linux-system-to-another","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/26\/exodus-safely-copy-linux-binaries-from-one-linux-system-to-another\/","title":{"rendered":"Exodus \u2013 Safely Copy Linux Binaries From One Linux System to Another"},"content":{"rendered":"<p><strong>Exodus<\/strong>\u00a0is a simple yet useful program for easily and securely copying\u00a0<strong>Linux ELF<\/strong>\u00a0binaries from one system to another. For example, if you have\u00a0<a href=\"https:\/\/www.tecmint.com\/install-htop-linux-process-monitoring-for-rhel-centos-fedora\/\">htop (Linux Process Monitoring Tool)<\/a>\u00a0installed on your desktop machine, but not installed on your remote Linux server, exodus gives a way to copy\/install the\u00a0<strong>htop<\/strong>\u00a0binary from the desktop machine to the remote server.<\/p>\n<p>It bundles all of the binary\u2019s dependencies, compiling a statically linked wrapper for the executable that invokes the relocated linker directly, and installing the bundle in the\u00a0<code>~\/.exodus\/<\/code>\u00a0directory, on the remote system.<\/p>\n<p>You can see it in action here.<\/p>\n<p><center><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/intoli\/exodus\/master\/media\/htop-demo.gif\" alt=\"Exodus Htop Demo\" data-lazy-loaded=\"true\" \/><\/center>Exodus really comes in handy in two critical cases:\u00a0<strong>1)<\/strong>\u00a0if you do not have root access on a machine and\/or\u00a0<strong>2)<\/strong>\u00a0if the package you want to use is not available for the Linux distribution you are running on another machine.<\/p>\n<h3>Install Exodus in Linux Systems<\/h3>\n<p>You can install\u00a0<strong>exodus<\/strong>\u00a0using\u00a0<a href=\"https:\/\/www.tecmint.com\/install-pip-in-linux\/\" target=\"_blank\" rel=\"noopener\">Python PIP package manager<\/a>, as follows. The command below will perform a user specific installation (only for the account you have logged on with).<\/p>\n<pre>$ sudo apt install python-pip                [Install PIP On Debian\/Ubuntu]\r\n$ sudo yum install epel-release python-pip   [Install PIP On CentOS\/RHEL]\r\n$ sudo dnf install python-pip\t             [Install PIP On Fedora]\r\n$ pip install --user exodus-bundler          [Install Exodus in Linux] \r\n<\/pre>\n<p>Next, add the directory\u00a0<code>~\/.local\/bin\/<\/code>\u00a0to your\u00a0<strong>PATH<\/strong>\u00a0variable in your\u00a0<code>~\/.bashrc<\/code>\u00a0file, in order to run the exodus executable like any other system command.<\/p>\n<pre>export PATH=\"~\/.local\/bin\/:${PATH}\"\r\n<\/pre>\n<div id=\"attachment_28792\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/03\/Add-Exodus-Path-in-Bashrc.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-28792\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/03\/Add-Exodus-Path-in-Bashrc.png\" alt=\"Add Exodus Path in Bashrc\" width=\"552\" height=\"249\" aria-describedby=\"caption-attachment-28792\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-28792\" class=\"wp-caption-text\">Add Exodus Path in Bashrc<\/p>\n<\/div>\n<p>Save and close the file. Then open another terminal window to start using exodus.<\/p>\n<p><strong>Note<\/strong>: It is also highly recommended that you\u00a0<a href=\"https:\/\/www.tecmint.com\/install-c-c-compiler-and-development-tool-in-centos-fedora-redhat\/\" target=\"_blank\" rel=\"noopener\">install gcc<\/a>\u00a0and one of either\u00a0<strong>musl libc<\/strong>\u00a0or\u00a0<strong>diet libc<\/strong>\u00a0(C libraries used to compile small statically linked launchers for the bundled applications), on the machine where you\u2019ll be packaging binaries.<\/p>\n<h3>Use Exodus to Copy Local Binary To a Remote Linux System<\/h3>\n<p>Once you have installed\u00a0<strong>exodus<\/strong>, you can copy a local binary (htop tool) to a remote machine by simply running the following command.<\/p>\n<pre>$ exodus htop | ssh tecmint@server3\r\n<\/pre>\n<div id=\"attachment_28793\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/03\/Exodus-Copy-Htop-Binaries-to-Remote.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-28793\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/03\/Exodus-Copy-Htop-Binaries-to-Remote.png\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/03\/Exodus-Copy-Htop-Binaries-to-Remote.png 805w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/03\/Exodus-Copy-Htop-Binaries-to-Remote-768x293.png 768w\" alt=\"Exodus Copy Htop Binaries to Remote Linux\" width=\"805\" height=\"307\" aria-describedby=\"caption-attachment-28793\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-28793\" class=\"wp-caption-text\">Exodus Copy Htop Binaries to Remote Linux<\/p>\n<\/div>\n<p>Then login to the remote machine, and add the directory\u00a0<code>\/home\/tecmint\/.exodus\/bin<\/code>\u00a0to your\u00a0<strong>PATH<\/strong>\u00a0in your\u00a0<code>~\/.bashrc<\/code>\u00a0file, in order to run the\u00a0<strong>htop<\/strong>\u00a0like any other system command.<\/p>\n<pre>export PATH=\"~\/.exodus\/bin:${PATH}\"\r\n<\/pre>\n<div id=\"attachment_28795\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/03\/Add-Exodus-Path-in-Remote-Linux-Bashrc.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-28795\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/03\/Add-Exodus-Path-in-Remote-Linux-Bashrc.png\" alt=\"Add Exodus Path in Remote Linux Bashrc\" width=\"542\" height=\"287\" aria-describedby=\"caption-attachment-28795\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-28795\" class=\"wp-caption-text\">Add Exodus Path in Remote Linux Bashrc<\/p>\n<\/div>\n<p>Save and close the file, then\u00a0<strong>source<\/strong>\u00a0it as follows, for the changes to take effect.<\/p>\n<pre>$ source ~\/.bashrc\r\n<\/pre>\n<p>Now you should be able to run\u00a0<strong>htop<\/strong>\u00a0on your remote Linux machine.<\/p>\n<pre>$ htop\r\n<\/pre>\n<p>If you have two or more binaries with the same name (for example, more than one version of\u00a0<strong>htop<\/strong>\u00a0installed on your system, one\u00a0<code>\/usr\/bin\/htop<\/code>\u00a0and another\u00a0<code>\/usr\/local\/bin\/htop<\/code>), you can copy and install them in parallel with the\u00a0<code>-r<\/code>\u00a0flag, it enables for assigning of aliases for each binary on the remote machine.<\/p>\n<p>The following command will install the two\u00a0<strong>htop<\/strong>\u00a0versions in parallel with\u00a0<strong>\/usr\/bin\/grep<\/strong>\u00a0called\u00a0<code>htop-1<\/code>\u00a0and\u00a0<strong>\/usr\/local\/bin\/htop<\/strong>\u00a0called\u00a0<code>htop-2<\/code>\u00a0as shown.<\/p>\n<pre>$ exodus -r htop-1 -r htop-2 \/usr\/bin\/htop \/usr\/local\/bin\/htop | ssh tecmint@server3\r\n<\/pre>\n<p><strong>Attention<\/strong>: Exodus has a number of limitations and it may fail to work with non-ELF binaries, incompatible CPU architectures, incompatible Glibc and kernel versions, driver dependent libraries, pro-grammatically loaded libraries and non-library dependencies.<\/p>\n<p>For more information, see the exodus help page.<\/p>\n<pre>$ exodus -h           \r\n<\/pre>\n<p><strong>Exodus Github repository<\/strong>:\u00a0<a href=\"https:\/\/github.com\/intoli\/exodus\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/intoli\/exodus<\/a><\/p>\n<h5>Conclusion<\/h5>\n<p><strong>Exodus<\/strong>\u00a0is simple yet powerful tool for copying binaries from one Linux machine to another remote Linux system. Try it out and give us your feedback via the comment form below.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/exodus-copy-linux-binaries-to-remote-linux-system\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exodus\u00a0is a simple yet useful program for easily and securely copying\u00a0Linux ELF\u00a0binaries from one system to another. For example, if you have\u00a0htop (Linux Process Monitoring Tool)\u00a0installed on your desktop machine, but not installed on your remote Linux server, exodus gives a way to copy\/install the\u00a0htop\u00a0binary from the desktop machine to the remote server. It bundles &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/26\/exodus-safely-copy-linux-binaries-from-one-linux-system-to-another\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Exodus \u2013 Safely Copy Linux Binaries From One Linux System to Another&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12401","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12401"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12401\/revisions"}],"predecessor-version":[{"id":12402,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12401\/revisions\/12402"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}