zoukankan      html  css  js  c++  java
  • Linux-modules software

    简介

    这里指的modules不是linux内核相关的module,只是用于软件多版本控制的一个开源软件包,比如说系统同时有neo4j的不同版本,使用modules软件就可以使得在需要的时候选择相应的软件版本.并且有相应的conflict等操作

    软件地址

    http://modules.sourceforge.net/(可下载源码包)

    module command:http://modules.sourceforge.net/man/module.html

    modulefile:http://modules.sourceforge.net/man/modulefile.html

    编译安装

    1)编译安装两步,一是安装tcl,二是安装modules,步骤均为configure,make,make install(./configure --help可查看configure参数)

    2)需要安装tcl包,软件下载地址为http://tcl.activestate.com/,本次选择8.5.6版本,编译安装参照http://tcl.activestate.com/doc/howto/compile.html

    如configure:

    1 ./configure --prefix=/home/guangfa/files/tcl_865_install --enable-threads

    3)然后编译安装modules要设置module的configure的--with-tcl-lib参数,如果报错“cmdModule.c:643:35: error: 'Tcl_Interp' has no member named 'errorLine'”,configure时加上CPPFLAGS="-DUSE_INTERP_ERRORLINE"。

    1 ./configure --prefix=/home/guangfa/files/modules_install --with-tcl-lib=/home/guangfa/files/tcl_865_install/lib CPPFLAGS="-DUSE_INTERP_ERRORLINE"

    4)设置环境变量初始化modules

    1 #~/.bashrc
    2 . /home/guangfa/files/modules_install/Modules/3.2.10/init/bash

    5)编译安装结果

    演示配置(neo4j graph database)

    1)版本:neo4j-community-2.3.2,neo4j-community-2.3.3

    2)modulefiles 配置

    2.1 在/home/guangfa/files/modules_install/Modules/3.2.10/modulefiles文件夹下,建立neo4j文件夹,

    2.2 建立2.3.2与2.3.2文件

    (2.3.3文件)注意第一行不能变

     1 #%Module1.0#####################################################################
     2 ##
     3 ## neo4j modulefile
     4 ##
     5 ## modulefiles/modules.  Generated from modules.in by configure.
     6 
     7 conflict neo4j
     8 
     9 setenv NEO_HOME /home/guangfa/files/neo4j-community-2.3.3;
    10 prepend-path PATH {/home/guangfa/files/neo4j-community-2.3.3/bin};
    11 prepend-path LD_LIBRARY_PATH {/home/guangfa/files/neo4j-community-2.3.3/lib};

    (2.3.2文件)

     1 #%Module1.0#####################################################################
     2 ##
     3 ## neo4j modulefile
     4 ##
     5 ## modulefiles/modules.  Generated from modules.in by configure.
     6 
     7 conflict neo4j
     8 setenv NEO_HOME {/home/guangfa/files/neo4j-community-2.3.2};
     9 prepend-path PATH {/home/guangfa/files/neo4j-community-2.3.2/bin};
    10 prepend-path LD_LIBRARY_PATH {/home/guangfa/files/neo4j-community-2.3.2/lib};

    2.3 设立默认的版本,cp 2.3.3 .default,这样就将2.3.3设为默认版本

    3)module avail

    4)版本load与unload示意图

    5)将module load neo4j写进.bashrc文件,就可以默认使用2.3.3版本

    备注:感谢老司机的指点~

  • 相关阅读:
    【题解】CF#983 E-NN country
    【题解】CF#403 D-Beautiful Pairs of Numbers
    【题解】CF#285 E-Positions in Permutations
    【题解】FJOI2015火星商店问题
    【题解】Atcoder AGC#01 E-BBQ Hard
    【题解】Atcoder AGC#03 E-Sequential operations on Sequence
    【题解】CF#280 C-Game on Tree
    【题解】CF#833 B-The Bakery
    [BZOJ3600] 没有人的算术 [重量平衡树+权值线段树]
    [bzoj3514][CodeChef GERALD07] Chef ans Graph Queries [LCT+主席树]
  • 原文地址:https://www.cnblogs.com/loadofleaf/p/5348001.html
Copyright © 2011-2022 走看看