DevEnjoy

One Step Closer

elasticsearch

Ubuntu 14.04에서 Sonarqube 6.7.1 service 등록

2018년 1월 26일 by YongPwi 1 Comment

Sonarqube를 처음 설치하였는데 얼마전부터 업데이트가 되고서는 elasticsearch를 내부적으로 사용하면서

root 권한으로 실행이 불가능하다.

그래서 ubuntu service에 등록시키고 서버가 시작될때 자동으로 시작되게 하고 싶은데

user 권한이 아닌 root 권한으로 실행되어서 해결 방법 찾음

기존에는 sysv-rc-conf를 사용하여서 sysv-rc-conf 문제일지도 모르겠다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// service 등록
nano /etc/systemd/system/sonar.service

// 해당 주석 하위부터 입력 후 저장
[Unit]
Description=SonarQube service
After=syslog.target network.target

[Service]
Type=forking

ExecStart=/opt/sonarqube-6.7.1/bin/linux-x86-64/sonar.sh start  // sonarqube 설치경로 지정
ExecStop=/opt/sonarqube-6.7.1/bin/linux-x86-64/sonar.sh stop

User=ubuntu // user를 root가 아닌 일반 사용 user로 등록
Group=ubuntu  // user를 root가 아닌 일반 사용 user로 등록
Restart=always

[Install]
WantedBy=multi-user.target

service 파일을 등록하였으면

실제 서비스에 등록해준다.

1
sudo systemctl enable sonar

그리고 서버를 재시작하면 sonarqube가 자동으로 실행됨!

참고링크

Posted in: AWS, Programing, Ubuntu Tagged: elasticsearch, service, sonarqube, ubuntu

Calendar

6월 2025
일 월 화 수 목 금 토
« 4월    
1234567
891011121314
15161718192021
22232425262728
2930  

Recent Posts

  • ubuntu bastion 설정
  • Spring Boot properties 암호화
  • Git Repository Bitbucket과 Issue Tracker Redmine 연동 설정
  • Spring Security 동일 session 제어
  • Spring @Mock, @Mockbean, @InjectMock

Recent Comments

  • pzotov (Ubuntu 14.04에서 Sonarqube 6.7.1 service 등록)
  • cours de theatre paris (AWS ELB와 Auto Scaling 연동, nginx)
  • bayern munich (IntelliJ EAP Font rendering)
  • camiseta del chelsea (OS X에서 APP 아이콘 변경)
  • cheap football shirts replica (jQuery Ajax에서 json Array 직렬화)

Copyright © [the-year] [site-link].

Powered by [wp-link] and [theme-link].