首页 > 系统相关 >linux回炉第十三天

linux回炉第十三天

时间:2023-01-03 11:35:41浏览次数:46  
标签:nginxsystemctl root list mnt ---- 回炉 linux sysroot 第十三天

systemd
systemctl is-active nginx
systemctl status nginx
systemctl start nginx
systemctl stop nginx
systemctl enable nginx
systemctl disable nginx
systemctl enable --now nginx
systemctl mask nginx
systemctl unmask nginx
systemctl cat nginx
systemctl list-units
systemctl list-units -a
systemctl list-units -t service
systemctl list-unit-files -t service
systemctl list-unit-files -t service --all
sysstemctl daemon-reload
systemctl restart nginx
ll /usr/lib/systemd/system
ll /lib/systemd/system
ll /etc/systemd/system

runlevel
init 3
init 5
systemctl isolate graphical.target
systemctl get-default
systemctl default
任意键----> e -----> linux行添加rd.break ---->  ctrl+x ----> mount -o remount,rw /sysroot -----> chroot /sysroot  ----->   passwd root ------>  touch /.autorelabel  ----> exit ----> reboot
任意键----> e ----> liunx行改为rw init=/sysroot/bin/sh ----> ctrl+x ----> chroot /sysroot ----> passwd root ----> touch /.autorelabel ----> exit ----> reboot
grub2-setpasswd
ls -l /root/grub2


chroot /mnt/sysroot #centos8
chroot /mnt/sysimage #centos7

grub2 install --root-directory=/mnt/sysimage /dev/sda

grub2 install /dev/sda


sync
cat /proc/sys/kernel/hostname
cat /proc/sys/net/ipv4/icmp_echo_ignore_all
cat /proc/sys/vm/drop_caches

sysctl -p
sysctl -w net.ipv4.ip_forword = 1
sysctl -a

标签:nginxsystemctl,root,list,mnt,----,回炉,linux,sysroot,第十三天
From: https://blog.51cto.com/dayu/5984789

相关文章

  • Linux安装node
    说明亲测在Ubuntu环境下安装成功如果包管理器中有合适版本建议使用apt-get或yum等命令直接安装以Ubuntu系统为例,可以使用如下命令查看nodejs版本sudoapt-getupdat......
  • Linux-Shell编程
    1.Shell(1)Shell脚本是什么?一个Shell脚本是一个文本文件,包含一个或多个命令。作为系统管理员,我们经常需要使用多个命令来完成一项任务,我们可以添加这些所有命令在一个文......
  • Linux基础:ssh与scp
    登陆登陆服务器sshuser@hostnameuser:用户名hostname:IP地址或域名第一次登陆会提示Theauthenticityofhost'123.57.47.211(123.57.47.211)'can......
  • Linux grep
    基本用法grepstrfile在文件file中查找字符串strgrep-nstrfile使用-n选项查找字符串str常用选项-i不区分大小写(默认是区分大小写的)-n输出该字符串所在行的行号......
  • Linux网络第五章:yum仓库的灵活部署及NFS共享服务
    目录一、yum仓库的灵活部署1、yum基础知识及命令2、本地yum仓库搭建3、通过httpd服务建立yum仓库4、建立国内yum源二、NFS共享服务1、NFS基础知识2、搭建NFS服务......
  • Linux网络第四章:SSH远程管理及通过SSH实现服务器之间的免密连接
    目录一、SSH远程管理基础1、ssh协议2、ssh原理3、配置文件解析4、登录方法5、使用ssh协议传输的命令二、免密连接的实现1、免密连接原理 2、免密实现环境准备3......
  • TCP IP网络编程(13) Linux下epoll与多线程
    优于select的epoll1.epoll的理解与应用  select服用方法由来已久,在《TCP/IP网络编程(6)》中,介绍了如何使用select方法实现IO复用。但是利用该技术后,无论如何优化程......
  • How to tar a file in Linux using command line
    https://www.cyberciti.biz/faq/how-to-tar-a-file-in-linux-using-command-line/Author: VivekGiteIamanewLinuxuser.HowcanIcreateatarfileinLinux......
  • Linux shell command chmod All In One
    LinuxshellcommandchmodAllInOne#a#+x===755$chmoda+x#$chmod755===chmod+x$manchmod$manchmod>man-chmod.md(......
  • linux内核 DebugFS
    一、简介DebugFS,顾名思义,是一种用于内核调试的虚拟文件系统,内核开发者通过debugfs和用户空间交换数据。类似的虚拟文件系统还有procfs和sysfs等,这几种虚拟文件系统都并不实......