無料で自分専用CMSを運用する方法(OctoPress + OpenShift編)
前提(環境)
- 自分の手元
- Mac
- Web
- OpenShift
準備
- OpenShiftのSignUp
-
gem install rhc
しておく(自分の手元)- installの初期セットアップでOpenShiftとのSSH設定も行われる
手順
-
OpenShiftでの作業
- Ruby1.9.3以上を作成する
- Application画面の右下に出ている"SourceCode"の下にある
ssh:〜
をコピーしておく
-
手元の作業
- 好きなフォルダーを作る
git clone git://github.com/imathis/octopress.git octopress && cd octopress
sudo gem install bundler
rbenv rehash
bundle install
rake install
cd ..
mkdir _deployment && cd _deployment
cp ../octopress/config.ru .
cp ../octopress/Gemfile .
bundle install
mkdir public/
git init .
-
git remote add openshift URI
ここで指定するURIはOpenShiftの2.の作業のURI git add .
git commit -am 'initial deploy'
cd ..
mv _deployment octopress
cd octopress
- Rakefileの内容をRakefile@gistで上書きし、保存
git add _deployment/
rake new_post['Hello World']
- 22.で作成したファイルを編集し、保存する
rake generate
rake gen_deploy
簡単な操作方法
記事の作成
rake new_post['title']
記事の内容を確認
rake preview
- http://localhost:4000にアクセス
記事をOpenShiftにアップロード
rake gen_deploy
参考サイト
Author And Source
この問題について(無料で自分専用CMSを運用する方法(OctoPress + OpenShift編)), 我々は、より多くの情報をここで見つけました https://qiita.com/Gaddict/items/8d30e7d11e3d7f829435著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .