dev/linux 44

[Git] 서버 배포 설정 From 리모트 레파지토리(bare 레파지토리 활용)

bare 레파지토리를 활용하여, .git디렉토리가 분리된 배포를 수행할 수 있다. 예제 변수 리모트 레파지토리: git@remote-repository:user/project.git 배포 디렉토리: /var/www/html 브랜치: master 깃 디렉토리: /home/user/repo/project.git 1. bare 레파지토리 생성 mkdir ~/repo cd ~/repo git clone --bare git@remote-repository:user/project.git 2. 배포 git --work-tree=/var/www/html --git-dir=/home/user/repo/project.git checkout -f master 이 후엔 쉘 스크립트를 활용한, checkout & pull(fe..

dev/linux 2019.08.26

[Troubleshooting] php-fpm 504 Gateway Time-out

nginx + php-fpm 조합으로 서버를 사용중인데, 갑자기 서버가 반응이 느려지더니 504 Gateway Time-out 발생함. /var/log/php-fpm/error.log를 확인하니 WARNING: [pool www] child xxxx said into stderr: "ERROR: Unable to set php_value 'soap.wsdl_cache_dir'" 라고 적혀있다. /etc/php-fpm.d/www.conf 를 열어보니 php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache 로 되어있다. 해당 경로로 가보니 단순한 권한 문제가 있어 보여서 수정했지만, 문제는 해결되지 않았다. session_start(); 에서 문제가 발생함을 확인..

dev/linux 2019.07.26

깃 디플로이 (Deployment from Git)

Git은 정말 훌륭한 도구이다. 현재로썬 버전관리의 끝판왕? 인지라..쓰기는 쉽지만, 잘쓰기는 어려울 툴이다.ㅠㅠ 원격 깃 저장소로부터 실제 운영 서버로 디플로이를 해야할 때,자동화 스크립트는 생성하는 방법이다. 추가로 hook같은 건 제외하겠다. 레파지토리 path : /home/www/repos/mysite.git디플로이 path : /home/www/html 서버의 로컬 레파지토리 생성--bare 는 소스파일없는 .git폴더($GIT_DIR)로써, 이력만 관리한다는 뜻(remote정보가 없음, fetch시 메인 리포를 지정필요)--mirror 도 --bare에 추가로 remote정보가 포함됨cd /home/wwwmkdir repos && cd reposgit clone --mirror ssh://g..

dev/linux 2017.03.01