Notice
Recent Posts
Recent Comments
Link
«   2026/08   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
Tags
more
Archives
Today
Total
관리 메뉴

나의 개발 일상 기록

[CentOS7] mattermost 버전 업데이트 본문

AWS

[CentOS7] mattermost 버전 업데이트

느린 거북이 2021. 2. 23. 13:48

mattermost 버전 업데이트 진행 과정

 

1. 경로 이동

     

   cd /tmp

 

2. mattermost 다운로드

   

  wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz  

 

  위의 명령어를 통해 다운받을 버전을 다운로드합니다.

 

   * wget : 인터넷에서 단일 파일을 받아 현재 디렉토리에 저장하는 명령어

 

3. 파일 추출

    

    tar -xf mattermost*.gz --transform='s,^[^/]\+,\0-upgrade,'

 

    위의 명령어를 통해 Mattermost Server 파일을 추출합니다.

 

    * tar : tar OR tar.gz로 압축을 하거나 풀어야 할 경우 사용되는 명령어입니다.

 

4. 서버 중지

 

    sudo systemctl stop mattermost

 

    위의 명령어를 통해 Mattermost 서버를 중지합니다.

 

      * systemctl : 리눅스의 systemd 와 service manager를 컨트롤 하기 위한 도구이며,

                       서비스의 상태 진단, 설정변경, 구동과 중단 등의 전반적인

                       관리 기능을 제공합니다.

 

5. 데이터 및 애플리케이션 백업

    

    cd {install-path}

 

    위의 명령어를 통해 설치 경로로 이동합니다.

 

    sudo cp -ra mattermost/ mattermost-back-$(date +'%F-%H-%M')/

 

    위의 명령어를 통해 백업을 받습니다.

 

6. 특수 디렉토리를 제외한 모든 파일 제거

    

  sudo find mattermost/ mattermost/client/ -mindepth 1 -maxdepth 1 \! \( -type d \( -path mattermost/client -o -path mattermost/client/plugins -o -path mattermost/config -o -path mattermost/logs -o -path mattermost/plugins -o -path mattermost/data \) -prune \) | sort | sudo xargs rm -r  

 

  위의 명령어를 통해 mattermost내에서 특수 디렉토리는 config, logs, plugins, client./plugins, data를 제외한

  디렉토리는 지우고 해당 디렉토리와 내용만 보존합니다.

 

7. 소유권 변경

    

  sudo chown -hR mattermost:mattermost /tmp/mattermost-upgrade/

 

  위의 명령어를 통해 새 파일을 복사하기 전에 소유권을 변경합니다. 

 

8. 임시 파일 제거

     

  sudo cp -an /tmp/mattermost-upgrade/. mattermost/

  sudo rm -r /tmp/mattermost-upgrade/

 

  위의 명령어를 통해 새파일을 설치 디렉토리에 복사하고 임시 파일을 제거합니다.

 

9.  CAP_NET_BIND_SERVICE 기능 활성화

     

    cd {install-path}/mattermost

    sudo setcap cap_net_bind_service=+ep ./bin/mattermost  

 

    위의 명령어를 통해 포트 80을 사용하여 서버에 서비스를 제공하거나 mattermost 서버에

    TLS를 설정 한 경우 새 mattermost 바이너리가 낮은 포트에 바인딩 할 수 있도록

    CAP_NET_BIND_SERVICE 기능을 활성화 합니다.

 

10. 서비스 시작

      

    sudo systemctl start mattermost

 

    위의 명령어를 통해 mattermost 서버를 시작합니다.

'AWS' 카테고리의 다른 글

[CentOS7] JDK 8 설치  (0) 2021.05.10
[CentOS7] Linux 디렉토리  (0) 2021.05.06
[CentOS7] mattermost 설치  (0) 2021.02.17
[CentOS7] 레드마인 설치  (0) 2021.02.17
[CentOS7] MySQL 설치  (0) 2021.02.16
Comments