Composer root 경고메시지 해제

Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
How to set COMPOSER_ALLOW_SUPERUSER
root 경고메시지 해제

1 문제상황[ | ]

root@zetawiki:~# composer -V
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
Composer version 1.1.1 2016-05-17 12:25:44
→ root 계정으로 composer 를 실행하면 경고 메시지가 뜬다...

2 임시 적용[ | ]

root@zetawiki:~# export COMPOSER_ALLOW_SUPERUSER=1
root@zetawiki:~# env | grep COMPOSER_ALLOW_SUPERUSER
COMPOSER_ALLOW_SUPERUSER=1
root@zetawiki:~# composer -V
Composer version 1.1.1 2016-05-17 12:25:44
→ 현재 세션에 적용됨

3 영구 적용[ | ]

root@zetawiki:~# echo "export COMPOSER_ALLOW_SUPERUSER=1" >> ~/.bashrc
root@zetawiki:~# cat ~/.bashrc | grep export
export LANG=en_US.UTF-8
export COMPOSER_ALLOW_SUPERUSER=1
.bashrc에 등록하면 다음번 SSH 접속시부터 계속 적용됨

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}