yum仓库搭建及安装方式

 

 

 

 

 

 

 

 

 

安装createrepo
[root@m01 tools]# yum -y install createrepo
 
 初始化
[root@m01 x86_64]# createrepo -pdo /application/yum/centos6/x86_64/ /application/yum/centos6/x86_64/
 
没加入都要更新一下
createrepo -pdo /application/yum/centos6/x86_64/ 
 
[root@m01 x86_64]# ls
keyutils-libs-devel-1.4-5.el6.x86_64.rpm    libsepol-devel-2.0.41-4.el6.x86_64.rpm
krb5-devel-1.10.3-57.el6.x86_64.rpm         nginx-1.6.3-1.x86_64.rpm
krb5-libs-1.10.3-57.el6.x86_64.rpm          openssl-1.0.1e-48.el6_8.1.x86_64.rpm
libcom_err-devel-1.41.12-22.el6.x86_64.rpm  openssl-devel-1.0.1e-48.el6_8.1.x86_64.rpm
libselinux-2.0.94-7.el6.x86_64.rpm          pcre-devel-7.8-7.el6.x86_64.rpm
libselinux-devel-2.0.94-7.el6.x86_64.rpm    repodata
libselinux-utils-2.0.94-7.el6.x86_64.rpm    zlib-devel-1.2.3-29.el6.x86_64.rpm
 
查看Nginx是否开启占用80端口
[root@m01 x86_64]# netstat -tunlp|grep 80   
 
进到当前目录执行命令
[root@m01 x86_64]# cd /application/yum/centos6/x86_64/
[root@m01 x86_64]# python -m SimpleHTTPServer 80 &>/dev/null & 
 
 
另一种方式
 
     server {
        listen       80;
        server_name  localhost;
        location / {
#            root   html;
            root   /data/yum_data/;
#            index  index.html index.htm;
            autoindex on;
            access_log off;
        }
    }
 
posted @ 2018-03-08 13:36  秋天的风吹过原野  阅读(193)  评论(0编辑  收藏  举报