当前位置:网站首页>安装及管理程序
安装及管理程序
2022-07-06 10:41:00 【m0_62406299】
1、查询已安装的rpm软件信息
格式:rpm -q(子选项) (软件名)
-qa:查看系统中已安装的所有rpm软件包列表
-qi:查看指定软件的详细信息
-ql:查询指定软件包所安装的目录、文件列表
-qc:仅显示指定软件包安装的配置文件
-qd:仅显示指定软件包安装的文档文件
2、查询文件或目录属于哪个rpm软件
格式:rpm -qf 文件或目录名
3、查询未安装的rpm包文件信息:
格式:rpm -qp(子选项)rpm包软件
-qpi:通过.rpm包文件查看该软件的详细信息
-qpl:查看.rpm安装包内所包含的目录,文件列表
-qpc:查看.rpm安装包内所包含的配置文件列表
-qpd:查看.rpm安装包内包含的文档文件列表
4、光盘的挂载
mount /dev/cdrom(设备) /media(目录)
注意:与windows的使用光盘的习惯要区分开,linux必须挂载或卸载。
查看挂载情况:mount
光盘的卸载:umount /dev/cdrom 或umount /media
5、rpm包的安装
rpm -ivh(不区分先后顺序) rpm软件包名
-i(安装)、-U(升级)、-F(更新)、-v(显示信息)、-h(显示安装进度,“#”表示)
6、rpm包的卸载:
rpm -e 软件包名
--nodeps(忽略依赖关系)、--force(强制)
7、维护rpm数据库
重建rpm数据库:rpm --rebuilddb 或 rpm --initdb
8、编译安装过程:
a、tar解包——下载源代码安装包文件
用途:解压并释放源代码包到指定的目录。
b、(./configure配置)
用途:设置安装目录、安装模块等选项
c、make编译
用途:生成可执行的二进制文件
d、make install安装
用途:复制二进制文件到系统,配置应用环境
e、测试及使用
相关命令:cp * 复制所有文件
源码包存放位置:/usr/src
源码包安装的位置:/usr/local
访问linux网页加端口号(:10000),可输入root和密码访问
防止冲突,笔记如下图所示:
第四章 账号和权限管理
用户管理:
1、用户相关的配置文件
/etc/passwd(保存用户)
/etc/shadow(用户密码文件)
/etc/skel(用户模板文件)
2、用户相关的命令
useradd(创建用户)、passwd(修改密码)、userdel(删除用户)、usermod(修改用户属性)
useradd选项:
-d:指定用户的宿主目录位置
-e:指定用户账号失效时间
-g:指定用户的基本组名(或GID号)
-G:指定用户的附加组名(或GID号)
-s:指定用户的登录shell
passwd (选项) 用户名
-d:删除密码,root才能受用
-f:强制执行
-k:设置只有在密码过期失效后,方能更新
-l:锁住密码
-u:解锁账号
-s:列出密码相关的信息,root才能使用
usermod命令:
格式:usermod (选项)用户名
注:usermod可用来修改用户账号的各项设定
-L:锁定用户账户
-U:解锁用户账户
由于选项与useradd命令中的含义大致相同,此处不做详解
chage -l 用户(查看用户账户信息)
删除用户账号:
userdel命令
格式:userdel (-r) 用户名
此处补充一个知识点:!命令可以从历史记录中找出你所需要的命令行,history可得到历史命令的序号
3、组的管理
a、组相关的配置文件:/etc/group
b、组相关的命令:groupadd -g (创建组)、groupdel(删除组)、gpasswd(将用户添加到组中)
gpasswd命令:
格式:gpasswd (选项) 组账号名
-a:向组内添加一个用户
-d:从组内删除一个用户成员
-M:定义组成员列表,以逗号分隔(附加组)
补充:
a、id命令
用途:查询用户身份标识 (id 用户名)
b、groups命令
用途:查询用户所属的组
groups 用户名
c、finger命令
finger 用户名
d、users、W、who命令
用途:查询已登录到主机的用户信息
边栏推荐
- 使用cpolar建立一个商业网站(1)
- D binding function
- 10、 Process management
- [.Net core] solution to error reporting due to too long request length
- Collection of penetration test information -- use with nmap and other tools
- POJ 2208 six lengths of tetrahedron are known, and the volume is calculated
- 测试123
- [sword finger offer] 60 Points of N dice
- 文档编辑之markdown语法(typora)
- Unity资源顺序加载的一个方法
猜你喜欢
Maixll dock camera usage
Windows连接Linux上安装的Redis
Some understandings of tree LSTM and DGL code implementation
Easy to use PDF to SVG program
10、 Process management
徐翔妻子应莹回应“股评”:自己写的!
Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
2019 Alibaba cluster dataset Usage Summary
MS-TCT:Inria&SBU提出用于动作检测的多尺度时间Transformer,效果SOTA!已开源!(CVPR2022)...
Transport layer congestion control - slow start and congestion avoidance, fast retransmission, fast recovery
随机推荐
Coco2017 dataset usage (brief introduction)
2022 Summer Project Training (III)
C语言自动预订飞机票问题
使用cpolar建立一个商业网站(1)
Penetration test information collection - site architecture and construction
std::true_ Type and std:: false_ type
STM32+MFRC522完成IC卡号读取、密码修改、数据读写
Top command details
Distill knowledge from the interaction model! China University of science and Technology & meituan proposed virt, which combines the efficiency of the two tower model and the performance of the intera
SQL优化问题的简述
Xu Xiang's wife Ying Ying responded to the "stock review": she wrote it!
Stm32+esp8266+mqtt protocol connects onenet IOT platform
Comparative examples of C language pointers *p++, * (p++), * ++p, * (++p), (*p) + +, +(*p)
CRMEB 商城系统如何助力营销?
Transport layer congestion control - slow start and congestion avoidance, fast retransmission, fast recovery
Will openeuler last long
首先看K一个难看的数字
Cocos2d Lua smaller and smaller sample memory game
The third season of Baidu online AI competition is coming in midsummer, looking for you who love AI!
Recursive way