Env
- Platform: TencentCloud CVM
- Region: East China (Shanghai)
- System: CentOS 7.5
- SSH: XShell 6 (Free for Home/School)
yum updateyum install -y lrzsz # For XShell file transferyum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-develyum install -y gcc perl-ExtUtils-MakeMaker复制代码
Java 1.8
Download rpm file of jdk from Oracle official website and transfer it to server, then rpm
the .rpm file:
rpm -ivh jdk-8u201-linux-x64.rpm复制代码
Set JAVA_HOME & PATH
echo "export JAVA_HOME=/usr/java/jdk1.8.0_201-amd64/" >> /etc/bashrcecho "export PATH=$JAVA_HOME/bin:$PATH" >> /etc/bashrcsource /etc/bashrcjava -version复制代码
Yes~
java version "1.8.0_201"Java(TM) SE Runtime Environment (build 1.8.0_201-b09)Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)复制代码
Git 2.21.0
Download the tar.gz file from GitHub-git/git first, and transfer it to server
May need to remove the old version→
yum remove -y git-1.8.3.1
tar xzf git-2.21.0.tar.gz # 解压cd git-2.21.0/make prefix=/usr/local/git all # 指定位置进行编译make prefix=/usr/local/git install # 指定位置进行安装echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc # 设置环境变量source /etc/bashrc # 刷新git --version复制代码
Redis 5.0.4
This download was fast, just go wget
/ 这个下载挺快的,直接wget
wget http://download.redis.io/releases/redis-5.0.4.tar.gztar xzf redis-5.0.4.tar.gzmv redis-5.0.4 /usr/local/rediscd /usr/local/redismake PREFIX=/usr/local/redis all # 好像PREFIX用小写就不行orzmake PREFIX=/usr/local/redis installecho "export PATH=$PATH:/usr/local/redis/bin" >> /etc/bashrcsource /etc/bashrcredis-server --versionredis-cli --versionvim /usr/local/redis/redis.conf# 修改 daemonize nodaemonize yesredis-server /usr/local/redis/redis.conf#关闭redis-serverredis-cli127.0.0.1:6379> shutdownnot connected># shutdown可带参数save|nosave复制代码
OK, fine
[root@VM_0_10_centos ~]# redis-server --versionRedis server v=5.0.4 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=51e01150da47607b[root@VM_0_10_centos ~]# redis-cli --versionredis-cli 5.0.4复制代码