Default
Installing Jekyll On Debian
C. BinKadal --- Sendirian, Berhad


PART 2: User Mode

(user) Test X11 with xclock

ssh -X -p 6023 cbkadal@localhost

xclock


assets/scripts/clean-home.sh

#!/bin/bash
# REV05: Sun 31 Jul 2022 09:00
# REV04: Mon 15 Feb 2021 23:00
# START: Tue 18 Jun 2019 14:00
#
# clean-home.sh purges whatever was installed 
#               previously at $HOME.
# 
# Copyright (C) 2019-2022 C. BinKadal, Sdn. Bhd.
# This is a free script. It is distributed in the 
# hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY 
# or FITNESS FOR A PARTICULAR PURPOSE.

RMOPT="-rfv"

DELETE="
   $HOME/.bundle/
   $HOME/.gem/
   $HOME/.gemrc
   $HOME/gems/
   $HOME/.rvm/
   $HOME/.rbenv/
"

for II in $DELETE ; do
   [ -f $II ] && (echo "Delete file   $II"; rm $RMOPT $II)
   [ -d $II ] && (echo "Delete folder $II"; rm $RMOPT $II)
done

exit 0

wget https://doit.vlsm.org/assets/scripts/clean-home.sh

bash clean-home.sh


export PATH="$HOME/.rbenv/bin:$PATH"
[ -d $HOME/.rbenv/bin/ ] && eval "$(rbenv init -)"


RBENV

#!/bin/bash
# REV09: Sun 12 Feb 2023 15:00
# REV08: Fri 12 Aug 2022 21:00
# REV07: Sun 31 Jul 2022 21:00
# REV05: Mon 26 Jul 2021 15:00
# REV02: Wed 17 Feb 2021 15:00
# START: Tue 18 Jun 2019 16:00
# 
# set-rbenv1.sh installs rubby using rbenlv.
#                       
# Copyright (C) 2019-2023 C. BinKadal, Sdn. Bhd.
# This is a free script. It is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.

# See also set-rbenv2.sh
# PS: Github-Pages uses Jekyll 3.9, which isn’t compatible with Ruby 3.
# Downgrading to Ruby 2.7 should avoid the problem (chuckhoupt, 2021).
# Try until it works.
# RUBY="2.7.7"
# RUBY="3.0.5"
# RUBY="3.1.3"
RUBY="3.2.1"

[ -d $HOME/.rbenv ] || git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv
echo "==== ==== ==== ==== ==== ==== ==== source .bash_profile"
source $HOME/.bash_profile
echo "==== ==== ==== ==== ==== ==== ==== rbenv init"
[ -d $HOME/.rbenv/bin/ ] && eval "$(rbenv init -)"
sync
echo "==== ==== ==== ==== ==== ==== ==== type rbenv"
type rbenv
echo "==== ==== ==== ==== ==== ==== ===="
[ -d $HOME/.rbenv/plugins/ ] || git clone https://github.com/rbenv/ruby-build.git $HOME/.rbenv/plugins/ruby-build
echo "==== ==== ==== ==== ==== ==== ==== rbenv install -l"
rbenv install -l
echo "==== ==== ==== ==== ==== ==== ==== rbenv install $RUBY"
rbenv install $RUBY --verbose

exit 0

wget https://doit.vlsm.org/assets/scripts/set-rbenv1.sh

source $HOME/.bash_profile
bash set-rbenv1.sh


#!/bin/bash
# REV21: Sun 12 Feb 2023 15:00
# REV19: Sun 31 Jul 2022 22:30
# REV15: Mon 31 Jan 2022 17:00
# REV14: Mon 26 Jul 2021 15:00
# REV10: Wed 17 Feb 2021 15:00
# START: Tue 18 Jun 2019 16:00
#
# set-rbenv2.sh installs the bundler.
#
# Copyright (C) 2019-2023 C. Binkadal, Sdn. Bhd.
# This is a free script. It is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.

# See also set-rbenv1.sh
# PS: Github-Pages uses Jekyll 3.9, which WAS NOT compatible with Ruby 3.
# Downgrading to Ruby 2.7 should avoid the problem (chuckhoupt, 2021).
# Try until it works.
# RUBY="2.7.7"
# RUBY="3.0.5"
# RUBY="3.1.3"
RUBY="3.2.1"

echo "==== ==== ==== ==== ==== ==== ==== rbenv init"
[ -d $HOME/.rbenv/bin/ ] && eval "$(rbenv init -)"
echo "==== ==== ==== ==== ==== ==== ==== rbenv global $RUBY"
rbenv global $RUBY
echo "==== ==== ==== ==== ==== ==== ==== ruby -v"
ruby -v
echo "==== ==== ==== ==== ==== ==== ==== .gemrc"
echo "gem: --no-document" > $HOME/.gemrc
echo "==== ==== ==== ==== ==== ==== ==== gem install bundler"
gem install bundler jekyll
# gem install bundler rails

exit 0

wget https://doit.vlsm.org/assets/scripts/set-rbenv2.sh

source $HOME/.bash_profile
bash set-rbenv2.sh


Test: Clone a GitHub Page

INPUT

cd $HOME
[ -d git/ ] || mkdir git
cd git
rm -rf os888
git clone https://github.com/cbkadal/os888.git
cd os888
bundle install
bundle clean --force
source $HOME/.bash_profile
bundle exec jekyll serve -H 0.0.0.0

Test “localhost:5000” on Host

On VirtualBox, do not forget to redirect port 127.0.0.1:5000 (Host) to port 10.0.2.15:4000 (Guest).



© 2021-2023 --- C. BinKadal --- About --- Revision: 0096--18-May-2023.