1. 메모리 최적화 설정
스왑사이즈 확장
깃랩은 메모리를 많이 쓰기때문에 파이 4gb에서 기본 세팅 스왑사이즈 100MB로는 택도 없음
https://manpages.ubuntu.com/manpages/lunar/en/man8/dphys-swapfile.8.html
스왑 설정파일 열기
sudo nano /etc/dphys-swapfile
CONF_MAXSWAP 부분 값을 4096 으로 수정
CONF_MAXSWAP=4096
변경사항 적용및 적용 확인
sudo systemctl restart dphys-swapfile
free -h
내장패키지 설정
메모리 사용을 줄이기위해 프로세스를 줄일 수도 있다.
** 렘 4GB 미만 환경에서는 puma 클러스터모드 비활성화하기 puma['worker_processes'] = 0
# Reduce the number of running workers to the minimum in order to reduce memory usage
puma['worker_processes'] = 2
sidekiq['concurrency'] = 9
# Turn off monitoring to reduce idle cpu and disk usage
prometheus_monitoring['enable'] = false
변경 후 재실행
sudo gitlab-ctl reconfigure
2. 깃랩설치
깃랩 라즈베리파이용 패키지는 아직 32비트 (armf) 아키텍처만 지원하기 때문에 64비트 (arm64) 라즈베리파이에 파이용 패키지 설치시 이런 이러가 뜸. ( 작성일 2024년 8월 기준 https://about.gitlab.com/install/#raspberry-pi-os )
E: Unable to locate package-ce
arm64를 지원하는 패키지를 다운받아야한다.
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get update
sudo apt-get install debian-archive-keyring
sudo apt-get install curl gnupg apt-transport-https
curl -L https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey | sudo apt-key add -
sudo apt-get update
sudo EXTERNAL_URL="http://localhost:1234" apt-get install gitlab-ce
만약 EXTERNAL_URL 을 설정하지 않았거나 변경하려면 etc/gitlab/gitlab.rb 에서 설정이 가능하다.
sudo nano /etc/gitlab/gitlab.rb
설정 변경 후 서비스 재시작
sudo gitlab-ctl reconfigure
아래 명령어를 입력 후 초기 비밀번호 확인하여 루트계정으로 접속한다.
sudo cat /etc/gitlab/initial_root_password | grep Password:
계정 비밀번호를 변경한다
3. 설치제거
# GitLab 서비스 제거
sudo gitlab-ctl uninstall
# 패키지 사용으로 생성된 데이터 정리
sudo gitlab-ctl cleanse
# 계정 제거
sudo gitlab-ctl remove-accounts
# 패키지 제거
sudo dpkg -P gitlab-ce
# 잔여 패키지/파일 검색
sudo dpkg -l | grep gitlab
sudo find / -name "gitlab*"
# 관련 파일 및 디렉토리 삭제
sudo rm -rf /etc/gitlab
sudo rm -rf /opt/gitlab
sudo rm -rf /var/log/gitlab
#제거 확인
sudo systemctl status gitlab-runsvdir
https://about.gitlab.com/blog/2022/03/14/installing-gitlab-on-raspberry-pi-64-bit-os/
https://growupcoding.tistory.com/66
https://docs.gitlab.com/omnibus/settings/rpi.html
'programming | development > linux' 카테고리의 다른 글
[ubuntu] gitlabe ce 설치, gitlab-runsvdir 실행 오류 (0) | 2024.09.06 |
---|---|
[Ubuntu] vnc 서버 설치하기 (0) | 2024.08.27 |
[Rasberry Pi] 한글세팅 (0) | 2024.08.04 |
리액트 라즈베리파이에서 배포하기 (0) | 2024.07.29 |
댓글