티스토리 뷰
2009-05-30 02:30:40
시작전에, I’ll just quickly run through where I put stuff on my server. 아파치 로그와 설정은 각각 다음의 우분투 기본 폴더에 있다:
/var/log/apache2
와 /etc/apache2/
.
웹사이트: /home/caius/vhosts/<도메인명>/htdocs
Git 저장소: /home/caius/git/<도메인명>.git
~/projects/somesite.com/에 git 로컬 저장소를 가지고 있고
, 웹서버에 배포하기를 원한다.나는 git 저장소를
~/git/에 보존할것이고,
(ssh를 통해) 저장소에 push하면 변경사항들을 웹사이트의 htdocs 폴더에 자동으로 checkout 하도록 설정할것이다.
DNS는 이미 설정됨을 가정하고 (또는 로컬에서 매핑하기위해 ghost를 사용했다.)
/home/caius/vhosts/somesite.com/htdocs를 가리키도록
아파치 가상호스트를 설정했다 설정이 적용되도록 아파치를 재로딩했다.
원격 서버
bare git 저장소를 만들고 웹사이트 문서루트의 작업트리를 가리키도록 한다. 이는 모든 git stuff가
somesite.git
폴더에 보존했음을 의미한다, 그러나 그들 파일 자신들은 웹사이트의 폴더에 check out 된다. 그러면 저장소에 push된 새로운 변경들로 작업트리 폴더를 업데이트 하기 위해 post-receive 훅을 설정하자.
$ cd git $ mkdir somesite.git $ cd somesite.git/ $ git init --bare Initialized empty Git repository in /home/caius/git/somesite.git/ $ git --bare update-server-info $ git config core.worktree /home/caius/vhosts/somesite.com/htdocs $ git config core.bare false $ git config receive.denycurrentbranch ignore $ cat > hooks/post-receive #!/bin/sh git checkout -f ^D $ chmod +x hooks/post-receive
로컬 서버
그리고 이제 클라이언트에서 원격 저장소를 git remote로 추가하고 그것에 push 하자.
$ git remote add web ssh://myserver/home/caius/git/somesite.git $ git push web +master:refs/heads/master Counting objects: 3, done. Writing objects: 100% (3/3), 229 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To ssh://myserver/home/caius/git/somesite.git * [new branch] master -> master
마무리
유용한 URL들
- http://toroid.org/ams/git-website-howto
- http://www.mblondel.org/journal/2008/05/25/git-memo/
- http://tatey.com/2009/04/29/jekyll-meets-dreamhost-automated-deployment-for-jekyll-with-git.html
'OS-서버-서비스 > Git' 카테고리의 다른 글
5명 이하 용량 무제한 무료 Git 서비스 MS Visual Studio Team Service (0) | 2016.06.09 |
---|---|
Gitlab.com 이슈트래커 Slack 연동 (0) | 2015.12.28 |
댓글
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
- Make Use Of
- How to geek
- 인터넷 통계정보 검색시스템
- 트위터 공유 정보모음
- 웹표준KR
- 치우의 컴맹탈출구
- Dev. Cheat Sheets
- w3schools
- Dev. 조각들
- ASP Ajax Library
- CSS Tricks
- WebResourcesDepot
- jQuery Selectors Tester
- DeveloperSnippets
- Smashing Magazine
- Nettuts+
- devListing
- 웹 리소스 사이트(한)
- Mobile tuts+
- Dream In Code
- Developer Tutorials
- CSS3 Previews
- 자북
- 안드로이드 사이드
- Code Visually
- Code School
- SQLer.com
- 무료 파워포인트 템플릿
- iconPot
- Free PowerPoint Templates
- Design Bombs
- Web Designer Wall
- 1st Webdesigner
- Vandelay Design
- 무료 벡터 이미지 사이트들
- Tripwire Magazine
- Web TrendSet
- WebMonkey
- 윤춘근 프리젠테이션 디자이너 블로그
- cz.cc 무료 DNS
- [웹하드] MediaFire
- [웹하드] DivShare
- 한컴 인터넷 오피스
TAG
- classic asp
- CSS
- API
- Android
- 한글
- mssql
- ASP
- Prototype
- IE
- iphone
- sencha touch
- 안드로이드
- javascript
- Mac
- Wordpress
- nodejs
- Linux
- IOS
- JSON
- 워드프레스
- git
- PHP
- nginx
- Debug
- Docker
- JQuery
- laravel
- centos
- Chrome
- iis
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함