put both commands into a single script that gets executed by root
Is there a single command to download binary files from an HTTP server to linux/solaris and install the binary subsequently? [closed]
-
23-09-2022 - |
سؤال
I want to automate a process of downloading a binary file from a server (HTTP) and then install it on either Solaris or Linux servers.
I use wget command followed by executing the binary file as root user.
Can we combine these two steps?
المحلول
نصائح أخرى
You can do
wget url | command-to-install
However, if this is a tar folder and you know how to install, you can write a shell script to do it. e.g
wget url
tar xvzf archive
./configure
make
make install
and run it as root e.g sudo ./installscript.sh
لا تنتمي إلى StackOverflow