ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

๋ฐ˜์‘ํ˜•

โœ… [Ubuntu] ์šฐ๋ถ„ํˆฌ 22.04 jenkins ์„ค์น˜ ๋ฐ ํฌํŠธ๋ณ€๊ฒฝ

jenkins๋Š” ์šฐ๋ถ„ํˆฌ์˜ ๊ธฐ๋ณธ ํŒจํ‚ค์ง€ ๋ ˆํฌ์— ํฌํ•จ๋˜์ง€ ์•Š์•„์„œ ๋ ˆํฌ๋ถ€ํ„ฐ ๋“ฑ๋กํ•ด์•ผํ•จ
ํ˜น์‹œ java ์„ค์น˜ ์•ˆ๋˜์–ด์žˆ์œผ๋ฉด ์•ž์— ํฌ์ŠคํŒ… ๋ณด๊ณ  ์„ค์น˜

2024.07.17 - [๐Ÿ“บ Develop/๐Ÿ•‹ Server] - [Ubuntu] 22.04 ์šฐ๋ถ„ํˆฌ java ์„ค์น˜ ๋ฐ ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •

โœ… Jenkins ์„ค์น˜

# ์„œ๋ช…ํ‚ค๋ฐœ๊ธ‰๊ณผ๋“ฑ๋ก
curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
  
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null

# ์—…๋ฐ์ดํŠธ
sudo apt update

# ์„ค์น˜
sudo apt install jenkins

โœ… ํฌํŠธ ๋ณ€๊ฒฝ

sudo vi /etc/default/jenkins

 

์›ํ•˜๋Š” ํฌํŠธ๋ฒˆํ˜ธ๋กœ ๋ณ€๊ฒฝ

 

sudo vi /etc/init.d/jenkins

์›ํ•˜๋Š” ํฌํŠธ๋ฒˆํ˜ธ๋กœ ๋ณ€๊ฒฝ

# ํŒŒ์ผ์˜ ๊ถŒํ•œ์„ ๋ฐ”๊ฟ”์„œ ์ˆ˜์ •
sudo chmod 777 /usr/lib/systemd/system/jenkins.service

# ํฌํŠธ๋ฒˆํ˜ธ ๋ณ€๊ฒฝ
sudo vi /usr/lib/systemd/system/jenkins.service

Environment="JAVA_OPTS=-Xmx1024m -Xms1024m -Djava.awt.headless=true"

# ๊ถŒํ•œ ์›์ƒ๋ณต๊ท€
sudo chmod 444 /usr/lib/systemd/system/jenkins.service

์›ํ•˜๋Š” ํฌํŠธ๋ฒˆํ˜ธ๋กœ ๋ณ€๊ฒฝ
jenkins ๋ฉ”๋ชจ๋ฆฌ ๋งŽ์ด ๋จน์œผ๋‹ˆ ์ œํ•œ๊ฑธ๊ธฐ

# ์  ํ‚จ์Šค ์žฌ์‹œ์ž‘
service jenkins restart

# ์  ํ‚จ์Šค systemctl restart jenkins

# localhost:8880 ์ ‘์†

# ์ดˆ๊ธฐ ๋น„๋ฐ€๋ฒˆํ˜ธ
vi /var/lib/jenkins/secrets/initialAdminPassword

# ๋
๊ณต์ง€์‚ฌํ•ญ
์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
์ตœ๊ทผ์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€
Total
Today
Yesterday
๋งํฌ
ยซ   2024/12   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
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
๊ธ€ ๋ณด๊ด€ํ•จ
๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (80)
๐Ÿ“บ Develop (0)
๐ŸŒ‹ Error Fixed (5)
๐Ÿ— Tool (5)
๐Ÿ’ป MacBook M1 (15)
๐Ÿ“ฆ ETC (1)

์ด ํฌ์ŠคํŒ…์€ ์ฟ ํŒก ํŒŒํŠธ๋„ˆ์Šค ํ™œ๋™์˜ ์ผํ™˜์œผ๋กœ, ์ด์— ๋”ฐ๋ฅธ ์ผ์ •์•ก์˜ ์ˆ˜์ˆ˜๋ฃŒ๋ฅผ ์ œ๊ณต๋ฐ›์Šต๋‹ˆ๋‹ค.