昨日学习与实践3小时,累计306.5小时
对应的sysvinit命令:
service httpd start / service httpd stop / service httpd restart (不管httpd服务当前状态,重启服务)/ service httpd reload(重新载入httpd配置信息而不中断服务)
service httpd condrestart ==== systemctl condrestart httpd.service (condrestart选项会检查服务当前是否正在运行,若已在运行,重启,否,无法启动)
service httpd status ==== systemctl status httpd.service
chkconfig httpd on ==== systemctl enable httpd.service 设置服务开机自启动
chkconfig httpd off ==== systemctl disable httpd.service 禁止服务开机自启动
chkconfig --list ==== systemctl list-unit-files --type=service 输出各个运行级别下所有服务的启用和禁用情况
chkconfig httpd ===== systemctl is-enabled httpd.service 检查httpd服务在当前环境下是启用还是禁用
chkconfig httpd --list ==== ls /etc/systemd/system/*.wants/httpd.service 查看httpd服务在各个运行级别下的启用和禁用情况
chkconfig httpd --add ==== systemctl daemon-reload 创建一个新服务文件或者变更配置时使用
除上面的服务管理方法外,还能管理系统电源:(对
系统进程重启、
关机、休眠等)
# systemctl poweroff 关闭系统
# systemctl reboot 重启系统
# systemctl suspend 进入待机模式
# systemctl hibernate 进入休眠模式
# systemctl hybrid-sleep 进入混合休眠模式
3.6 Linux与SecureCRT
VanDyke SecureCRT最常用的终端仿真程序。
ssh (Secure Shell),不同于Telnet和FTP服务
SecureCRT,其安装和使用(略)
rz 和 sz 命令(Linux与Windows进行ZModem文件传输的命令行工具),一次可以传送一个或多个文件(sz是从Linux服务器到本地,rz是从本地到Linux服务器)
需要安装对应的包:
# rpm -q lrzsz
# yum install lrzsz
SecureCRT复制命令的快捷键:Ctrl+Insert 粘贴:Shift+Insert