CentOS 5.4下使用yum安装Xen

使用 yum 能够很方便的安装 CentOS 5.4 默认的 Xen;

(1) 制作本地yum源:

制作本地源的目的是使安装相对快一些。

CentOS 5.4 的DVD盘或者ISO镜像中的东西复制出来(可以 mount 出来),挂载ISO镜像的命令是 mount -o loop *.iso /*** ;

将目录放到 apache http 服务器的目录下或者在 http 服务器下创建到镜像目录的软链接,例如 在 apache http web 主目录 /opt/apache-httpd-2.2.14/htdocs 下创建一个指向存储了 CentOS5.4镜像的目录;

最后 下是 CentOS 5.4 光盘中的东西;

安装 apache http 服务器

1121  cd /opt
 1122  mkdir apache-httpd-2.2.14
 1123  ls
 1124  cd software/
 1125  ls
 1126  tar zxvf httpd-2.2.14.tar.gz
 1127  ls
 1128  cd httpd-2.2.14
 1129  ls
 1130  ./configure --prefix=/opt/apache-httpd-2.2.14 -enable-so -enable-proxy -enable-proxy-ajp -enable-proxy-http -enable-proxy-ftp -enable-proxy-connect -enable-proxy-balancer
 1131  make
 1132  make install
 1136  cd /opt
 1137  ls
 1138  cd apache-httpd-2.2.14/
 1139  ls
 1140  cd conf/
 1141  ls
 1142  vim httpd.conf  更改Listen端口
 1143  ls
 1144  cd ..
 1145  ls
 1146  bin/apachectl
 1147  bin/apachectl start 启动apache
 1148  bin/apachectl status
 1149  bin/apachectl stop  停止apache

Web 主目录是
[root@ htdocs]# pwd
/opt/apache-httpd-2.2.14/htdocs

或者直接使用官方镜像


(2) 修改 yum 配置文件:
[root@ ~]# vim /etc/yum.repos.d/CentOS-Base.repo
--------------------------------------------------------------
[base]
name=CentOS-$releasever - Base
baseurl=http://10.10.97.6/mirror/centos/

# 或者官方镜像

gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#或者
#gpgkey=http://10.10.97.6/mirror/centos/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://10.10.97.6/mirror/centos/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://10.10.97.6/mirror/centos/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://10.10.97.6/mirror/centos/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://10.10.97.6/mirror/centos/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://10.10.97.6/mirror/centos/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

---------------------------------------------------------------

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wywpff.html