wget command not found on linux server - linux

I have a linux server (completely new, web hosting, nothing is installed into it), and want to use a "wget" command. Currently, it is not found. Kernel version 2.6.32-896.16.1.lve1.4.54.el6.x86_64
I am completely new to linux, tried to solve this issue by myself, but couldn't do it. I log in into this linux server via PuTTY via my Windows OS laptop.
wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz
To get "wget" to work, I will need to install it. I guess I will need to install first "sudo" and/or "apt" and/or "apt-get". But couldn't do it. Please give me a short list of steps in which order to install them.

Given your kernel version, it looks like your Linux distribution is CentOS 6 or RHEL 6. Try installing wget with this command:
yum install wget
You must be root when you run this command.

Incase you using Debian version of Linux, use the following:
sudo apt-get install wget

From kernel version, it looks like you are using RHEL/Centos 6.
Please check -
https://centos.pkgs.org/6/centos-x86_64/wget-1.12-10.el6.x86_64.rpm.html
If the mentioned dependencies exist in your system, you can directly fire the rpm command
rpm command guide -
https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch02s03.html
If it doesn't work, you need to use yum command. (You need to configure yum command first, if not configured already)
yum install wget
To configure yum command in centos6 -
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-configuring_yum_and_yum_repositories
Note - you need to be root user for above activities.

Related

Install package managers over SSH & FTP

i have an device running on Pure Linux, there is no Package installer installed on that, the only thing i have is SSH and therefore also an Terminal. Commands like apt-get, dpkg, yum dont work.
How do i install apt-get over SSH? I've saw some suggestions that use yum, make or dpkg to install apt-get, but since i've neither of them...
For debian based systems exists a tool called apt-offline. That's perfect in that scenario.
https://wiki.ubuntuusers.de/apt/apt-offline/

sudo/apt-get command not found in git bash

I am using Windows 10 in my machine, and currently installed git bash on it.
I wanted to install node and npm for my application.
when i tried :
apt-get install nodejs
"apt-get" command not found,
I tried google and got
sudo install nodejs
"sudo" command not found.
How to use sudo and apt-get command on my git bash.
Git for Windows comes with a Windows port of Bash and a collection of few more common *nix command-line tools that have been compiled for Windows, it does not provide a complete *nix environment. Hence you cannot use tools like sudo and apt-get which modify the *nix operating system.
However, there are other tools, programs if you like, available.
Try to install node " the windows way ".
win-sudo package adds sudo to windows.
kafaior at Super User suggests:
A working sudo replacement for Cygwin's mintty terminal would be to place the following script in user's PATH:
$!/bin/bash
cygstart --action=runas mintty -e `which bash` -lc \"$#\"
Maximus mentions how to add sudo (well, csudo) via cmder.
Super User has a similar question here.
It looks like there is a command runas or elevate commands. These might be for PowerShell, rather than git bash. I'm not sure.
I found your this while looking for a way to add rsync to Git Bash. So below I included info that may or may not work for sudo or apt-get. If they do not work directly for specific commands the OP is asking about, they may inspire a solution that does work. Also this could help others who arrived here as I did.
rsync is another unix command not available in the standard installation of git bash.
However, you can download and install the Git for Windows SDK (scroll to the bottom of the page for the link). This will allow you to create a version of the Git for Windows installer that does include additional *nx commands.
Install the Git for Windows SDK according to the instructions. Part 2 is where you add the packages you want, that aren't included in the standard git bash installation. Part 3 is where you create a Git installer, which will include the additional packages. If you skipped step 2, this should produce an installer similar to the standard installer.. There is a good discussion as to why they cannot include these commands in the general distribution.
It is also possible to just grab rsync filehere or here and unpack it directly within your Git installation, and it works. I dunno if it is also possible to do something similar for sudo or apt-get.
Finally, it looks like there is a way to get *nix commands available within the Git Bash shell via cmder. Here are the instructions.
Installing applications in git bash does not sound right to me. I would suggest you either use the native Windows installer (https://nodejs.org/) or, if you prefer a package manager, use Chocolatey (https://chocolatey.org/) to install nodejs with:
choco install nodejs

How to run mc, htop on linux(virtual server) without compiling?

I am using a virtual shared server and I would like to have on it some programms like Midnight Commander (mc) or Htop.
The host provider doesn't provide these programs and I don't have access to any package manager or compiler.
I have ssh access to the system and I was wondering if there is a way to just copy and execute these programs without installing or compiling them.
Are there some pre-compiled versions?
PS: If you have a better sugestion for the question/title, please let me know.
You said you can't run a package manager. So the only solution I think is:
1- Upload the program, like mc to your home directory.
2- Change the permission to 774. it make mc executable
3- Open an ssh to the server and try to run it.
Maybe, if there are all the files needed installed, MC run.
But another solution if using FTP link.
You can RUN MC in you PC and LINK to the server by FTP.
FTP Link
By default, MC will show you 2 column interfaces. Left and right. Those columns are not only for local directory. You can make one of them or both connected to remote computer using FTP link.
In this case, MC will act as a FTP Client. To connect it into FTP service, you need to press “F9” > FTP Link. MC will ask credential of the FTP.
http://www.tecmint.com/midnight-commander-a-console-based-file-manager-for-linux/
You may not have access to a package manager, but are you sure you don't have a compiler?
You can get the MC source in a tar file from here.
Save it in your "local" or "src" directory and unpack with:
tar -xvjf mc-4.8.17.tar.bz2
cd into the new directory "mc-4.8.17" and compile with:
./configure --prefix=PATH
where "PATH" is the full path to your "local" directory.
Then run:
make
make install
You can install them with your package manager.
On a redhat based distribution (using rpm) :
yum install htop mc
On a debian based distribution (using deb) :
apt-get install htop mc
On others, tell me your distribution (arch linux, gentoo, slackware...)
htop install in CentOS
yum -y install epel-release
yum update
yum install htop

how to update make 3.81 linux

I am new to Linux (new as in installed it yesterday), I need it for my programming course in the university and I've been told to install specific versions of specific programs, but though I've used apt-get install to install them (having previously done apt-get update) they aren't in the correct version.
The programs that I need are make 4.0 and valgrind 3.10.1.
apt-get installs make 3.81 and valgrind 3.10.0.SVN.
I have tried typing "apt-get install make4.0" and "apt-get install valgrind10.3.1" to no avail. I have downloaded them from the internet and followed what instructions I could understand to install the newer versions but it keeps saying that I have the older ones. (I'm not sure if I can post direct links here, if I can let me know and I'll post where I got them from).
What have I been doing wrong? How can I fix this?
I am currently running Linux Mint.
Thanks for any answer in advance.
Due to a long-standing unresolved Debian bug report, GNU Make remained the age-old 3.81 in Debian for a very long time, and as a consequence, in Debian-based distributions such as Ubuntu and Mint.
The latest Debian release, Jessie, has upgraded to 4.0, so Debian-based distributions will have that upgrade. However, it is better to use 4.1.
This has been discussed many times on the GNU Make mailing list and elsewhere.
So to get a newer version, you must compile it from scratch.
This is easy:
Install the required packages (gcc, make and such).
Open up a shell (if you're using the GUI, a terminal window).
Type the following commands (or something equivalent, e.g. you can use curl instead of wget):
cd /tmp
wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
tar xvf make-4.1.tar.gz
cd make-4.1/
./configure
make
sudo make install
cd ..
rm -rf make-4.1.tar.gz make-4.1
Now, make 4.1 is in /usr/local/bin/make.
You can verify it is there with whereis make.
You can make it your default make by prefixing /usr/local/bin to your $PATH variable in your shell startup file; for instance, in .profile or .bashrc if you use the bash shell.
Don't try to install a self-compiled make (or anything else that doesn't come from the distribution's package manager) into /bin or /usr/bin; doing that will confuse your package manager.

Linux: Console apt-get not available?

I need to install Java, Solr, and update Git on this dedicated server.
I have ssh root access and was going to use the apt-get method to install what I need. But says this command is not found. Is this not a core Linux thing? I am guess I need to now look into installing this before doing anything else?
I don't have CPanel access.
This is solved. I did not know there was a different package manager with CentOS and Ubuntu. I used yum and it worked. I will mark this answered once I am able.

Resources