[Orchard 강좌] 32. Command-Line Interface 사용하기
이 내용은 ASP.NET MVP로 활동하고 계신 박용준님이 작성하신, 오픈소스 기반 웹사이트 제작 엔진인 Orchard로 처음 웹사이트를 구축 및 개발하기 위한 시리즈 강좌입니다. 많은 도움 되시길 바랍니다.
==================================================================================================
소개
본 강좌는 지난 번 다뤄본 Orchard.exe에 대한 내용과 중복되는 내용입니다.
Orchard.exe
Orchard CMS는 웹에서 대부분을 관리하는 기능을 제공합니다. 하지만, 웹이 아닌 데스크톱 환경에서 추가적인 기능을 확장한다거나, Orchard에 대한 관리를 하고자할 때 유용하게 사용할 수 있는 명령줄 도구인 Orchard.exe 파일을 제공합니다.
이 도구는 Orchard 웹 사이트의 bin 폴더에 위치합니다. Windows 탐색기를 사용하여 Orchard.exe 파일을 열려면, bin 폴더에 SHIFT 버튼을 누른 후 마우스 오른쪽 버튼을 클릭하면, [여기서 명령 창 열기] 메뉴가 나타납니다. 이를 선택하면, 아래 그림처럼 bin 폴더까지 도스창을 열어 볼 수 있습니다.(경우에 따라서는 직접 타이핑해서 들어와도 무관합니다.)
그런 후 Orchard.exe 명령어를 타이핑 후 엔터 키를 입력하면, Orchard 명령 프롬프트가 열립니다.
Orchard에 대한 도움말
Orchard.exe 실행 후 관련된 도움말을 살펴보려면, 아래 그림과 같이 “help commands” 명령어를 입력합니다.
Orchard.exe가 실행 중일 때에는 Orchard 소스를 가지고, 명령 프롬프트 환경에서 Orchard CMS를 설치할 수도 있습니다.
도움말 목록
아래 리스트는 주요 명령어에 대한 샘플 도움말을 나타냅니다.
orchard> help commands
List of available commands:
---------------------------
blog create /Slug:<slug> /Title:<title> /Owner:<username> [/MenuText:<menu text>]
Creates a new Blog
blog import /Slug:<slug> /FeedUrl:<feed url> /Owner:<username>
Import all items from <feed url> into the blog at the specified <slug>
cultures get site culture
Get culture for the site
cultures list
List site cultures
cultures set site culture <culture-name>
Set culture for the site
feature disable <feature-name-1> ... <feature-name-n>
Disable one or more features
feature enable <feature-name-1> ... <feature-name-n>
Enable one or more features
feature list [/Summary:true|false]
Display list of available features
help <command>
Display help text for <command>
help commands
Display help text for all available commands
package create <extensionName> <path>
Create a package for the extension <extensionName>
(an extension being a module or a theme).
The package will be output at the <path> specified.
The default filename is Orchard.[Module|Theme].<extensionName>.<extensionVersion>.nupkg.
For example, "package create SampleModule c:\temp" will create the package
"c:\temp\Orchard.Module.SampleModule.1.0.0.nupkg".
package install <packageId> <location> /Version:<version>
Install a module or a theme from a package file.
package uninstall <packageId>
Uninstall a module or a theme.
The <packageId> should take the format Orchard.[Module|Theme].<extensionName>.
For example, "package uninstall Orchard.Module.SampleModule" will uninstall the Module under the "~/Modules/SampleModule" directory and
"package uninstall Orchard.Theme.SampleTheme" will uninstall the Theme under the "~/Themes/SampleTheme" directory.
user create /UserName:<username> /Password:<password> /Email:<email>
Creates a new User
도움말 사용 예
Orchard 에서 사용되는 특정 모듈 또는 테마에 대한 활성화/비활성화 여부를 목록으로 출력하고자 한다면, “feature list/Summary:true” 명령어로 실행할 수 있습니다. 또한, 비활성화 되어있는 feature(모듈/테마)에 대하여 활성화시키려면 “feature enable <feature-name>” 명령어 등을 사용할 수 있습니다.
끝.
관련글
- 0. Orchard CMS 소개
- 1. Orchard CMS 개발 환경 구축–WebPlatformInstaller 3 다운 및 설치
- 2. Orchard CMS 설치
- 3. 페이지(Pages) 추가하기
- 4. 블로그 모듈 추가 및 아티클 작성하기
- 5. 위젯(Widet)으로 메인에 HTML 조각 삽입하기
- 6. 다국어 처리 : 한글 언어팩 설치
- 7. 미디어(이미지…) 관리
- 8. 레이어(Layer) 만들기
- 9. Windows Live Writer를 사용하여 블로그 아티클 작성하기
- 10. 위젯(Widget) 추가 및 빙맵(BingMap) 모듈 적용하기
- 11. Chapters 모듈 설치 및 적용
- 12. 검색(Search) 기능 구현하기
- 13. Content Localization(컨텐트에 대한 다국어 처리)
- 14. 테마(Theme) 다운로드 및 적용
- 15. 새로운 나만의 테마(Theme) 만들기(자식 테마 만들기)
- 16. 사용자 정의 Content Type 만들기
- 17. 리스트(List)로 Content Type 그룹화
- 18. Designer Tools로 UI의 원하는 부분 변경하기
- 19. Placement.info 파일 이해하기
- 20. 리스트(List)를 위젯(Widget)으로 표현하여 요약 출력하기
- 21. Orchard 사이트 설정 변경
- 22. Orchard.exe 소개 및 사용 데모
- 23. 사용자(Users)와 역할(Roles) 관리
- 24. 초간단 모듈 제작 : HelloWorld 모듈 만들기
- 25. 추가 모듈 다운 및 적용 : FollowMe 모듈
- 26. 최근 트위터(Twitter) 목록 나열하기
- 27. 파일 필드 모듈 적용하기(파일 업로드 및 다운로드)
- 28. Orchard CMS를 원격 서버로 배포
- 29. Orchard CMS를 SQL Server R2에 설치하기
- 30. Orchard CMS 테마 시안 잡기(순수 HTML/CSS 레벨)
- 31. 페이지 추가시 “add a widget layer” 링크를 사용하여 페이지에 특화된 레이어 만들기
- 32. Command-Line Interface 사용하기