블로그 이미지
Rootrator
1개를 알면 모르는 10개가 튀어나온다..!

calendar

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

Notice

2022. 3. 10. 14:19 Linux

[서버 환경]

CentOS 7.2

 

리눅스에서 PHP Composer 설치는 아래와 같이 curl, 혹은 php -r 옵션을 이용해 설치가 가능하다.

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin/
php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/local/bin/

설치후 symbolic link

sudo ln -s /usr/local/bin/composer.phar /usr/local/bin/composer

하지만 아래와 같은 오류가 나는 경우가 있는데

 

PHP Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in Command line code on line 1 PHP Warning: copy(): Failed to enable crypto in Command line code on line 1 PHP Warning: copy(https://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1

 

 

아래와 같이 해결 가능하다.

 

wget http://curl.haxx.se/ca/cacert.pem

 

php.ini에서 편집

 

openssl.cafile=저장경로/cacert.pem

반응형
posted by Rootrator