How to Install and Use wget: Difference between revisions

From Acenet Knowledgebase
Jump to navigation Jump to search
test
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<html> wget is a non-interactive downloader. You can skip a few steps for getting a download onto your server using it.<br /><br />For example, let's say you want to install cPanel on your server. You would normally go to:  
wget is a non-interactive downloader. Using wget, you can download files directly to your server or hosting account.
<a href="http://httpupdate.cpanel.net/latest">http://httpupdate.cpanel.net/latest</a>
 
and download the latest install to your desktop. You would then have to open your FTP client and upload the file to your server.<br /><br />wget cuts your time in half.<br /><br /><strong>***Install wget***</strong><br /><br />First, you will want to see if wget is installed. You can do so by running this command via SSH when logged in as root:  
For example, let's say you want to install cPanel on your server. You would normally go to:  
<div class="code_style">which wget</div>
 
<br />If wget is installed, the output of the above command should be:<br /><br />
http://httpupdate.cpanel.net/latest
<div class="code_style">/usr/bin/wget</div>
 
<br />If wget is not installed on your server, here are the commands to install it for CentOS and Debian/Ubuntu when logged into your server via SSH as root:<br /><br />CentOS:<br /><br />
and download the latest install to your desktop. You would then have to open your FTP client and upload the file to your server.
<div class="code_style">yum install wget</div>
 
<br />Debian/Ubuntu:<br /><br />
wget cuts your time in half by allowing you to directly download the file to your server.
<div class="code_style">sudo apt-get install wget</div>
 
<br /><strong>***Using wget***</strong><br /><br />Now that you have wget installed, you can issue the command to download any file that you have the URL for. <em>You will want to make sure you're located in the directory where you're wanting to download the file to before issuing the wget command.</em><br /><br />We were using cPanel as the example earlier, so the command would be:<br /><br />
==Install wget==
<div class="code_style">wget http://httpupdate.cpanel.net/latest</div>
 
<br />And you're done!</html> [[Category:Technical Support FAQ]]
[1] See if wget is installed. You can do so by running this command via SSH when logged in as root:  
 
<syntaxhighlight lang="bash">which wget</syntaxhighlight>
 
If wget is installed, the output of the above command should be:
 
<syntaxhighlight lang="bash">/usr/bin/wget</syntaxhighlight>
 
If wget is not installed on your server, here are the commands to install it for CentOS/Redhat and Debian/Ubuntu when logged into your server via SSH as root:
 
CentOS/Redhat:
 
<syntaxhighlight lang="bash">yum install wget</syntaxhighlight>
 
Debian/Ubuntu:
 
<syntaxhighlight lang="bash">sudo apt-get install wget</syntaxhighlight>
 
==Using wget==
 
Now that you have wget installed, you can issue the command to download any file that you have the URL for. You will want to make sure you're located in the directory where you're wanting to download the file to before issuing the wget command.
 
We were using cPanel as the example earlier, so the command would be:
 
<syntaxhighlight lang="bash">wget http://httpupdate.cpanel.net/latest</syntaxhighlight>
 
And you're done!
 
[[Category:Technical Support FAQ]]

Latest revision as of 10:52, 9 October 2012

wget is a non-interactive downloader. Using wget, you can download files directly to your server or hosting account.

For example, let's say you want to install cPanel on your server. You would normally go to:

http://httpupdate.cpanel.net/latest

and download the latest install to your desktop. You would then have to open your FTP client and upload the file to your server.

wget cuts your time in half by allowing you to directly download the file to your server.

Install wget

[1] See if wget is installed. You can do so by running this command via SSH when logged in as root:

<syntaxhighlight lang="bash">which wget</syntaxhighlight>

If wget is installed, the output of the above command should be:

<syntaxhighlight lang="bash">/usr/bin/wget</syntaxhighlight>

If wget is not installed on your server, here are the commands to install it for CentOS/Redhat and Debian/Ubuntu when logged into your server via SSH as root:

CentOS/Redhat:

<syntaxhighlight lang="bash">yum install wget</syntaxhighlight>

Debian/Ubuntu:

<syntaxhighlight lang="bash">sudo apt-get install wget</syntaxhighlight>

Using wget

Now that you have wget installed, you can issue the command to download any file that you have the URL for. You will want to make sure you're located in the directory where you're wanting to download the file to before issuing the wget command.

We were using cPanel as the example earlier, so the command would be:

<syntaxhighlight lang="bash">wget http://httpupdate.cpanel.net/latest</syntaxhighlight>

And you're done!