Skip to content

centos6.8+阿里云yum源+ssh密码登录+常用软件

Notifications You must be signed in to change notification settings

kecikeci/centos6.8-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

centos6.8-tools

centos6.8+阿里云yum源+ssh密码登录+常用软件

登录网易云才能进去链接

ssh初始密码root123,可用passwd命令修改

自用基础镜像

拉取镜像:docker pull hub.c.163.com/gu641034445/public/centos6.8-tools:latest

个人博客:https://4xx.me

 

# centos6.8+阿里云yum源+ssh密码登录+常用软件
# 基于官方centos6.8镜像,https://c.163.com/hub#/m/repository/?repoId=2968
# ssh初始密码root,可用passwd命令修改
# 个人博客:https://4xx.me
FROM hub.c.163.com/library/centos:6.8
MAINTAINER https://4xx.me

RUN cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN yum install wget -y

# 更换阿里源
RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
RUN wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

# 安装常用软件
RUN yum clean all
RUN yum install -y yum-plugin-ovl || true
RUN yum install -y vim tar wget curl rsync bzip2 iptables tcpdump less telnet net-tools lsof sysstat cronie passwd openssl openssh-server
# 安装ssh
RUN yum install passwd openssl openssh-server -y
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
RUN sed -i "s/#UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config
RUN sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config
RUN echo "root:root123" | chpasswd
# 安装htop
# RUN rpm -ivh http://mirrors.sohu.com/fedora-epel/epel-release-latest-6.noarch.rpm
# RUN yum install htop -y

# 清除yum缓存
RUN yum clean all
RUN rm -rf /var/cache/yum/*

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

About

centos6.8+阿里云yum源+ssh密码登录+常用软件

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published