How to make rpm auto install dependencies

前端 未结 11 1558
清酒与你
清酒与你 2020-12-07 07:59

I have built two RPM packages

  • proj1-1.0-1.x86_64.rpm
  • libtest1-1.0-1.x86_64.rpm

proj1 depends on

11条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 08:25

    Step1: copy all the rpm pkg in given locations

    Step2: if createrepo is not already installed, as it will not be by default, install it.

    [root@pavangildamysql1 8.0.11_rhel7]# yum install createrepo
    

    Step3: create repository metedata and give below permission

    [root@pavangildamysql1 8.0.11_rhel7]# chown -R root.root /scratch/PVN/8.0.11_rhel7
    [root@pavangildamysql1 8.0.11_rhel7]# createrepo /scratch/PVN/8.0.11_rhel7
    Spawning worker 0 with 3 pkgs
    Spawning worker 1 with 3 pkgs
    Spawning worker 2 with 3 pkgs
    Spawning worker 3 with 2 pkgs
    Workers Finished
    Saving Primary metadata
    Saving file lists metadata
    Saving other metadata
    Generating sqlite DBs
    Sqlite DBs complete
    [root@pavangildamysql1 8.0.11_rhel7]# chmod -R o-w+r /scratch/PVN/8.0.11_rhel7
    

    Step4: Create repository file with following contents at /etc/yum.repos.d/mysql.repo

    [local]
    name=My Awesome Repo
    baseurl=file:///scratch/PVN/8.0.11_rhel7
    enabled=1
    gpgcheck=0
    

    Step5 Run this command to install

    [root@pavangildamysql1 local]# yum --nogpgcheck localinstall mysql-commercial-server-8.0.11-1.1.el7.x86_64.rpm
    

提交回复
热议问题