http配置yum源
2019-08-07 22:25
1326 查看
http配置yum源
一.VMware插入两张光盘
二.手动触发硬盘扫描
[root@c7e-uscwifi ~]#echo '- - -' > /sys/class/scsi_host/host0/scan [root@c7e-uscwifi ~]#echo '- - -' > /sys/class/scsi_host/host1/scan [root@c7e-uscwifi ~]#echo '- - -' > /sys/class/scsi_host/host2/scan [root@c7e-uscwifi ~]#lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 200G 0 disk ©À©¤sda1 8:1 0 2G 0 part /boot ©¸©¤sda2 8:2 0 154G 0 part ©À©¤centos-root 253:0 0 100G 0 lvm / ©À©¤centos-swap 253:1 0 4G 0 lvm [SWAP] ©¸©¤centos-data 253:2 0 50G 0 lvm /data sr0 11:0 1 4.2G 0 rom /run/media/root/CentOS 7 x86_ sr1 11:1 1 3.7G 0 rom [root@c7e-uscwifi ~]#
三.yum安装httpd
[root@c7e-uscwifi ~]#yum install httpd -y
四.创建网页目录
[root@c7e-uscwifi ~]#cd /var/www/html/ [root@c7e-uscwifi html]#mkdir centos{7,6}/os/x86_64 -p [root@c7e-uscwifi html]#
五.挂载光盘
[root@c7e-uscwifi html]#mount /dev/sr0 /var/www/html/centos7/os/x86_64/ mount: /dev/sr0 写保护,将以只读方式挂载 [root@c7e-uscwifi html]#mount /dev/sr1 /var/www/html/centos6/os/x86_64/ mount: /dev/sr1 写保护,将以只读方式挂载 [root@c7e-uscwifi html]#
六.开启httpd服务,并加入开机启动项
[root@c7e-uscwifi html]#systemctl start httpd.service && systemctl enable httpd.service Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service. [root@c7e-uscwifi html]#
七.网页访问测试
发现访问不了,怀疑是selinux和firewalld防火墙没关
[root@c7e-uscwifi html]#setenforce 0 setenforce: SELinux is disabled [root@c7e-uscwifi html]#systemctl stop firewalld.service [root@c7e-uscwifi html]#
再次访问,可访问了
八、在centos6上面配置yum源
[root@centos6 ~]#cd /etc/yum.repos.d/ [root@centos6 yum.repos.d]#mkdir backup -p # 编辑repo文件 [root@centos6 yum.repos.d]#mv *.repo backup/ [root@centos6 yum.repos.d]#cat > base.repo <<EOF > [base] > name=base repo > baseurl=http://192.168.38.131/centos6/os/x86_64/ > enabled=1 > gpgcheck=0 > EOF # 查看repo仓库 [root@centos6 yum.repos.d]#yum repolist Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile base | 4.0 kB 00:00 repo id repo name status base base repo 6,713 repolist: 6,713 [root@centos6 yum.repos.d]# # 安装vsftpd测试 [root@centos6 yum.repos.d]#yum install vsftpd # 没问题
相关文章推荐
- 配置本地yum源(http与镜像方式)
- 配置基于http的yum源
- centos6配置本地YUM源(http方式)
- CentOS 配置本地yum源 http方式
- 配置yum源:file、http
- 只有在配置文件或 Page 指令中将 enableSessionState 设置为 true 时,才能使用会话状态。还请确保在应用程序配置的 <configuration>\<system.web>\<httpModules> 节中包括..
- HTTP 错误 404.13 - Not Found 请求筛选模块被配置为拒绝超过请求内容长度的请求。
- 入门-如何配置yum源
- CentOS 6.5下本地yum源与网络yum源的配置使用
- Redhat有关yum源配置和相关问题
- CentOS6.5配置网络yum源
- Tomcat配置虚拟目录、多域名、多个Http监听端口的方式
- YUM源的配置
- Centos7 配置本地yum源
- Centos配置国内yum源
- AngularJS使用$http配置对象方式与服务端交互方法
- iOS 用CornerStone配置SVN,HTTP及svn简单使用说明
- 一个简单的零配置命令行HTTP服务器 - http-server (nodeJs)
- apache配置文件:http.conf配置详解
- 详细解释:nginx中ngx_http_headers_module模块配置及各个参数含义