how to install Hadoop2.7.1(single node setup) on Vmware - linux

I was following the instruction on the official website:
http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html
there are two problems I can't solve:
1. I can't run these commands:
$ sudo apt-get install ssh
$ sudo apt-get install rsync
picture_apt-get_commandnotfound
the website says: Unpack the downloaded Hadoop distribution. In the distribution, edit the file etc/hadoop/hadoop-env.sh to define some parameters as follows
I can't find this file: etc/hadoop/hadoop-env.sh
I have downloaded these files and uncompressed them:
hadoop-2.7.1.tar.gz
hadoop-2.7.1-src.tar.gz
hadoop-2.7.1.tar.gz.mds
hadoop-2.7.1-src.tar.gz.mds
thank you!

You will have ssh already. No need to install ssh again.
You can follow these instructions to set up Hadoop on VM. The instructions are mainly for Centos (redhat flavor). It works for Redhat, CentOS and Fedora.
How did you uncompress the files. You should use tar xzf hadoop-2.7.1.tar.gz. It will create directory with name hadoop-2.7.1. Then you need to cd to it and then you will find etc directory.
If you have hadoop-2.7.1.tar.gz in /home/. Then you need to go to /home//hadoop-2.7.1/etc/hadoop. Also you can find the location of hadoop directory by using find / -name "hadoop" -type d command. It will search your VM and report all the directories with name hadoop.

I have a write-up for installing single-node using VirtualBox and CentOS 6.5 here: https://github.com/trisberg/hadoop-install/blob/master/InstallingHadoop.adoc
Hopefully this provides some help.

Related

How to uninstall terraform and install newer version of terraform on windows 10 linux subsystem?

i want to install a newer version of terrafrom 0.12.24 on windows 10 linux subsystem. i am new to using this interface and i am not sure how to do it
i installed terraform on Windows 10 linux subsystem using these commands
wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip -O
terraform.zip;
unzip terraform.zip;
sudo mv terraform /usr/local/bin;
rm terraform.zip;
however this installed older version.. and when i ran some script it gave me this error.
Failed to load root config module: Error parsing terraform/local/terraform.tf: At 119:12: Unknown token: 119:12 IDENT file
To fix this i am planning to upgrade to newer version of terrafrom 0.12.24. could someone provide me with commands to uninstall and install newer version of terraform thanks.
This should install 0.12.24 version
wget https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip
unzip terraform_0.12.24_linux_amd64.zip
sudo mv terraform_0.12.24_linux_amd64 /usr/local/bin
rm terraform_0.12.24_linux_amd64.zip
Let me explain what these steps are:
1) The link given along with wget is the downloadable link for the required package. wget helps in downloading it. I changed the version here as your required version.
2) unzip it
3) moved to /usr/local/bin folder.
4) Removing the zip as we have already copied the contents to bin folder
This is probably more appropriate as a comment but I do not yet have the reputation to do that. As of version 0.15.1, it unzipped only as "terraform", so line 3 in the above answer could just be:
sudo mv terraform /usr/local/bin
And this worked for me.

wget command not found on linux server

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.

Install node.js on dedicated server via ssh

I own a dedicated linux server from 1&1. I have SFTP and SSH access. I would like to know if it is possible to install node.js on my server.
I already tried to install it one week ago but I failed. The downloading and extraction worked, so the folder is on my server. I did :
cd ~
wget http://nodejs.org/dist/latest/node-v11.1.0.tar.gz
tar xvf node-v11.1.0.tar.gz
mv node-v11.1.0 nodejs
But this part failed :
cp nodejs/bin/node ~/bin
cd ~/bin
ln -s ../nodejs/lib/node_modules/npm/bin/npm-cli.js npm
On the first instruction, there is an error : cp : cannot stat 'nodejs/bin/node': No such file or directory
I tried this too :
cd nodejs
./configure
make
make install
(All instructions are from tutorials)
The instructions are you following are for a precompiled bundle for Linux.
http://nodejs.org/dist/latest/node-v11.1.0.tar.gz is the URL to a source code bundle.
Download the compiled bundle for your system instead.
Your best bet may be to look for distribution-specific instructions. Most modern package managers will have an install option for Node and there are great options 3rd parties like Nodesource as well.
For instance, here's a DO howto for installing on Ubuntu 18.04. It lists 3 different methods for install, each of which would work from an SSH session.
If you let us know what distribution and version you are running, we may be able to help you more specifically.
If you don't know, you can try one of these commands to check:
$ hostnamectl
or
$ less /etc/issue

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

Problems installing Pycharm

I am trying to install pycharm on my linux OS.
following the instructions pycharm/dowload.
Since I run a linux machine I made sure the pychrarm files in the current directory:
ietX220:~$ ls
Desktop pycharm-community-4.0.1
Documents Music
pycharm-community- 4.0.1.tar.gz
Downloads New Folder Templates
Dropbox octave-workspace Videos
examples.desktop Pictures VirtualBox VMs
jdk1.8.0_25 Public Win7-PV2hh-6c3HY-
QJHM9-8RJJH-P86W8.iso
ietX220:~$ pycharm-*.tar.gz
pycharm-community-4.0.1.tar.gz: command not found
As you can see the pycharm file is in the current(home) directory but is not found.
Then I opened the tar file made pycharm.sh executable:
chmod +x pycharm.sh
And then ran:
~/pycharm-community-4.0.1/bin$ ./pycharm.sh
Startup Error: Application cannot start in headless mode
What am I doing wrong?
I am having the same issue. It looks like maybe you and I both have a minimal (headless) Java install on our systems. Use your system's method for finding installed packages and search for Java, and i'll bet you find only openjdk-headless
yum list installed | grep openjdk
# or on debian-based systems
# dpkg --get-selections | grep openjdk
# =>java-1.7.0-openjdk-headless
Solution then is to install the same package without the "-headless" suffix.
Here's where I am getting my information for the solution: https://bugzilla.redhat.com/show_bug.cgi?id=1177379
I had the same problem and as mentioned before the error was that openjdk was headless. What i did is i installed from the begining openjdk using the command apt-get install default-jdk (for ubuntu). I know it's not the best way to do it, however it is rather quick and simple.
If you have already all the prerequisites (such as Java) installed, try out charmy (PyCharm installer for Linux).
virtualenv charmy-env
source charmy-env/bin/activate
pip install charmy
charmy install
That will install PyCharm into your home directory. It will also simplify your feature PyCharm upgrades. To upgrade you would just have to type
charmy install
instead of downloading distribution manually, unpacking it, etc.
See https://pypi.python.org/pypi/charmy for more.
PYcharm is now available as a snap. Can be easily installed as below
sudo apt update && sudo apt install snapd
Then the community edition can be installed by
sudo snap install pycharm-community --classic
The classic escape is to get snaps that have been published with classic confinements
220:~$ pycharm-*.tar.gz
pycharm-community-4.0.1.tar.gz: command not found
gz files are not executable files. I think the current directory is not in your PATH variable. To get around that you would do "./pycharm-community-3.0.1.tar.gz" and you should see the message "Permission denied" as the gz file would not have execute permission. And if you gave it execute permission it would say "cannot execute binary file: Exec format error".
These are the instructions from the JetBrains website:
Copy the pycharm-*.tar.gz to the desired installation location
(make sure you have rw permissions for that directory)
Unpack the pycharm-*.tar.gz using the following command:
tar xfz pycharm-*.tar.gz
Remove the pycharm-*.tar.gz to save disk space (optional)
Run pycharm.sh from the bin subdirectory
NOTE: PyCharm on Linux doesn't need special installation or running
any installation script. It runs out of the pycharm-*.tar.gz
If you run the command "tar xfz pycharm-*.tar.gz" you should end up with a directory in your current directory named "pycharm-community-4.0.3".
If you cd pycharm-community-4.0.3/bin, "ls -al" should show that pycharm.sh is already executable. Run pycharm.sh and you should be done. The script will prompt for a password at the end so it can put a startup script in a system directory. You must have admin privileges for that part to work. But if you don't, you can still start PyCharm by executing "[path to pycharm directory]/bin/pycharm.sh &" at the command prompt.
I am not sure what the "NOTE:" is saying, but I would ignore it as you get a working PyCharm by doing what it says above the NOTE: .
Setup the newest stable jdk(like jdk1.7 or jdk 1.8) in your system, and set it is the default jdk.
1.download JDK8
2.SET JAVA HOME
sudo gedit /etc/environment
export JAVA_HOME=/home/username/Java/jdk1.8
export JRE_HOME=/home/username/Java/jdk1.8
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
sudo gedit /etc/profile
//before umask xxx adde
export JAVA_HOME=/home/username/Java/jdk1.8
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$JAVA_HOME/bin
3. run pycharm
./pycharm.sh

Resources