rpm

How to publish a rpm package to YUM

拜拜、爱过 提交于 2020-12-26 23:26:54
问题 I have created a rpm package, and I need to publish it to YUM so that users can directly do yum install softwareName to install the application. I searched on google but can't find many resources. I'm new to this thing so I don't really know what I want to do is possible. I've tried to create a local yum repository for the application, but it seems work only for the local machine. Can anyone help please? Thank you. 回答1: Assuming you've YUM installed on a Linux box. You need to create a YUM

How to publish a rpm package to YUM

孤者浪人 提交于 2020-12-26 23:21:57
问题 I have created a rpm package, and I need to publish it to YUM so that users can directly do yum install softwareName to install the application. I searched on google but can't find many resources. I'm new to this thing so I don't really know what I want to do is possible. I've tried to create a local yum repository for the application, but it seems work only for the local machine. Can anyone help please? Thank you. 回答1: Assuming you've YUM installed on a Linux box. You need to create a YUM

Check if rpm exists in bash script silently

╄→гoц情女王★ 提交于 2020-05-26 12:13:03
问题 I'm trying to do a quick check to see if an rpm is installed in a bash script using an if statement. But I want to do it silently. Currently, when I run the script, and the rpm does exist, it outputs the output of rpm to the screen which I dont want. if rpm -qa | grep glib; then do something fi Maybe there is an option to rpm that I am missing? or if I just need to change my statement? THanks 回答1: 1) You can add -q switch to grep if rpm -qa | grep -q glib; then do something fi 2) You can

Check if rpm exists in bash script silently

心不动则不痛 提交于 2020-05-26 12:12:07
问题 I'm trying to do a quick check to see if an rpm is installed in a bash script using an if statement. But I want to do it silently. Currently, when I run the script, and the rpm does exist, it outputs the output of rpm to the screen which I dont want. if rpm -qa | grep glib; then do something fi Maybe there is an option to rpm that I am missing? or if I just need to change my statement? THanks 回答1: 1) You can add -q switch to grep if rpm -qa | grep -q glib; then do something fi 2) You can

常用Linux操作命令

孤街醉人 提交于 2020-04-07 13:54:48
# --------------------- Linux basic ------------------------------ # file name: linux_basic # author : # date : 2014-3-25 # contact : QQ : # email : # summary : Linux basic command operation # -------------------- Linux basic ------------------------------- # ------ generic symbol ------------------------------------------ / : root directory ~ : usr directory ./ : current directory path .. : up directory path !cmd : invoke last command & : run job in background # --- create a linux user and group ----------------------------- adduser user_name : you must have root privilege passwd user_name :

常用linux命令

感情迁移 提交于 2020-04-07 09:12:25
最近再一次拾起了Ubuntu,为了更好的玩儿转Linux,专门到网上搜到的这些常用的终端命令,根据命令使用类别的不同分为了9个大类,都在下面一一列举了出来,个人觉得还是很有用的,在以后的时间里,小弟会随时更新自己对于Ubuntu的使用心得一. 文件目录类 1.建立目录:mkdir 目录名 2.删除空目录:rmdir 目录名 3.无条件删除子目录: rm -rf 目录名 4.改变当前目录:cd 目录名 (进入用户home目录:cd ~;进入上一级目录:cd -) 5.查看自己所在目录:pwd 6.查看当前目录大小:du 7.显示目录文件列表:ls -l (-a:增加显示隐含目录) 其中:蓝:目录;绿:可执行文件;红:压缩文件;浅蓝:链接文件;灰:其他文件;红底白字:错误的链接文件 8.浏览文件:more 文件名.txt;less 文件名.txt 9.复制文件: cp 源文件 目标文件 (-r:包含目录) 10.查找文件:(1)find (2)locate 命令名 11.链接:(1)建立hard链接:ln 来源文件 链接文件(-d:创建目录链接);(2)建立符号链接:ln -s 来源文件 链接文件 二.驱动挂载类 1.检查硬盘使用情况:df -T -h 2.检查磁盘分区:fdisk -l 3.挂载软硬光区:mount -t /dev/fdx|hdax /mnt/目录名 其中:

centos7通过yum安装JDK1.8

折月煮酒 提交于 2020-04-06 09:47:12
参考: https://blog.csdn.net/a360616218/article/details/76736988 安装之前先检查一下系统有没有自带 open-jdk 命令: rpm -qa |grep java rpm -qa |grep jdk rpm -qa |grep gcj 如果没有输入信息表示没有安装。 如果安装可以使用 rpm -qa | grep java | xargs rpm -e --nodeps 批量卸载所有带有 Java 的文件 这句命令的关键字是 java 首先检索包含 java 的列表 yum list java* 检索 1.8的列表 yum list java-1.8* 安装 1.8.0的所有文件 #yum install java-1.8.0-openjdk* -y yum install java-1.8.0-openjdk.x86_64 -y 使用命令检查是否安装成功 java -version 到此安装结束了。这样安装有一个好处就是不需要对 path进行设置,自动就设置好了 来源: oschina 链接: https://my.oschina.net/u/1161889/blog/3220802