I have installed java 8 on my bluehost VPS. I have followed http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/ instructions .
in order to add directories to PATH
variable I have added
PATH=$PATH:/opt/jdk1.8.0_45/bin:/opt/jdk1.8.0_45/jre/bin
JAVA_HOME=/opt/jdk1.8.0_45
JRE_HOME=/opt/jdk1.8.0_45/jre
to etc/environment
file.
after that I can't push upgrades to my git repository and when I login via ssh I can't run unix command.
my server OS is CentOS and its 64bit
Thanks for your help.
EDIT :
Error shown in git :
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
Pushing to root@162.144.42.157:/home/darmanjo/darmanjoo.git
bash: git-receive-pack: command not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
SSH Problem :
login as: root
root@162.144.42.157's password:
Last login: Tue Apr 21 15:26:53 2015 from 109-110-182-162-dynamic.shabdiznet.com
-bash: id: command not found
-bash: tty: command not found
root@server.darmanjoo.com [~]# ls
-bash: ls: command not found
root@server.darmanjoo.com [~]#
also my echo $PATH
shows :
/usr/local/sbin:/usr/sbin:/sbin:$PATH:/opt/jdk1.8.0_45/bin:/opt/jdk1.8.0_45/jre/bin:/root/bin
That page is incorrect.
Those assignment lines are not valid in /etc/environment
.
Variable expansion does not occur for lines in /etc/environment
.
See this superuser question for some more discussion about this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.