xenserver 使用记录

yum源不可用

Edit repositories

vi /etc/yum.repos.d/CentOS-Base.repo

change #baseurl lines of the repo's you want:

  1. uncomment baseurl line (remove #)
  2. replace $releasever with 7

enable repo's you want:

  1. change enabled=0 to enabled=1

save the file (i=insert, escape=stop_insert_mode, :wq=save and exit)
check repositories:

yum -v repolist all
install xfsprogs
yum -i xfsprogs

done

原帖来自:https://discussions.citrix.com/topic/378880-xenserver-70-repositories/

python pip

首先安装epel扩展源

yum -y install epel-release

更新完成之后,就可安装pip

yum -y install python-pip

安装完成之后清除cache

yum clean all

一般需要更新pip

pip install --upgrade pip

防火墙设置

需要:同一内网,通过其他主机访问xenserver主机接口
设置xenserver的iptables表,只允许某个IP或者IP段访问服务器。
编辑命令:

vi /etc/sysconfig/iptables

在:RH-Firewall-1-INPUT - [0:0] 规则下面添加一条允许IP或者IP段的规则。
允许单个IP规则:
-A INPUT -s 192.168.11.177 -p tcp -m tcp -j ACCEPT
允许某个IP段规则:
-A INPUT -s 192.168.11.0/24 -p tcp -m tcp -j ACCEPT
重启iptables表,只有允许的IP才可以访问服务器,其他的都无法访问了。
命令:

service iptables restart

修改apache配置文件

指定根目录 /etc/httpd/conf/httpd.conf

#!/bin/bash
value=test
cd /etc/httpd/conf
awk '/^DocumentRoot/{print "DocumentRoot \"/var/www/html/'$value'\"";next}\
     /^<Directory/{print "<Directory \"/var/www/html/'$value'\">";next}\
     {print}' httpd.conf > httpd.conf.tmp

修改密码

$sudo passwd root
New password:***
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,980评论 19 139
  • 由于 redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需将redhat的yum卸载后,...
    九子龙阅读 4,556评论 0 0
  • 1. 概述 日常的工作中,经常要安装和卸载软件,在linux centos的版本里提供了rpm这个命令进行安装,但...
    ghbsunny阅读 4,067评论 0 3
  • 文/董晓禾 华丽 夺目 转瞬即无 感叹号 问号 破折号 翩翩起舞 “捕捉闪电”,问号? 是暴风雨前的仆告还是宣言?...
    禾仙姑Shawn阅读 433评论 0 1
  • 准确性练习9--经济专题 1. The index of leading economic indicators ...
    Dyan_9660阅读 308评论 0 0

友情链接更多精彩内容