# ์‚ฌ์šฉ๋ฒ•

# 1. ๋ฃจ๋น„์„ค์น˜

yum install ruby
ruby -v

* ruby update
yum install curl gcc gcc-c++, readline-devel, zlib-devel, libyaml-devel, libffi-devel, openssl-devel, autoconf, automake, libtool, bison
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -

curl -L https://get.rvm.io | bash -s stable --ruby
curl -L https://get.rvm.io | bash -s stable --ruby=2.6.10


source /etc/profile.d/rvm.sh
or source /home/azureadmin/.rvm/scripts/rvm

rvm reload
rvm install 2.6.10
rvm reinstall ruby-2.6.10
ruby -v

# rbenv

# rbenv ์„ค์น˜
yum install rbenv ruby-build
# rbenv ์„ค์น˜ ํ™•์ธ
rbenv versions
# ๋ฒ„์ „
rbenv install -l

rbenv install 2.2.4
rbenv global 2.6.10
ruby -v

yum install -y libssl-dev

# 2. ์ง€ํ‚ฌ (Jekyll) ์„ค์น˜ํ•˜๊ธฐ

gem install jekyll
gem install minima
gem install bundler
gem install jekyll-feed
gem install tzinfo-data

# 3. ๋กœ์ปฌ์—์„œ ๋ธ”๋กœ๊ทธ ์ƒ์„ฑํ•˜๊ธฐ

jekyll new my-awesome-site
cd my-awesome-site
bundle exec jekyll serve
bundle add webrick

## ๋ธ”๋กœ๊ทธ ์ €์žฅ ํด๋”๋กœ ์ด๋™ํ•œ๋‹ค.
## ์ธ์ฝ”๋”ฉ ์—๋Ÿฌ ๋ฐœ์ƒ์‹œ ๋‹ค์Œ์˜ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•œ๋‹ค.
chcp 65001

# ์ง€ํ‚ฌ ์‹คํ–‰
bundle install
jekyll serve

bundle exec jekyll serve --host 0.0.0.0 --port 4000 > /dev/null 2>&1 &

kill $(ps aux | grep '[j]ekyll' | awk '{print $2}')

# ํ…Œ๋งˆ๋ณ€๊ฒฝ

gem install just-the-docs
bundle show just-the-docs

## 1. Gemfile ์— ๋‹ค์Œ์„ ์ถ”๊ฐ€
gem "just-the-docs"

## 2. _config.yml ํŒŒ์ผ์— ๋‹ค์Œ์„ ์ถ”๊ฐ€
theme: just-the-docs

## 3. ํ„ฐ๋ฏธ๋„์—์„œ ๋‹ค์Œ์„ ์‹คํ–‰
bundle install


# Azure์—์„œ Jekyll์„ bat๋กœ ์‹คํ–‰ํ•˜๊ธฐ
Azure์— Jekyll ์„ค์ •์„ ์™„๋ฃŒํ•˜๊ณ , ์›๊ฒฉ์—์„œ ์‹คํ–‰ํ•˜๋ ค๋ฉด host๋ฅผ 0.0.0.0๋กœ ์„ธํŒ…ํ•ด์•ผ ํ•˜์ง€๋งŒ,
Azure์˜ ๊ฐ€์ƒํ™˜๊ฒฝ์˜ ๊ฒฝ์šฐ DNS์ฃผ์†Œ๋กœ host๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์—†์„ ๋•Œ, _site๋Š” DNS์ฃผ์†Œ๋กœ ์ƒ์„ฑํ•˜๊ณ 
์‹คํ–‰ ์‹œ์—๋Š” ์›๊ฒฉ์—์„œ ์‹คํ–‰ํ•˜๋Š” ํ˜•ํƒœ๋กœํ•˜๊ณ  build๋ฅผ ํ•˜์ง€ ์•Š๋„๋ก ํ•ด์„œ ์ฒ˜๋ฆฌํ•จ


cd C:\DEV\workspace\f5074.github.io
:start cmd /c bundle exec jekyll serve --host f5074.koreacentral.cloudapp.azure.com --port 4000
:timeout /t 10
:bundle exec jekyll serve --skip-initial-build --host 0.0.0.0 --port 4000

cmd /c bundle exec jekyll serve --host f5074.koreacentral.cloudapp.azure.com --port 4000
IF "%ERRORLEVEL%" == "0" goto ERROR
ELSE goto EXEC

:EXEC
bundle exec jekyll serve --skip-initial-build --host 0.0.0.0 --port 4000

:ERROR
echo error
pause

# CentOS ๋ฐฉํ™”๋ฒฝ

#### ๋ฐฉํ™”๋ฒฝ ์ƒํƒœ ํ™•์ธ
firewall-cmd --state

#### ๋ฐฉํ™”๋ฒฝ ์„ค์น˜
sudo yum install firewalld
sudo systemctl enable firewalld
sudo systemctl start firewalld

#### ์„œ๋น„์Šค๋กœ ๋ฐฉํ™”๋ฒฝ ํ•ด์ œ / ์ œ๊ฑฐ
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https

sudo firewall-cmd --permanent --remove-service=http
sudo firewall-cmd --permanent --remove-service=http

#### ํŠน์ • ํฌํŠธ ๋ฐฉํ™”๋ฒฝ ํ•ด์ œ
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --permanent --remove-port=8080/tcp

#### ๋ฐฉํ™”๋ฒฝ์„ค์ •์ดํ›„ reload ํ•„์š”
sudo firewall-cmd --reload
firewall-cmd --list-all

systemctl stop firewalld
systemctl start firewalld
systemctl status firewalld

# jekyll setting on docker

yum install ruby
ruby -v
yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel
gem install jekyll
yum install which
curl -L https://get.rvm.io | bash -s stable --ruby
curl -L https://get.rvm.io | bash -s stable --ruby=2.6.10
yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel
git clone https://github.com/sstephenson/rbenv.git .rbenvcd
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec $SHELL
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
exec $SHELL
yum install which
curl -L https://get.rvm.io | bash -s stable --ruby
curl -L https://get.rvm.io | bash -s stable --ruby=2.6.10
source /etc/profile.d/rvm.sh
rvm install 2.6.10
cd ~
ls -al
git clone https://github.com/sstephenson/rbenv.git .rbenvcd
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec $SHELL
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
exec $SHELL
ll
netstat -tnlp
i
bundle exec jekyll serve --skip-initial-build --host 0.0.0.0 --port 8088 > /dev/null 2>&1 &

# reference

https://shryu8902.github.io/_posts/2018-06-22-jekyll-on-windows/
https://min9nim.github.io/2018/07/jekyll-theme/
๋ฐฑ๊ทธ๋ผ์šด๋“œ์‹คํ–‰: https://taewooblog.tistory.com/152
๋ฐฉํ™”๋ฒฝํ•ด์ œ: https://ux.stories.pe.kr/162
Last Updated: 4/13/2025, 11:14:44 PM