zoukankan      html  css  js  c++  java
  • 学习笔记(1)——实验室集群配置

    1、MapScapeService绘图服务和gdapp算法服务的启动方法:

    //使用端口9527
    [root@node03 ~]# nohup /home/geohpc/bin/s & //使用端口35569
    [root@node03
    ~]# nohup /home/geohpc/bin/gdappwl &

    在每个计算节点上启动上述服务,查看是否已经启动;

    //MapScapeService监听9527端口
    [root@mgt softwares]# lsof -i:9527
    COMMAND     PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
    MapScapeS 32600 root    3u  IPv4 1592823      0t0  TCP *:9527 (LISTEN)
    
    //gdappwl算法服务监听35569端口
    [root@mgt softwares]# lsof -i:35569
    COMMAND   PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
    gdappwl 15573 root    3u  IPv4 1633344      0t0  TCP *:35569 (LISTEN)

     在主节点上启动数据传输服务,使用端口35568:

    [geohpc@mgt bin]$ nohup ./gdmndsrv &

    2、关于apache和tomcat的路径和重启方法

    apache根目录为“/var/www/”,如下:

    [root@mgt zc]# ll /var/www/
    total 24
    drwxr-xr-x. 2 root root 4096 Jan 25  2013 cgi-bin
    drwxr-xr-x. 3 root root 4096 Jun 26  2012 error
    drwxr-xr-x  5 root root 4096 Jan 28  2013 higine
    drwxr-xr-x. 3 root root 4096 Jan 23  2013 html
    drwxr-xr-x. 3 root root 4096 Jan 25  2013 icons
    drwxrwxrwx  2 root root 4096 Jan 25  2013 images

    apache服务状态、停止、启动方法为:

    [root@mgt ~]#service httpd status
    [root@mgt ~]#service httpd stop
    [root@mgt ~]#service httpd start

    tomcat路径位于"/home/geohpc/softwares/apache-tomcat-7.0.34/"下,

    [root@mgt ~]# cd /home/geohpc/software/bin/apache-tomcat-7.0.34/bin
    //停止
    [root@mgt ~]# ./shutdown.sh
    //启动
    [root@mgt ~]# ./startup.sh
    //查看状态
    [root@mgt ~]# ps -ef|grep tomcat
    root      8047  7966  0 23:46 pts/0    00:00:00 grep tomcat
    //或者
    [root@mgt softwares]# lsof -i:8080
    COMMAND   PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
    java    17964 root   37u  IPv6 1551628      0t0  TCP *:webcache (LISTEN)

    3、关于LVS

    各种配置文件为目录:“ /home/geohpc/zmq/”下。

    执行realserver.sh脚本:

    #!/bin/bash
    setenforce 0
    VIP=192.168.253.110
    /sbin/ifconfig lo:0 192.168.253.110 broadcast 192.168.253.110 netmask 255.255.255.255 up
    /sbin/route add -host 192.168.253.110 dev lo:0
    echo "1" > /proc/sys/net/ipv4/conf/lo/arp_ignore
    echo "2" > /proc/sys/net/ipv4/conf/lo/arp_announce
    echo "1" > /proc/sys/net/ipv4/conf/all/arp_ignore
    echo "2" > /proc/sys/net/ipv4/conf/all/arp_announce
    sysctl -p

    查看网络配置(lo:0为新增虚拟网卡):

    [root@mgt zmq]# ifconfig
    eth0      Link encap:Ethernet  HWaddr 5C:F3:FC:E9:61:78
              inet addr:172.20.0.1  Bcast:172.20.0.255  Mask:255.255.255.0
              inet6 addr: 2001:cc0:2034:253:5ef3:fcff:fee9:6178/64 Scope:Global
              inet6 addr: fe80::5ef3:fcff:fee9:6178/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:159581 errors:0 dropped:0 overruns:0 frame:0
              TX packets:194916 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:33036347 (31.5 MiB)  TX bytes:90134768 (85.9 MiB)
              Interrupt:28 Memory:92000000-92012800
    
    eth1      Link encap:Ethernet  HWaddr 5C:F3:FC:E9:61:7A
              inet addr:192.168.253.100  Bcast:192.168.253.255  Mask:255.255.255.0
              inet6 addr: 2001:cc0:2034:253:5ef3:fcff:fee9:617a/64 Scope:Global
              inet6 addr: fe80::5ef3:fcff:fee9:617a/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:210390 errors:0 dropped:0 overruns:0 frame:0
              TX packets:131542 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:20929725 (19.9 MiB)  TX bytes:116119383 (110.7 MiB)
              Interrupt:40 Memory:94000000-94012800
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:1822085 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1822085 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:271649237 (259.0 MiB)  TX bytes:271649237 (259.0 MiB)
    
    lo:0      Link encap:Local Loopback
              inet addr:192.168.253.110  Mask:255.255.255.255
              UP LOOPBACK RUNNING  MTU:16436  Metric:1

    ipvssetup.sh脚本:

    #!/bin/bash
    /sbin/ifconfig eth0:0 $VIP broadcast 192.168.253.110 netmask 255.255.255.255 up
    /sbin/route add -host 192.168.253.110 dev eth1:0

    ipvsadm.sh脚本:

    [root@mgt zmq]# ./ipvsadm.sh
    IP Virtual Server version 1.2.1 (size=4096)
    Prot LocalAddress:Port Scheduler Flags
      -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
    TCP  192.168.253.110:8080 wrr
      -> 192.168.253.101:8080         Route   100    0          0
      -> 192.168.253.102:8080         Route   100    0          0
      -> 192.168.253.103:8080         Route   100    0          0
      -> 192.168.253.104:8080         Route   80     0          0
      -> 192.168.253.105:8080         Route   80     0          0
    TCP  192.168.253.110:9527 wrr
      -> 192.168.253.101:9527         Route   100    0          0
      -> 192.168.253.102:9527         Route   100    0          0
      -> 192.168.253.103:9527         Route   100    0          0
      -> 192.168.253.104:9527         Route   80     0          0
      -> 192.168.253.105:9527         Route   80     0          0
    TCP  192.168.253.110:35569 wrr
      -> 192.168.253.101:35569        Route   100    0          0
      -> 192.168.253.102:35569        Route   100    0          0
      -> 192.168.253.103:35569        Route   100    0          0
      -> 192.168.253.104:35569        Route   80     0          0
      -> 192.168.253.105:35569        Route   80     0          0

    (关于LVS配置方法,待续)

    4、关于ganglia监控界面的配置和启动(web界面发布于“ /var/www/html/ganglia/”)

    在管理结点上查看、重启gmetad服务:

    [root@mgt zc]# service gmetad status
    gmetad (pid 14327) is running...
    [root@mgt zc]# service gmetad start/stop/restart

    在各个结点上重启gmond服务:

    [root@node04 ~]# service gmond restart
    Shutting down GANGLIA gmond:                               [  OK  ]
    Starting GANGLIA gmond:                                    [  OK  ]

    5、关于higine(待续)

  • 相关阅读:
    POJ2054 Color a Tree
    洛谷【P1080】国王游戏
    BZOJ1707:[Usaco2007 Nov]tanning分配防晒霜
    BZOJ5281:[Usaco2018 Open]Talent Show
    浅谈二分
    BZOJ1720:[Usaco2006 Jan]Corral the Cows 奶牛围栏
    POJ2018 Best Cow Fences
    洛谷【P2115】[USACO14MAR]破坏Sabotage
    BZOJ 4244 邮戳拉力赛 (DP)
    UOJ #277 BZOJ 4739 [清华集训2016]定向越野 (计算几何、最短路)
  • 原文地址:https://www.cnblogs.com/yeahgis/p/3468547.html
Copyright © 2011-2022 走看看