« Termux(ubuntuも含む)メモ | トップページ | LinuxBrew install memo »

2018年11月10日 (土)

Termux Ubuntu/Debian Install memo


Termux Ubuntu/Debian Install memo

0.概要
Termux-Ubuntu/Debianについて、まとめた。
Ubuntuのほうは、参考URLのとおりでインストールできたが、Debianのほうは、そのままではインストールできず、以下の方法でインストールした。

1.Termux-Ubuntu

pkg install wget proot
mkdir -p ~/jails/ubuntu
cd ~/jails/ubuntu
wget https://raw.githubusercontent.com/Neo-Oli/termux-ubuntu/master/ubuntu.shls
bash ubuntu.sh

./start-ubuntu

cat /etc/lsb-release
apt-get install tzdata
#dpkg-reconfigure tzdata

apt-get install net-tools
apt-get install wget git
apt-get install build-essential

2.Termux-Debian

mkdir jails
cd jails
mkdir debian
cd debian

pkg install debootstrap proot wget

# Check your architecture with:
uname -m
aarch64

debootstrap --arch=arm64 stable stable http://ftp.debian.org/debian/
# ARCH is arm64 for aarch64, etc.

# uname-m が以下の場合:
#x86_64
#sudo debootstrap --arch=amd64 stable stable http://ftp.debian.org/debian/

mkdir binds

nano start-debian.sh
# 以下のスクリプトを、start-debian.shとして作成する:
<-------------------------------------------------------
#!/data/data/com.termux/files/usr/bin/bash
cd $(dirname $0)
## unset LD_PRELOAD in case termux-exec is installed
unset LD_PRELOAD
command="proot"
command+=" --link2symlink"
command+=" -0"
command+=" -r stable"
if [ -n "$(ls -A binds)" ]; then
for f in binds/* ;do
. $f
done
fi
command+=" -b /dev"
command+=" -b /proc"
## uncomment the following line to have access to the home directory of termux
#command+=" -b /data/data/com.termux/files/home:/root"
## uncomment the following line to mount /sdcard directly to /
#command+=" -b /sdcard"
command+=" -w /root"
command+=" /usr/bin/env -i"
command+=" HOME=/root"
command+=" PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games"
command+=" TERM=$TERM"
command+=" LANG=C.UTF-8"
command+=" /bin/bash --login"
com="$@"
if [ -z "$1" ];then
exec $command
else
$command -c "$com"
fi
>-------------------------------------------------------

chmod a+x start-debian.sh
./start-debian.sh

# 以下からDebianを動作する

apt-get update
apt-get upgrade

cat /etc/lsb-release
apt-get install tzdata
#dpkg-reconfigure tzdata

apt-get install net-tools
apt-get install wget git
apt-get install build-essential

# 以下、任意のものをインストールする:
apt-get install pulseaudio
apt-get install xorg gnome vnc4server
vnc4server

3.参考URL
https://wiki.termux.com/wiki/Debian
Debian
https://wiki.termux.com/wiki/Ubuntu
Ubuntu

以上

|

« Termux(ubuntuも含む)メモ | トップページ | LinuxBrew install memo »

linux」カテゴリの記事

Termux」カテゴリの記事

コメント

この記事へのコメントは終了しました。

トラックバック


この記事へのトラックバック一覧です: Termux Ubuntu/Debian Install memo:

« Termux(ubuntuも含む)メモ | トップページ | LinuxBrew install memo »