Linux服务
来源:互联网 发布:数据库事务特性 编辑:程序博客网 时间:2024/06/01 10:19
1.什么是服务?
service
在系统中提供某项服务的软件
2.服务管理,systemctl命令
systemctl start 服务名 ###开启服务
systemctl stop 服务名 ###关闭服务
systemctl restart 服务名 ###重启服务
systemctl reload 服务名 ###重新加在服务配置
systemctl status 服务名 ###查看服务状态
systemctl enable 服务名 ###设定服务开机启动
systemctl disable 服务名 ###禁止服务开机启动
set-default multi-user.target 服务名 ###开机不启动图形
set-default graphical.target 服务名 ###开机启动图形
[liu@localhost Desktop]$ rht-vmctl start desktop
[liu@localhost Desktop]$ rht-vmctl view desktop
[liu@localhost Desktop]$ rht-vmctl status desktop
[liu@localhost Desktop]$ rht-vmctl poweroff desktop
3.ssh的key认证
#######生成key###########
ssh-keygen ###生成公钥和私钥(在服务端),/root/.ssh (生成密钥存放位置),id_rsa位私钥,id_rsa.pub位公钥
ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.1.126
##192.168.1.126提供服务的ip,ssh-copy-id key的工具,-i (指定使用的公钥)
##/root/.ssh/id_rsa.pub 公钥,root被管理的用户
##authorized_keys ###此文件在目标用户加目录的.ssh中,这个文件就是目标用户被加密的标识,文件内容位公钥内容。
scp /root/.ssh/id_rsa root@192.168.1.125##把秘钥给客
sshd服务的简单配置
vim /etc/ssh/sshd_config ###sshd服务的配置文件
PermitRootLogin yes|no ###是否允许root用户通过sshd的认证,48行
PasswordAuthentication yes|no ###开启或关闭用户密码认证,78行
AllowUsers student westos ###用户白名单,只允许在名单中出现的用户使用sshd服务
systemctl restart sshd ###从新加载配置
- linux服务
- linux 服务
- linux 服务
- linux 服务
- linux服务
- linux:服务
- Linux服务
- linux服务
- linux 服务
- linux服务之telnet服务
- Linux服务软件
- linux的系统服务
- Linux服务设置方法
- Linux 后台服务进程
- Linux服务大全
- Linux下启停数据库服务
- Linux系统服务
- linux服务解释
- 下班后的1小时, 会影响到你的工作和生活
- CUDA学习--内存处理之全局内存(5)
- Avalon,继Angular之后
- ContentProvider简单使用 -- Android学习之路
- python挑战之level 30
- Linux服务
- poj 3211 Washing Clothes(分组01背包)
- ConcurrentLinkedQueue、AraayBlockingQueue、LinkedBlockingQueue 区别及使用场景
- HDU 5514 Game of Flying Circus
- SSDsim源码分析之 load_parameters
- 百度运用 FPGA 方法大规模加速 SQL 查询
- Linux进程通信
- 根据先序遍历和中序遍历得出二叉树。最终以后序遍历的形式输出。
- 60. Permutation Sequence