- http://localhost:5000/
- login admin/admin
- create user aliyome/
- create base(IP 10.0.3.240) and boot
- shell in host
## terminal setting
# byobu-enable
# echo export VTE_CJK_WIDTH=1 >> ~/.bashrc
# root
sudo -s
# lxc base start and login(ubuntu/ubuntu)
lxc-console -n base
# root
sudo -s
# create user
adduser aliyome
# sudo
echo "aliyome ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
# logout
exit
exit
# login aliyome/
# sudo
sudo -s
# delete default admin user
deluser ubuntu
# logout root
exit
# set locale
sudo echo LANGUAGE=en_US.UTF-8 >> /etc/environment
sudo echo LANG=en_US.UTF-8 >> /etc/environment
sudo echo LC_ALL=en_US.UTF-8 >> /etc/environment
sudo ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
sudo update-locale LANG=en_US.UTF-8
# package install
apt-get install -y git curl gdebi dpkg ufw
# disable ipv6 filtering
cp -p /etc/ufw/ufw.conf /etc/ufw/ufw.conf_`date "+%Y%m%d"`
echo ipv6=no >> /etc/ufw/ufw.conf
# network filter
ufw enable
ufw default DENY
ufw allow 22
# change settings
service ufw restart
# path
echo PATH=\"\$PATH\":/home/aliyome/bin >> ~/.bashrc
# finish settiing
shutdown -h now
- operation in webpanel
- base container shutdown
- clone container base to main
- change main ip : 10.0.3.10
- boot main and base container
- shell in host
# root
sudo -s
# login main container(aliyome/ )
lxc-console -n main
# main sshkey (no pass)
ssh-keygen -t rsa
# main public key -> base authorized_keys
# main container can access all container cloned base one
scp ~/.ssh/id_rsa.pub aliyome@base.:~/authorized_keys
# base container accept main pub key
ssh aliyome@base.
mkdir ~/.ssh
chmod 700 ~/.ssh
mv ~/authorized_keys ~/.ssh/
chmod 600 ~/.ssh/authorized_keys
# finish setting
shutdown -h now
- operation in web panel
- base container shutdown
clone base container as you like.