设置ssh不超时
vi /etc/ssh/sshd_config
# 添加以下设置
ClientAliveInterval 60
ClientAliveCountMax 86400
允许root远程登录
vi /etc/ssh/sshd_config
# PermitRootLogin改为yes
PermitRootLogin yes
# 安装openssh
sudo apt-get install openssh-server
# 重启
sudo service ssh restart
# 添加redis变量
vim /etc/profile
export PATH=/usr/local/redis/bin:$PATH
source /etc/profile
# 查看变量
echo $PATH
安装jdk
# 解压
tar -zxvf jdk-8u181-linux-x64.tar.gz -C /usr/lib/java
# 配置环境变量
vim ~/.bashrc
export JAVA_HOME=/usr/lib/java/jdk1.8
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
source ~/.bashrc
安装redis
wget http://download.redis.io/releases/redis-6.0.6.tar.gz
tar xzf redis-6.0.6.tar.gz
# 编译
make
# 指定目录安装
make PREFIX=/opt/redis install
卸载 redis
apt-get remove redis
# 清除残留
sudo apt-get purge --auto-remove redis-server