docker 修改基础环境
docker pull centos
yum install -y net-tools
yum install -y openssl openssh-server
yum install java-1.8.0-openjdk.x86_64
yum install scala
[root@master ~]# ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ''
[root@master ~]# ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
[root@master ~]# ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N ''
接着修改sshd_config文件配置信息,路径为 /etc/ssh/sshd_config
1.将 Port 22 前面的注释去掉
2.将 PermitRootLogin 的 no 改为 yes
[root@master ~]# /usr/sbin/sshd -D &
yum install passwd
[root@master ~]# passwd
Changing password for user root.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
开发环境
yum install wget
yum install ifconfig
yum install vim
yum install java-1.8.0-openjdk.x86_64
yum install scala
centos解决bash: service: command not found 错误
yum install initscripts -y
网友评论