Guest User

Untitled

a guest
Dec 16th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. # 환경 변수를 설정하는 파일을 생성한다.
  2. echo '#!/bin/sh' >> config.sh
  3. echo export DB_USER=dbuser >> config.sh
  4. echo export DB_HOST=database.server.com >> config.sh
  5. echo export DB_DATABASE=mydb >> config.sh
  6. echo export DB_PASSWORD=secretpassword >> config.sh
  7. echo export DB_PORT=5432 >> config.sh
  8.  
  9. # 실행 가능한 파일로 변경한다.
  10. chmod +x config.sh
  11.  
  12. # 셸이 시작될 때 호출되는 위치로 이동한다. 아래는 Ubuntu 기준이며 필요에 따라 변경한다.
  13. mv config.sh /etc/profile.d/config.sh
Add Comment
Please, Sign In to add comment