cache-cloud 编译

cache-cloud是sohutv团队开发的,在redis上层做了一个控制层面,研发和运维使用的redis管理平台。

安装步骤

部署jdk , not openjdk

wget "http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz?AuthParam=1481171694_db1dbd27e44090963e72108d7f6b273e"
filename: /etc/profile
export JAVA_HOME="/usr/local/java"
export PATH=/usr/local/java/bin:$PATH

alternatives --install /usr/bin/java java /usr/local/java/bin/java 5
alternatives --config java

下载源代码

保存到/opt/下并解压

mkdir /opt 
cd /opt
wget https://codeload.github.com/sohutv/cachecloud/tar.gz/1.2

新建数据库

yum install -y mariadb mariadb-server

cat <<EOF >1.sql
CREATE DATABASE `cache-cloud` /*!40100 COLLATE 'utf8_general_ci' */;
grant all privileges on *.* to admin@'localhost' identified by 'admin';
grant all privileges on *.* to admin@'%' identified by 'admin';
flush privileges;
EOF

mysql < 1.sql

修改maven设置,mirror指向阿里云

    <mirror>
      <id>alimavenid>
      <name>aliyun mavenname>
      <url>http://maven.aliyun.com/nexus/content/groups/public/url>
      <mirrorOf>centralmirrorOf>
    mirror>

mvn编译

cd /opt/cachecloud-1.2
mvn clean compile install -Plocal

unalias cp

测试运行

cd /opt/cachecloud-1.2/cachecloud-open-web
mvn spring-boot:run

生产环境

cp -f /opt/cachecloud-1.2/cachecloud-open-web/target/cachecloud-open-web-1.0-SNAPSHOT.war /opt/cachecloud-web/

cp -f /opt/cachecloud-1.2/cachecloud-open-web/src/main/resources/cachecloud-web.conf /opt/cachecloud-web/cachecloud-open-web-1.0-SNAPSHOT.conf

cp -f /opt/cachecloud-1.2/script/start.sh /opt/cachecloud-web/

cp -f /opt/cachecloud-1.2/script/stop.sh /opt/cachecloud-web/

启动

/opt/cachecloud-web/start.sh

踩得坑

  1. jdk 不能使用openjdk
  2. 运行spring:run的时候要在web目录下
  3. start.sh启动后,会等待几分钟启动时间

你可能感兴趣的:(redis)