一、 安装
#安装jeklly
https://dandelioncloud.cn/article/details/1524755285050953730/
配置、添加源:
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
gem sources -l
gem sources -u
安装jeklly,安装命令:(sudo命令无)
gem install jekyll bundler
gem install jekyll
防火墙查看
sudo ufw status
sudo ufw allow 4000
sudo ufw enable
安装ruby
$ ./configure
$ make
$ sudo make install
ruby -v
安装rvm
21 sudo apt install curl
22 curl -L https://get.rvm.io | bash -s stable
23 source ~/.rvm/scripts/rvm
24 rvm requirements
用rvm安装
查看版本:
rvm list known
查询已经安装的 ruby
rvm list
rvm install ruby #默认安装最新版本
查询版本:
ruby -v
查看及安装版本gem
rvm rubygems current
rvm install rubygems 3.2.3
gem -v
二、启动及应用记录:****
创建及启动:
cd /home
jekyll new idrootblog
cd idrootweb
jekyll server --host 172.16.200.228 &
--运行方式:
$ cd your_project_path
配置bundle国内镜像仓库
bundle config mirror.https://rubygems.org https://gems.ruby-china.com
$ bundle install
$ bundle exec jekyll server
bundle exec jekyll server --host 172.16.200.228
切换端口命令:
运行bundle exec jekyll serve --port 4001
新主题:
[email protected]:jeffreytse/jekyll-theme-yat.git
--直接安装插件,执行
92 gem install jekyll-theme-yat
93 bundle install
94 bundle exec jekyll server --host 172.16.200.228