其他分享
首页 > 其他分享> > CobaltStrike安装

CobaltStrike安装

作者:互联网

安装jdk

下载jdk1.8——https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
在这里插入图片描述

解压

tar -zxvf jdk-8u291-linux-x64.tar.gz
mv jdk1.8.0_291 /opt

添加环境变量

echo "export JAVA_HOME=/opt/jdk1.8.0_291/" >> ~/.bashrc
echo "export CLASSPATH=.:${JAVA_HOME}/lib" >> ~/.bashrc
echo "export PATH=${JAVA_HOME}/bin:$PATH" >> ~/.bashrc
source ~/.bashrc

安装并注册 执行命令

update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_291/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_291/bin/javac 1
update-alternatives --set java /opt/jdk1.8.0_291/bin/java
update-alternatives --set javac /opt/jdk1.8.0_291/bin/javac
update-alternatives --config java
update-alternatives --config javac

测试

java -version

遇到报错

[-] keytool is not in $PATH
    install the Java Developer Kit

解决:将keytool添加到环境变量中

find / -name keytool
	/opt/jdk1.8.0_291/jre/bin/keytool
	/opt/jdk1.8.0_291/bin/keytool
	/usr/bin/keytool
export PATH=/opt/jdk1.8.0_291/jre/bin/:$PATH
export PATH=/opt/jdk1.8.0_291/bin/:$PATH

标签:bin,opt,jdk1.8,java,CobaltStrike,PATH,安装,291
来源: https://blog.csdn.net/qq_44657899/article/details/116563790