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
# REV21: Sun 11 Feb 2024 20:00
# REV19: Mon 04 Sep 2023 20:00
# REV09: Sun 12 Feb 2023 15:00
# REV07: Sun 31 Jul 2022 21:00
# REV05: Mon 26 Jul 2021 15:00
# START: Tue 18 Jun 2019 16:00
# 
# set-rbenv1.sh installs rubby using rbenlv.
#                       
# Copyright (C) 2019-2024 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
# Try one by one "RUBY"; until it works.
# RUBY="3.0.6"
# RUBY="3.1.4"
RUBY="3.2.3"
# RUBY="3.3.0"


[ -d $HOME/.rbenv ] || git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv
echo "==== ==== ==== ==== ==== ==== ==== source .bash_profile or .profile"
if   [ -f $HOME/.bash_profile ] ; then
  source $HOME/.bash_profile
elif [ -f $HOME/.profile ] ; then
  source $HOME/.profile
fi
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

if   [ -f $HOME/.bash_profile ] ; then
  source $HOME/.bash_profile
elif [ -f $HOME/.profile ] ; then
  source $HOME/.profile
fi
bash set-rbenv1.sh


#!/bin/bash
# REV23: Sun 11 Feb 2024 20: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-2024 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
# Try one by one "RUBY"; until it works.
# RUBY="3.0.6"
# RUBY="3.1.4"
RUBY="3.2.3"
# RUBY="3.3.0"

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

if   [ -f $HOME/.bash_profile ] ; then
  source $HOME/.bash_profile
elif [ -f $HOME/.profile ] ; then
  source $HOME/.profile
fi
bash set-rbenv2.sh


Test: Clone a GitHub Page

INPUT

mkdir -pv $HOME/git/
cd        $HOME/git/
rm -rf    $HOME/git/template/
git clone git@github.com:/yforku/template.git
cd        template/
bundle install
bundle clean --force
if   [ -f $HOME/.bash_profile ] ; then
  source $HOME/.bash_profile
elif [ -f $HOME/.profile ] ; then
  source $HOME/.profile
fi
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-2024 --- C. BinKadal --- About --- Revision: 0168--21-Apr-2024.