1、制作yum源
umount /mount/cdrom
mount -o loop ***.iso /mnt
mount /dev/cdrom /mnt
mount /dev/cdrom /var/ftp/(pub)
/etc/init.d/vsftpd restart
2、编辑yum配置文件
vim /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://192.168.0.201/Server
enabled=1
gpgcheck=0
或
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
3、使用yum命令
yum install mysql* -y
yum erase mysql(此命令非常危险,会卸载相依赖软件包)
yum list mysql 查看所有mysql软件包
yum clean all 清除yum缓存
yum grouplist 列出所有的软件包组
yum groupinstall +(上面列出的项目名称) 安装软件包组,等于安装系统时出现的软件包组的选项。安装系统是不是可以选择所安装的软件包吗,这里就是一样的设置。也可以用命令:system-config-packages
yum groupremove +(上面列出的项目名称) 卸载安装的软件包组
centos 的yum配置文件
[base]
name=CentOS-$releasever - Base
mirrorlist=
#baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=
#baseurl=
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
mirrorlist=
#baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=
#baseurl=
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
mirrorlist=
#baseurl=
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
mirrorlist=
#baseurl=
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
阅读(575) | 评论(0) | 转发(0) |