上传安装包到HTTPD服务器(bigdata01)
1.创建目录
sudo mkdir -p /var/www/html
2.将安装包通过xftp传入html目录
cat /etc/redhat-release #查看centos版本,找到合适的包,导入centos系统
HTTPD服务器安装(bigdata01)
1.插件的安装(安装包ISO里有,没有的自己找相应的版本)
rpm包查找网址
http://rpmfind.net/
http://rpm.pbone.net/index.php3
https://pkgs.org/
sudo rpm -ivh /var/www/html/Packages/apr-1.4.8-3.el7_4.1.x86_64.rpm
sudo rpm -ivh /var/www/html/Packages/apr-util-1.5.2-6.el7.x86_64.rpm
sudo rpm -ivh /var/www/html/Packages/apr-util-ldap-1.5.2-6.el7.x86_64.rpm #原来的包没有
sudo rpm -ivh /var/www/html/Packages/mailcap-2.1.41-2.el7.noarch.rpm
sudo rpm -ivh /var/www/html/Packages/httpd-tools-2.4.6-80.el7.centos.x86_64.rpm
sudo rpm -ivh /var/www/html/Packages/httpd-2.4.6-67.el7.centos.x86_64.rpm
2.执行结果(类似,这是旧版的)3.启动httpd服务
sudo systemctl start httpd.service #启动
sudo systemctl stop httpd.service #停止,本次不执行
sudo systemctl restart httpd.service #重启,本次不执行
sudo systemctl enable httpd.service #开机启动
sudo systemctl disable httpd.service #开机不启动,本次不执行
sudo systemctl status httpd.service #查看状态
4.若需要修改配置,此处不修改
sudo vi /etc/httpd/conf/httpd.conf #如果不是默认路径需要更改该路径,如/data/www/html
5.验证HTTPD服务器
部署本地YUM源
1.安装createrepo(bigdata01)
sudo rpm -ivh /var/www/html/Packages/deltarpm-3.6-3.el7.x86_64.rpm
sudo rpm -ivh /var/www/html/Packages/python-deltarpm-3.6-3.el7.x86_64.rpm
sudo rpm -ivh /var/www/html/Packages/libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm
sudo rpm -ivh /var/www/html/Packages/createrepo-0.9.9-28.el7.noarch.rpm
2.创建repository描述文件(bigdata01)
cd /var/www/html
sudo chmod 755 -R CDH6.3.0
sudo createrepo CDH6.3.0
sudo chmod 755 -R Packages
sudo createrepo Packages
sudo chmod 755 -R mysql
sudo createrepo mysql
3.配置客户机yum源(每一台主机)
cd /etc/yum.repos.d
sudo rename .repo .repo.bak *.repo
sudo vi /etc/yum.repos.d/cdh.repo
配置文件
[base]
name=base
baseurl=http://192.168.88.200/Packages
enabled=1
gpgcheck=0
[cdh]
name=cdh
baseurl=http://192.168.88.200/CDH6.3.0
enabled=1
gpgcheck=0
[mysql]
name=mysql
baseurl=http://192.168.88.200/mysql
enabled=1
gpgcheck=0
验证
sudo yum clean all
sudo yum list #可以看到所有包名
sudo yum list | grep -i mysql #查看指定包
安装vim验证一下
sudo yum install vim
(原创文章:如果有需要,请留言告知)