ubuntu 18.04.6:
sudo docker pull centos:7
sudo docker run -i -t centos:7 /bin/bash
docker.centos:
yum install cmake make gcc g++ flex bison libpcap-dev libssl-dev python-dev swig zlib1g-dev
yum list | grep initscripts
yum install initscripts.x86_64
docker.centos.install.ssh:
yum -y install net-tools
yum install -y openssh-clients.x86_64 openssh.x86_64
ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ''
ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N ''
vi /etc/ssh/sshd_config
1.将Port 22 前面的注释去掉(开启22号端口)
2.将PermitRootLogin的no改为yes(这里是设置允许root用户登录,可根据自己需求决定是否开启)
/usr/sbin/sshd -D &
passwd root
docker.centos.install.zeek(5.0.4):
yum install libpcap-devel.x86_64
yum install python-pip python3-pip
yum install python3-devel.x86_64
./configure
make -j4(4 thread need more than 8Gb mem)
make install
docker.centos.install.cmake(3.15+):
yum install -y libxml2 libxml2-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel zstd libzstd-devel curl libpng libpng-devel
wget https://cmake.org/files/v3.21/cmake-3.21.0.tar.gz
tar -zxvf cmake-3.6.2.tar.gz
cd cmake-3.21.0
查看README.rst
./bootstrap && make && sudo make install
docker.centos.install.gcc-g++(least 7.0 for C++17):
yum install -y bzip2
tar xvf gcc-8.4.0.tar.gz
cd gcc-8.4.0
./contrib/download_prerequisites
mkdir build
cd build
../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
make -j8
make install
yum install centos-release-scl
yum install devtoolset-8-gcc*
scl enable devtoolset-8 bash
docker.centos.install.gcc-g++:
yum install gcc gcc-c++
ssl:
yum -y install ncurses-devel
yum install openssl-devel
无网络环境,通过手机USB共享网络配置
# ip addr show //一般会多一个“enp35u1”之类的网络接口
# dhclient enp35u1
# ping ww.baidu.com
CentOS-7-x86_64-1908版本安装桌面# yum -y groups install "GNOME Desktop"
# echo
"exec gnome-session"
>> ~/.xinitrc
# startx // 每次开机都要执行才启动桌面