跳板机搭建(本地yum源并共享)

本地yum源并共享


1、配置本地yum源并共享
(1)配置本地yum源
####yum -y install httpd
####systemctl start httpd
####systemctl enable httpd
####mkdir /etc/yum.repos.d/repobak
####mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repobak/
####创建/iso文件,并放入镜像iso,创建挂载点mkdir /var/www/html/rhel
####vim /etc/fstab
#####/iso/CentOS-7-x86_64-DVD-1804.iso /var/www/html/rhel iso9660 defaults,loop 0 0
####mount -a
####yum-config-manager --add-repo file:///var/www/html/rhel/
2、服务器环境配置
(1)安装:yum -y install bash-completion bash-completion-extras vim net-tools.x86_64 yum-utils
####重启系统:reboot
(2)关闭selinux
####setenforce 0
####vim /etc/selinux/config
#####SELINUX=disabled
####getenforce
(3)卸载安装自带jdk,安装jdk
####tar并mv到/usr/local/下
####vim /etc/profile
#####export JAVA_HOME=/usr/local/jdk1.8.0_152
#####export CLASSPATH= : C L A S S P A T H : :CLASSPATH: :CLASSPATH:JAVA_HOME/lib/
#####export PATH= P A T H : PATH: PATH:JAVA_HOME/bin
####source /etc/profile
####检测:java -version
(4)hostnamectl set-hostname dump

你可能感兴趣的:(运维)