Bibi's DevLog ๐Ÿค“๐ŸŽ

๋ฐฐํฌ ์„œ๋ฒ„์— ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •ํ•˜๊ธฐ ๋ณธ๋ฌธ

๐Ÿ–ฅ BE ๋ฐฑ์—”๋“œ/AWS

๋ฐฐํฌ ์„œ๋ฒ„์— ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •ํ•˜๊ธฐ

๋น„๋น„ bibi 2021. 6. 11. 23:22

๋ฐฐํฌ ์„œ๋ฒ„์— ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •ํ•˜๊ธฐ

์ธํ…”๋ฆฌ์ œ์ด์—์„œ ๋“ฑ๋กํ•ด ๋†“์€ ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ๋ฐฐํฌ ์„œ๋ฒ„์—๋„ ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค.

https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-environment-variables-in-linux/ ์˜ "Persisting Environment Variables for a User" ํ•ญ๋ชฉ์„ ๋”ฐ๋ผํ•œ๋‹ค.

  1. vi ~/.bash_profile
  2. ํ•ด๋‹น ํŒŒ์ผ์— ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์ด๋ฆ„๊ณผ ๊ฐ’์„ ์„ค์ • (์•„๋ž˜๋Š” ๊ทธ ์˜ˆ์‹œ)
export BASE_IP=public์„œ๋ฒ„ip์ฃผ์†Œ
export USERNAME=์•„์ด๋””
export PASSWORD=๋น„๋ฐ€๋ฒˆํ˜ธ
export JASYPT_PASSWORD=์‹œํฌ๋ฆฟํ‚ค
  1. source ~/.bash_profile ๋ช…๋ น์–ด๋กœ ํ•ด๋‹น ์„ค์ • ํŒŒ์ผ์„ ๋“ฑ๋ก

์ด์ œ ์ž๋ฐ” jarํŒŒ์ผ์— ํ™˜๊ฒฝ๋ณ€์ˆ˜๋กœ ์„ค์ •ํ•œ ๋ถ€๋ถ„๋“ค์ด bash_profile ์น˜ํ™˜๋˜์–ด ์‹คํ–‰๋œ๋‹ค!