当前位置: 首页 > news >正文

GED-VIZ部署解决方案

项目
https://github.com/bertelsmannstift/GED-VIZ
最终结果如图:
在这里插入图片描述

依赖要求:
Dependencies
一、Ruby 1.9.3 (MRI) with RubyGems. Also works with Ruby 2.1.(测试ruby2.4兼容性更好)
二、MySQL 5.1 or newer(测试过MYSQL5.7在迁移过程会有兼容性问题,建议MYSQL5.5)
三、PhantomJS for generating static images for slide previews, exporting and older browsers(下载JSON可装可不装,目前测试没有影响,下载JSON(可装可不装,目前测试没有影响 下载地址 https://rpmfind.net/linux/dag/redhat/el5/en/x86_64/dag/RPMS/perl-JSON-2.16-1.el5.rf.noarch.rpm安装 rpm -Uvh perl-*.rpm --nodeps --force)

安装REDHAT6.0系统,具体操作网上很多教程。
安装完操作系统,建议
1先执行防火墙开放权限。
sudo iptables -I INPUT -p tcp --dport 3000 -j ACCEPT
保存规则
service iptables save
确保 iptables 服务开机自启
chkconfig iptables on
在这里插入图片描述
或者直接关闭redhat防火墙,等调试完成再开启,关闭防火墙命令为
chkconfig iptables off

下载项目
https://codeload.github.com/bertelsmannstift/GED-VIZ/zip/refs/heads/master
下载完成 解压后放到linux目录中,我是放在/home下

MYSQL5.5安装

测试过MYSQL5.7在迁移过程会有兼容性问题,建议MYSQL5.5,其他版本未知。
先把旧的 MySQL/MariaDB 清理掉
yum remove mysql mysql-server mysql-libs mariadb-libs -y
rm -rf /var/lib/mysql
下载 MySQL 5.5 RPM 包
cd /home
wget https://downloads.mysql.com/archives/get/p/23/file/MySQL-5.5.62-1.el6.x86_64.rpm-bundle.tar
解压文件
tar -xvf MySQL-5.5.62-1.el6.x86_64.rpm-bundle.tar
先安装 common 库
rpm -ivh MySQL-shared-5.5.62-1.el6.x86_64.rpm
安装 Client
rpm -ivh MySQL-client-5.5.62-1.el6.x86_64.rpm
安装 Server
rpm -ivh MySQL-server-5.5.62-1.el6.x86_64.rpm
安装MySQL-devel
wget https://cdn.mysql.com/archives/mysql-5.5/MySQL-devel-5.5.31-2.el6.x86_64.rpm
rpm -ivh MySQL-devel-5.5.31-2.el6.x86_64.rpm
在这里插入图片描述
进入mysql修改密码
mysql -u root
修改MYSQL root 密码:
复制代码
USE mysql;
UPDATE user SET password=PASSWORD(‘new_password’) WHERE user=‘root’;#我设置的密码是new_password
FLUSH PRIVILEGES;
EXIT;

安装ruby2.4.10
wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.10.tar.gz
安装ruby2.4.10
tar -xzf ruby-2.4.10.tar.gz
cd ruby-2.4.10
./configure --prefix=/usr/local/ruby-2.4
make -j ( n p r o c ) m a k e i n s t a l l e c h o ′ e x p o r t P A T H = / u s r / l o c a l / r u b y − 2.4 / b i n : (nproc) make install echo 'export PATH=/usr/local/ruby-2.4/bin: (nproc)makeinstallechoexportPATH=/usr/local/ruby2.4/bin:PATH’ >> /etc/profile
source /etc/profile
验证安装:
ruby -v

安装bundler
bundler-1.16.3
wget https://rubygems.org/downloads/bundler-1.16.3.gem
gem install --local bundler-1.16.3.gem

cd /home/GED-VIZ-master
vim Gemfile
注:把第一行 source 改成 http://rubygems.org
gem sources --remove https://rubygems.org/
gem sources -a http://rubygems.org/
cd GED-VIZ-master
检查一下当前源:
gem sources list
确认只有 http://rubygems.org/

在GED-VIZ-master目录下执行
bundle install
在这里插入图片描述

替换GED-VIZ-master_ok/app/models的typ_with_unit.rb
代码如下,也可以替换整个我重新编辑的项目,地址放下代码段下面:

class TypeWithUnit

  attr_accessor :type, :unit

  # Don’t initialize type and unit in the constructor
  # to allow for serialization

  # initialize accepts objects or keys for data_type, indicator_type and unit
  def initialize(options = nil)
    if options
      data_type = options[:data_type]
      indicator_type = options[:indicator_type]
      unit = options[:unit]

      if data_type.is_a? DataType
        @type = data_type
      elsif data_type
        @type = DataType.where(key: data_type).first

      elsif indicator_type.is_a? IndicatorType
        @type = indicator_type
      elsif indicator_type
        @type = IndicatorType.where(key: indicator_type).first
      end
      #raise "TypeWithUnit: no type given #{options}" unless @type

      if unit.is_a? Unit
        @unit = unit
      elsif unit
        @unit = Unit.where(key: unit).first
      end
      #raise "TypeWithUnit: no unit given #{options}" unless @unit
    end
  end

	def as_json(*args)
	  [@type&.key, @unit&.key]
	end
	
	def to_s
	  "#{
     @type&.key}(#{
     @unit&.key})"
	end

  

相关文章:

  • Java学习打卡-Day19-Set、HashSet、LinkedHashSet
  • Deepseek+扣子实现xhs内容自动采集
  • 云原生服务网格:微服务通讯的量子纠缠革命
  • ICLR 2025 机器人智能灵巧操作更进一步DexTrack
  • 线上课程小程序开发制作助力机构高效运营
  • Linux复习——基础IO,认识文件描述符、软硬件链接
  • 13 - linux 内存子系统
  • iQOO手机投屏到Windows有两种方法,其中一种可远程控制
  • Python 的 ​ORM(Object-Relational Mapping)工具浅讲
  • Llinux安装MySQL教程
  • 数组连续和 - 华为OD统一考试(C卷)
  • python中的allure报告使用
  • 【Python3教程】Python3基础篇之函数
  • c语言基础编程入门练习题
  • 【Android】安卓原生应用播放背景音乐与音效(笔记)
  • LeetCode-两数之和
  • 虚拟机 | Ubuntu操作系统:su和sudo理解及如何处理忘记root密码
  • 前端样式库推广——TailwindCss
  • 清晰易懂的 Kotlin 安装与配置教程
  • 深入理解 Linux ALSA 音频架构:从入门到驱动开发
  • 秘鲁总理辞职
  • 中东睿评|特朗普中东三国行:喧嚣的形式与空洞的实质
  • 秦洪看盘|交易新逻辑,银行股成A股稳定器
  • 中美是否计划讨论美方以芬太尼为由对华征收的特别关税?外交部回应
  • 广东省人大教科文卫委原主任委员梁万里被开除党籍:退休后受贿仍不知止
  • 中美大幅下调超100%关税,印巴四日“战争”复盘|907编辑部