熊熊出没 发表于 2025-3-24 04:42:33

GED-VIZ部署解决方案

项目
https://github.com/bertelsmannstift/GED-VIZ
终极结果如图:
https://i-blog.csdnimg.cn/direct/39f446d75cb14610b7de943cd4ed639d.png
依赖要求:
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
https://i-blog.csdnimg.cn/direct/65ec54bf90fb49b58e66ae1791f76340.png
或者直接关闭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
https://i-blog.csdnimg.cn/direct/9c64e21b66d54808bbc6bb985ebec64e.png
进入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)makeinstallecho′exportPATH=/usr/local/ruby−2.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
https://i-blog.csdnimg.cn/direct/3af8f36e7bc64016ae3a231adca02abd.png
更换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


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: GED-VIZ部署解决方案