meigea / kali-penetration-testing

个人kali渗透测试的相关笔记
5 stars 2 forks source link

Kali最简安装和相关准备的配置以及安装Docker的尝试 #1

Open meigea opened 5 years ago

meigea commented 5 years ago

Kali-2018.04-Min 安装

#kali官方源
deb http://http.kali.org/kali kali-rolling main non-free contrib
#中科大的源
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb http://mirrors.ustc.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main contrib non-free
deb http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free

安装一般的需要工具


apt-get install wget curl git gcc \ 
gcc-c++ make glib zip unzip net-tools  

安装docker

1、创建一个backports文件并添加Debian Wheezy的条目:

echo 'deb http://http.debian.net/debian wheezy-backports main' > /etc/apt/sources.list.d/backports.list && apt-get update

2、安装ca证书并允许APT通过https运行:

apt-get install apt-transport-https ca-certificates

3、添加适当的GPG密钥:

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

4、添加适当的Docker源条目:

echo 'deb https://apt.dockerproject.org/repo debian-wheezy main' > /etc/apt/sources.list.d/docker.list && apt-get update

5、安装Docker并启动其服务:

apt-get install docker-engine && service docker start

6、验证Docker是否正常工作:

docker run hello-world

7、增加自己的源


## 模拟成Ubuntu进行安装
```sh
apt-get purge docker.io

apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.daocloud.io/docker/linux/ubuntu/gpg | sudo apt-key add -

# apt-get -y install apt-utils && \ 
# add-apt-repository "deb [arch=amd64] https://download.daocloud.io/docker/linux/ubuntu $(lsb_release -cs) stable"

cat >  << EOF
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
EOF
echo "deb [arch=amd64] https://download.daocloud.io/docker/linux/ubuntu xenial stable" > /etc/apt/source.list.d/docker.list

apt-get update
apt-cache policy docker-ce*
apt-get install docker-ce

curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://d1c9c786.m.daocloud.io
systemctl restart docker