备忘录:配置debian9环境

    http://cdimage.debian.org/cdimage/release/current/amd64/iso-cd/
# psコマンド
apt install -y procps

参考

    • EasyBCDでwindows boot managerからISO bootし、windowsを消してRanchreOSをインストール – Qiita

 

    • debian9 mini.iso

 

    CloudAtCostにdebian9をインストール – Qiita

步骤

virtualbox, tightvncserverをインストールする

deb http://httpredir.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main
sudo -s

apt-get install -y \
  build-essential w3m vim screen tightvncserver openbox \
  xterm linux-headers-4.6.0-1-amd64 man ranger nkf telnet
wget http://download.virtualbox.org/virtualbox/5.0.24/virtualbox-5.0_5.0.24-108355~Debian~stretch_amd64.deb
wget http://download.virtualbox.org/virtualbox/5.0.24/Oracle_VM_VirtualBox_Extension_Pack-5.0.24-108355.vbox-extpack
dpkg -i virtualbox-5.0_5.0.24-108355~Debian~stretch_amd64.deb
apt-get -f install -y
VBoxManage extpack install \
  Oracle_VM_VirtualBox_Extension_Pack-5.0.24-108355.vbox-extpack
gpasswd --add  ユーザー名  vboxusers

VNC服务器的配置

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1

virtualbox &
xterm &

/etc/X11/Xsession
vncserver :1 -geometry 1024x822

其它

rmdir Templates/ Music/ Videos/ Public/

安装 Docker

    Installation on Debian
sudo -s

apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo debian-stretch main" >> /etc/apt/sources.list
apt-get update
apt-get install -y docker-engine docker-compose
gpasswd -a  ユーザ名  docker

PHP7和Apache

httpd:
  image: php:7-apache
  restart: always
  ports:
   - "80:80"
  volumes:
   - /etc/localtime:/etc/localtime:ro
   - ./www/:/var/www/html/:ro
   #- ./config/php.ini:/usr/local/etc/php/php.ini:ro

ufw

sudo -s

apt-get install -y ufw
sed -i 's/IPV6=yes/IPV6=no/g' /etc/default/ufw
ufw default deny
ufw allow 22
ufw allow 80
ufw enable
ufw delete allow 4000/tcp
ufw status verbose
systemctl status ufw
广告
将在 10 秒后关闭
bannerAds