scp 쓰는법

Posted by 주원이^^
2017. 1. 31. 17:00 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

sftp로 사용할 경우 폴더 전체에 있는 파일을 옮기기 쉽지않다.


특히 디렉토리​에 하위 디렉토리가 있을 경우에는 스크립트를 작성하지 않는 이상 어렵다고 할 수 있다.


그래서 찾은 것이 scp 명령어이다.


정리.



서버1. XXX.XXX.XX.93 : 복사해야 할 서버


 - 복사해야할 폴더경로 : /data2/ispdata


서버2. ​XXX.XXX.XX.89 : 복사해서 넣고 싶은 서버


​  - 복사해서 넣고 싶은 폴더 경로 : /data/neos/


1. 폴더가 있는 서버에 접속한다.(175.125.91.89)


2. ​89번에서 scp 명령어를 실행한다. (물론 두 서버간에는 22번 포트가 열려 있어야 한다.)






 89번 서버에서


 root(또는 사용자계정) hostname] $ scpˇ-rvˇ/data2/ispdataˇ (이동해야 할 서버의 계정)@XXX.XXX. 


 XX.93:/data/neos/


 


 - r : 폴더를 복사한다는 옵션


 - v : 복사 과정을 보여주는 옵션 




 

scp -rv /data2/ispdata neos@XXX.XXX.XX.93:/home/ne​​​os/



'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

DNS 설치  (0) 2017.01.31
하드웨어 부하테스트 (Stress)  (0) 2016.07.13
LVS Server2  (0) 2016.04.08
LVS Server1  (0) 2016.04.08
리눅스 본딩셋팅  (0) 2015.09.14

DNS 설치

Posted by 주원이^^
2017. 1. 31. 16:26 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Chroot 를 사용하지 않는 bind 설치는 매우 쉽다.

일단 bind 를 설치한다.

yum -y install bind

그리고 각종 zone 파일 및 conf 파일을 카피한다.

cp -a /usr/share/doc/*/sample/var/named/* /var/named/

cp -a /usr/share/doc/*/sample/etc/* /var/named/

named.conf 파일을 /etc 및에 심볼릭 링크를 건다.

ln -s /var/named/named.conf /etc/named.conf

 

/etc/named.conf 파일을 수정한다.

vi /etc/named.conf

options
{
        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;
        // query-source-v6 port 53;

        // Put files that named is allowed to write in the data/ directory:
        directory "/var/named"; // the default
        dump-file               "data/cache_dump.db";
        statistics-file         "data/named_stats.txt";
        memstatistics-file      "data/named_mem_stats.txt";

};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

include "/etc/rndc.key";

 

named.conf 파일이 정상 작동 되는지 여부를 확인한다.

 

named-checkconf -z

에러 안나오면 끗!

 

/etc/init.d/named start

 

netstat -an | grep LISTEN

 

이젠 끝!!

 

UDP, TCP 53 Port 가 떳는지 확인해 보자

 

자동 실행 되게 chkconfig 에 등록하자

 

chkconfig --add named

chkconfig --level 2345 named on

'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

scp 쓰는법  (0) 2017.01.31
하드웨어 부하테스트 (Stress)  (0) 2016.07.13
LVS Server2  (0) 2016.04.08
LVS Server1  (0) 2016.04.08
리눅스 본딩셋팅  (0) 2015.09.14

하드웨어 부하테스트 (Stress)

Posted by 주원이^^
2016. 7. 13. 10:39 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

LinuxStress 툴의 설치 및 사용방법

                                                                             작성자: 신 동 인

 

1. Kit확보방법

 - 아래의 url에서 source download 받음.

   http://weather.ou.edu/~apw/projects/stress/

   stress-1.0.0.tar.gz

 

2. ftp를 사용하여 원하는 시스템의 디렉토리로 이동

 

3. 압축의 해제

[root@krcipf3 stress]# tar -xzvf stress-1.0.0.tar.gz

stress-1.0.0/

stress-1.0.0/README

stress-1.0.0/configure.in

stress-1.0.0/aclocal.m4

stress-1.0.0/Makefile.am

stress-1.0.0/Makefile.in

stress-1.0.0/configure

stress-1.0.0/AUTHORS

stress-1.0.0/COPYING

stress-1.0.0/ChangeLog

stress-1.0.0/INSTALL

stress-1.0.0/NEWS

stress-1.0.0/TODO

stress-1.0.0/depcomp

stress-1.0.0/install-sh

stress-1.0.0/missing

stress-1.0.0/src/

stress-1.0.0/src/Makefile.am

stress-1.0.0/src/Makefile.in

stress-1.0.0/src/stress.c

stress-1.0.0/doc/

stress-1.0.0/doc/Makefile.am

stress-1.0.0/doc/Makefile.in

stress-1.0.0/doc/stamp-vti

stress-1.0.0/doc/version.texi

stress-1.0.0/doc/mdate-sh

stress-1.0.0/doc/texinfo.tex

stress-1.0.0/doc/stress.texi

stress-1.0.0/doc/stress.1

stress-1.0.0/doc/stress.html

stress-1.0.0/doc/stress.info

stress-1.0.0/test/

stress-1.0.0/test/Makefile.am

stress-1.0.0/test/Makefile.in

stress-1.0.0/test/check_version_return_code

stress-1.0.0/test/check_usage_return_code

 

4. 소스의 컴파일

[root@krcipf3 stress-1.0.0]# ./configure

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking for style of include used by make... GNU

checking dependency style of gcc... gcc3

checking how to run the C preprocessor... gcc -E

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for unistd.h... (cached) yes

checking for sqrt in -lm... yes

checking for basename in -lgen... no

configure: creating ./config.status

config.status: creating Makefile

config.status: creating src/Makefile

config.status: creating doc/Makefile

config.status: creating test/Makefile

config.status: executing depfiles commands

[root@krcipf3 stress-1.0.0]# make

Making all in .

make[1]: Entering directory `/shindi/tools/stress/stress-1.0.0'

make[1]: `all-am'를 위해 할 일이 없습니다

make[1]: Leaving directory `/shindi/tools/stress/stress-1.0.0'

Making all in src

make[1]: Entering directory `/shindi/tools/stress/stress-1.0.0/src'

gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"stress\" -DVERSION=\"1.0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBM=1 -I.     -Wall -Werror -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -MT stress.o -MD -MP -MF .deps/stress.Tpo -c -o stress.o stress.c

mv -f .deps/stress.Tpo .deps/stress.Po

gcc  -Wall -Werror -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE   -o stress stress.o  -lm

[root@krcipf3 stress-1.0.0]#

 

 

5. 실행파일 생성 확인

[root@krcipf3 stress-1.0.0]#

[root@krcipf3 stress-1.0.0]# cd src

[root@krcipf3 src]# ls -l stress

-rwxr-xr-x  1 root root 51993 10 21 16:50 stress

 

6. 실행테스트

[root@krcipf3 src]# ./stress --cpu 8 --timeout 60s  

   <-- 8 cpu에 돌아가는 것으로 8개 프로세스가 구동됨.

stress: info: [6950] dispatching hogs: 8 cpu, 0 io, 0 vm, 0 hdd

 

[root@krcipf3 ~]# vmstat 5

procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----

 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa

 9  0      0 3681888  47760 226752   0    0     0     7 2075    51 100  0  0  0

 9  0      0 3681952  47760 226752   0    0     0     0 2066    44 100  0  0  0

 9  0      0 3679776  47776 226736   0    0     0     6 2082    77 100  0  0  0

 9  0      0 3679200  47808 226704   0    0     0    31 2069    56 100  0  0  0

 9  0      0 3679200  47808 226704   0    0     0     0 2070    46 100  0  0  0

 

 

[root@krcipf3 src]# ./stress --vm 3 --vm-bytes 1024m  --timeout 60s

   <--  Memory load를 위해 2개의 process 1024M의 메모리를 사용

stress: info: [7147] dispatching hogs: 0 cpu, 0 io, 3 vm, 0 hdd

stress: info: [7147] successful run completed in 60s

[root@krcipf3 src]#

 

[root@krcipf3 ~]# vmstat 5

procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----

 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa

 4  0   8160 1452224  1952  22768    0    0     0     0 2063    48  7 93  0  0

 4  0   8160 3379968  1968  22752    0    0    26     0 2070    57  9 91  0  0

 4  0   8160 1816640  2016  24768    0    0    13     1 2066    87  7 93  0  0

 4  0   8160 2700224  2048  24736    0    0     0    34 2068    58  8 92  0  0

 4  0   8160 2366528  2048  24736    0    0     0     0 2061    53  7 93  0  0

 

[root@krcipf3 src]# stress --hdd 3 --hdd-bytes 1024m --timeout 60s

   <-- hard disk load를 위한 process수와 hard disk 테스트를 위한 파일의 크기를 정의

stress: info: [7301] dispatching hogs: 0 cpu, 0 io, 0 vm, 3 hdd

stress: info: [7301] successful run completed in 77s

[root@krcipf3 src]#

 

[root@krcipf3 ~]# vmstat 5

procs -----------memory---------- ---swap-- -----io----- --system-- ----cpu----

 r  b   swpd   free   buff  cache   si   so    bi     bo   in    cs us sy id wa

 0  5   8144 1914144  10448 1962576  0    0     5  11856 2200  1441  0 36  0 64

 4  5   8144 1600832  11664 2258576  0    0     2  70411 2211  1848  0 15  0 85

 0  7   8144 1090816  13600 2735488  0    0     3 226435 2204  1618  0 28  0 72

 0  7   8144 1929664  15152 1908336  0    0     3      0 2208  1742  0 20  0 80

 1  7   8144 2773504  15376 1101088  0    0     2     26 2205  1924  0 11  0 89

 

[root@krcipf3 src]# ./stress --cpu 5 --vm 3 --vm-bytes 512m --hdd 2 --hdd-bytes 1024m  --timeout 60s 

   <-- cpu, memory, and disk를 모두 테스트

stress: info: [7584] dispatching hogs: 5 cpu, 0 io, 3 vm, 2 hdd

stress: info: [7584] successful run completed in 64s

[root@krcipf3 src]#

 

[root@krcipf3 ~]# vmstat 5

procs -----------memory---------- ---swap-- -----io----  --system-- ----cpu----

 r  b   swpd   free   buff  cache   si   so    bi     bo   in    cs us sy id wa

11  4   8080 1430528  55952 1632048  0    0     0 143647 2197   762 50 50  0  0

10  5   8064 1131328  57680 1584928  0    0     0     20 2192    87 57 43  0  0

 9  4   8064 2387008  58048 472064   0    0     1 109312 2198    80 60 40  0  0

12  2   8064 2334624  58320 162192   0    0     0      2 2193    81 63 37  0  0

11  4   8064 1933120  60688 682016   0    0     0 129394 2143   131 55 45  0  0

 

시간: s,m,h,d,y     크기:k,m,g

 

7. stress툴의 사용방법관련 정보

# info stress 를 실행하면 사용방법에 대한 자세한 정보를 볼 수 있음.

 

 

'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

scp 쓰는법  (0) 2017.01.31
DNS 설치  (0) 2017.01.31
LVS Server2  (0) 2016.04.08
LVS Server1  (0) 2016.04.08
리눅스 본딩셋팅  (0) 2015.09.14

LVS Server2

Posted by 주원이^^
2016. 4. 8. 09:35 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

[Linux/CentOS7] Install LVS + Keepalived Server #2

※ Did you got the good news? Please click ad again, 좋은 정보 얻으셨다면 광고 한번 눌러주시는 센스 부탁드려요


This is the Redundant configuration for LVS + Keepalived Server itself.

This example is based on the environment below.



HTTP packets to the eth0 on LVS Server are forwarded to Backend01 and Backend02 Servers with NAT.

Change the default gateway to internal IP address of LVS on both Backend Web Servers first. (it's 10.0.0.29 on the example)



1. Install ipvsadm and keepalived.


[root@otaec ~]# yum -y install ipvsadm keepalived

# enable IP forward

[root@otaec ~]# echo 'net.ipv4.ip_forward = 1' >> /etc/sysctl.conf 

[root@otaec ~]# sysctl -p

[root@otaec ~]# touch /etc/sysconfig/ipvsadm 

[root@otaec ~]# systemctl start ipvsadm 

[root@otaec ~]# systemctl enable ipvsadm 






2. Configure Keepalived.

It's OK to configure the same settings except one setting on both backend servers. 

(but only for the "priority" section, Change it on both backend server.)


[root@otaec ~]# mv /etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf.org 

[root@otaec ~]# vi /etc/keepalived/keepalived.conf

# create new

global_defs {

    notification_email {

        root@otaec.server.world

    }

    notification_email_from root@otaec.server.world

    smtp_server 127.0.0.1

    smtp_connect_timeout 30

    router_id LVS_Server

}

vrrp_instance VI_1 {

    state BACKUP

    # monitored interface

    interface eth0

    # virtual router's ID

    virtual_router_id 51

    # set priority (change this value on each server)

    # (large number means priority is high)

    priority 100

    nopreempt

    # VRRP sending interval

    advert_int 1

    # authentication info between Keepalived servers

    authentication {

        auth_type PASS

        auth_pass password

    }


    virtual_ipaddress {

        # virtual IP address

        192.168.0.29 dev eth0

        10.0.0.29/24 dev eth1

    }

}

virtual_server 192.168.0.29 80 {

    # monitored interval

    delay_loop 3

    # distribution method

    lvs_sched rr

    # routing method

    lvs_method NAT

    protocol TCP


    # backend server#1

    real_server 10.0.0.51 80 {

        weight 1

        HTTP_GET {

            url {

                # monitored path

                path /

                # status code for normally state

                status_code 200

            }

            # timeout(sec)

            connect_timeout 3

        }

    }

    # backend server#2

    real_server 10.0.0.52 80 {

        weight 1

        HTTP_GET {

            url {

                path /

                status_code 200

            }

            connect_timeout 3

        }

    }

}


[root@otaec ~]# systemctl start keepalived 

[root@otaec ~]# systemctl enable keepalived 




[Linux/CentOS7] Install LVS + Keepalived Server #2

 

'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

DNS 설치  (0) 2017.01.31
하드웨어 부하테스트 (Stress)  (0) 2016.07.13
LVS Server1  (0) 2016.04.08
리눅스 본딩셋팅  (0) 2015.09.14
openssl 이용 키 생성 및 적용  (0) 2015.07.09

LVS Server1

Posted by 주원이^^
2016. 4. 8. 09:10 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

[Linux/CentOS7] Install LVS Server #1

※ Did you got the good news? Please click ad again, 좋은 정보 얻으셨다면 광고 한번 눌러주시는 센스 부탁드려요


Linux Virtual Server(LVS)란?

리눅스 가상 서버란, 한대의 서버로 증가하는 인터넷 사용자를 처리하기가 힘들어 지면서 
고가용성 서버를 구축하기 위해 리눅스 머신을 로드 발랜스 하도록 해주는 운영시스템이다.

만약 하나의 노드에서 처리량이 너무 많아서 서비스가 불가능할 경우 
간단히 하나의 노드를 병렬 구성으로 추가 함으로써 부하분산을 하도록 하는 것을 말한다. 
공개소스로서 이러한 기능을 담당하고 있는 것이다.

 

Configure LVS (Linux Virtual Server) to build a load barancer.
This example is based on the environment below.

 

 

 

1. Install ipvsadm.

 

[root@dlp ~]# yum -y install ipvsadm

 

 

 

 # enable IP forward
[root@dlp ~]# echo 'net.ipv4.ip_forward = 1' >> /etc/sysctl.conf 
[root@dlp ~]# sysctl -p
[root@dlp ~]# touch /etc/sysconfig/ipvsadm 
[root@dlp ~]# systemctl start ipvsadm 
[root@dlp ~]# systemctl enable ipvsadm

 

 

2. Configure Load Balancing.

 

 # clear tables
[root@dlp ~]# ipvsadm -C

 

 

 

# add virtual service
# [ ipvsadm -A -t (Service IP:Port) -s (Distribution method) ]
[root@dlp ~]# ipvsadm -A -t 192.168.0.30:80 -s wlc

 

 

 

# add backend real servers
# [ ipvsadm -a -t (Service IP:Port) -r (Real Server's IP:Port) -m ] ("m" means masquerading (NAT))
[root@dlp ~]# ipvsadm -a -t 192.168.0.30:80 -r 10.0.0.51:80 -m 
[root@dlp ~]# ipvsadm -a -t 192.168.0.30:80 -r 10.0.0.52:80 -m

 

 

 

# confirm tables
[root@dlp ~]# ipvsadm -l 
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  dlp.server.world:http wlc
  -> 10.0.0.51:http               Masq    1      0          0
  -> 10.0.0.52:http               Masq    1      0          0

 

 

 

rr Robin Robin 
 연결을 동일 순서대로 각 노드에 부하 분산한다.

wrr Weighted Round Robin 
 "-w weight '에 의해 설정된 weight에 따라 부하 분산한다.

lc Least-Connection 
 연결 수가 가장 낮은 노드에 부하 분산한다.

wlc Weighted Least-Connection 
 연결 수와 weight에 따라 부하 분산한다. 
 "-s (분산 방식)"을 지정하지 않으면 기본 분산 방식.

lblc Locality-Based Least-Connection 
 동일한 IP에서의 연결은 동일한 노드에 배분. 
 노드가 과부하 상태의 경우는 연결 수를 가진 노드에 부하 분산한다.

lblcr Locality-Based Least-Connection with Replication 
 동일한 IP에서의 연결은 가장 부하가 적은 노드에 배분. 
 모든 노드에 과부하 장소는 클러스터에서 연결 수를 가진 노드를 추가하여 부하 분산한다.

dh Destination Hashing 
 대상 IP에서 정적으로 할당 된 해시 테이블을 검색하여 부하 분산한다.

sh Source Hashing 
 소스 IP에서 정적으로 할당 된 해시 테이블을 검색하여 부하 분산한다.

sed Shortest Expected Delay 
 응답 속도가 가장 빠른 서버에 배분.

nq Never Queue 
 유휴 서버가 있으면 거기에 배분. 
 모든 서버가 사용 중이라면 가장 응답 속도가 빠른 서버에 배분.

 

[Linux/CentOS7] Install LVS Server #1

 

'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

하드웨어 부하테스트 (Stress)  (0) 2016.07.13
LVS Server2  (0) 2016.04.08
리눅스 본딩셋팅  (0) 2015.09.14
openssl 이용 키 생성 및 적용  (0) 2015.07.09
오픈메신저 설치법(openfire) + spark  (0) 2014.11.17

리눅스 본딩셋팅

Posted by 주원이^^
2015. 9. 14. 12:20 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

본딩이란 여러 개의 이더넷을 하나로 묶어 대역폭을 늘리는 기술
Microsoft Windows의 Teaming과 동일(HP-UX:APA, CISCO:EtherChannel, Linux:Bonding)

 

 

(본딩 정책)

BONDING_OPTS="mode=1 설명
mode=0 : Balance-Round Robin(순차적 전송 및 로드 발란스 기능, Fault Talerance 기능)
mode=1 : Active-backup      (기본적으로 1개만 active하고 이게 failed 이면 나머지가 기능 수행)
0이 기본값인데, 많은 엔지니어들이 1을 선호한다.


(설정파일)
/etc/sysconfig/network-scripts/ifcfg-bond0
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1
/etc/modprobe.d/bonding

 

# ls /proc/sys/net/ipv4/conf
all  default  eth0  eth1  lo

 

 

리눅스에서 본딩설정 해 보자.

 

먼저

# setup 실행

이더넷을 bond0 란 이름으로 추가한다. 그리고 아래와 같이 수정

 

# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
IPADDR="10.1.1.31"
NETMASK="255.255.255.0"
GATEWAY="10.1.1.1"
BONDING_OPTS="mode=1 miimon=100"  <-- 이곳에 본딩 정책을 기입한다.

 

# cat ifcfg-eth0
DEVICE=eth0
HWADDR=A4:44:C1:F7:02:EF
TYPE=Ethernet
UUID=114ed8fd-54c7-43b3-9547-b3026fcc7336
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0 <-- 추가
SLAVE=yes <-- 추가


# cat ifcfg-eth1
DEVICE=eth1
HWADDR=A4:44:FD:98:F0:63
TYPE=Ethernet
UUID=1bd18e99-366a-465f-8c90-9ba513c82cb5
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0 <-- 추가
SLAVE=yes <-- 추가


# vi /etc/modprobe.d/bonding
alias bond0 bonding <-- 추가

# service network restart <- 서비스 재시작

# ifconfig

# cat /sys/class/net/bonding_masters
bond0

# cat /proc/net/bonding/bond0

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1  <-- 현재 Active 이더넷이 표시된다.
MII Status: up
MII Polling Interval (ms): 100

Slave Interface: eth0
MII Status: up
Speed: 100 Mbps

Slave Interface: eth1
MII Status: up
Speed: 100 Mbps


# cat /proc/net/dev  <-- 이더넷별로 송수신 패킷 확인하기

 

----------------------

 

모듈을 구성한다.
 
  [Bonding 모드 종류]

     0 : balance-round robine ( 2개의 NIC를 통한 분배 +  Fault Tolerance )

     1 : active-standby ( Active상태의 NIC에 문제 발생시 Fault Tolerance )

     2 : balance-xor ( 0과 비슷하지만 xor연산을 이용한 목적지 Mac과 근원지 Mac을 이용한 분배 +    Fault tolerance)

     3 : broadcast ( 2개의 NIC에 어떤 규칙 없이 데이터 통신 +  Fault Tolerace)

     4 : 802.3ad (link aggregation) – switch 에 aggregation 그룹생성이 필요

'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

LVS Server2  (0) 2016.04.08
LVS Server1  (0) 2016.04.08
openssl 이용 키 생성 및 적용  (0) 2015.07.09
오픈메신저 설치법(openfire) + spark  (0) 2014.11.17
ntopng 설치 및 설정  (0) 2014.11.14

openssl 이용 키 생성 및 적용

Posted by 주원이^^
2015. 7. 9. 11:27 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

yum install openssl

 

mkdir /etc/httpd/conf/ssl

ssl폴더이동후

openssl genrsa -out server.key 2048

openssl req -new -key server.key -out server.csr

하고 셋팅값 집어넣은이후

 

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

 

유효기간 365일짜리 생성

 

vi /etc/httpd/conf/ssl_vhosts.conf

 

<VirtualHost *:443>
DocumentRoot "웹폴더"
ServerName 메인
ServerAdmin 이메일
ErrorLog "에러로그 저장위치"
TransferLog "엑서스 로그 저장위치"

SSLEngine on
SSLCertificateFile "crt파일 위치"
SSLCertificateKeyFile "key파일위치"
</VirtualHost>

 

vi /etc/sysconfig/iptables 수정

443 포트 오픈

service iptables restart

 

 

vi /etc/httpd/conf/httpd.conf

/NameVirtualHost / NameVirtualHost를 찾습니다.

주석을 해제합니다.

 

#NameVirtualHost *:80
NameVirtualHost *:443

 

#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

Include conf/ssl_vhosts.conf

 

service httpd restart

 

완료.

 

'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

LVS Server1  (0) 2016.04.08
리눅스 본딩셋팅  (0) 2015.09.14
오픈메신저 설치법(openfire) + spark  (0) 2014.11.17
ntopng 설치 및 설정  (0) 2014.11.14
zimbra 4번째  (0) 2014.09.18

오픈메신저 설치법(openfire) + spark

Posted by 주원이^^
2014. 11. 17. 15:37 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Openfire 다운로드 

wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.9.3-1.i386.rpm


Openfire 설치

# rpm -ivh openfire-3.9.3-1.i386.rpm


Openfire DB 설정(Mysql버전)

전제조건 1 mysql이 깔려있다.

전제조건 2 openfire라는 Database가 만들어져있다.

 

 

 

mysql -uroot -p

 

CREATE DATABASE openfire DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

exit

 

cd /opt/openfire/resources/database

cat openfire_mysql.sql | mysql openfire -p

 

cd /opt/openfire/jre/bin

cp java java.bak

rm -rf java

ln -s /usr/bin/java java 

 

vi /etc/my.cnf

======================================
[mysql]
default-character-set = utf8

[mysqld]
character-set-client-handshake=FALSE
init_connect="SET collation_connection = utf8_general_ci"
init_connect="SET NAMES utf8"
default-character-set = utf8
character-set-server = utf8
collation-server = utf8_general_ci

[client]
default-character-set = utf8

[mysqldump]
default-character-set = utf8

 

========================================================


Openfire 실행

service openfire start


Openfire 세부 설정

웹사이트에서 접속

포트는 9090

http://(ip 혹은 도메인):9090


 

----------------------------------------------

한글 아이디 설정


jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8

 

jdbc 적는곳에 저렇게 적어줘야 가능.







다시 호스트:9090접속


admin 입력하고

아까 입력했던 password 입력~




참고 

http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/install-guide.html

http://stackoverflow.com/questions/849199/why-cant-i-get-openfire-to-start

http://linuxrealtime.blogspot.kr/2013/08/open-fire-installation-on-cent-os-63.html

http://solutionsatexperts.com/openfire-server-installation-and-configuration/

 

'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

리눅스 본딩셋팅  (0) 2015.09.14
openssl 이용 키 생성 및 적용  (0) 2015.07.09
ntopng 설치 및 설정  (0) 2014.11.14
zimbra 4번째  (0) 2014.09.18
openstack  (0) 2014.09.18

ntopng 설치 및 설정

Posted by 주원이^^
2014. 11. 14. 15:04 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

http://www.programkr.com/blog/MIDNxADMwYT1.html  참조사이트

 

 

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

vi /etc/yum.repos.d/ntop.repo


[ntop]
name=ntop packages
baseurl=http://www.nmon.net/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.nmon.net/centos/RPM-GPG-KEY-deri
[ntop-noarch]
name=ntop packages
baseurl=http://www.nmon.net/centos/$releasever/noarch/
enabled=1
gpgcheck=1
gpgkey=http://www.nmon.net/centos/RPM-GPG-KEY-deri


yum -y install ntopng ntopng-data


vi /etc/ntopng/ntopng.conf

-G=/var/tmp/ntopng.pid

--local-networks "172.10.2.0/16"

--interface eth0

--http-port 3333

 

chkconfig --level 2345 redis on

chkconfig --level 2345 ntopng on

 

service redis restart

service ntopng restart

 

web page 소스  /usr/share/ntopng/

 

웹사이트 httpd 와는 별개로 움직임

http://ip:3333

 

'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

openssl 이용 키 생성 및 적용  (0) 2015.07.09
오픈메신저 설치법(openfire) + spark  (0) 2014.11.17
zimbra 4번째  (0) 2014.09.18
openstack  (0) 2014.09.18
zimbra 참고자료  (0) 2014.07.04

zimbra 4번째

Posted by 주원이^^
2014. 9. 18. 12:56 리눅스/소프트웨어(Software)
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

yum install -y nc

 

service sendmail stop

chkconfig sendmail off

 

su - zimbra

 

zmcontrol status

zmcontrol stop

zmcontrol start

'리눅스 > 소프트웨어(Software)' 카테고리의 다른 글

오픈메신저 설치법(openfire) + spark  (0) 2014.11.17
ntopng 설치 및 설정  (0) 2014.11.14
openstack  (0) 2014.09.18
zimbra 참고자료  (0) 2014.07.04
irc ddos  (0) 2014.01.03