随笔分类 -  linux

摘要:dropbearkey -t rsa -f .ssh/id_rsa > id_rsa.pub scp id_rsa.pub > root@192.168.1.2:/root/.ssh/authorized_keys ssh -i .ssh/id_rsa root@192.168.1.2 参考链接:o 阅读全文
posted @ 2021-07-26 17:04 sherlock-merlin 阅读(293) 评论(0) 推荐(0) 编辑
摘要:CentOS 6服务器主板电池掉电后,会导致无法开机。具体提示为“ *** Superblock last mount time is in the future *** ” 时间错误就无法开机,这个设定略坑。。 遇到这种问题,需要用fsck命令修复(两次)。 阅读全文
posted @ 2020-06-29 11:31 sherlock-merlin 阅读(462) 评论(0) 推荐(0) 编辑
摘要:首先需要安装createrepo这个软件包,使用yum安装即可 创建软件库文件夹,比如mkdir -p /var/www/html/myrepo/x86_64, 将软件包拷贝到文件夹下。 cd到该文件夹,执行 createdb .命令 将会在同级目录生成数据库信息。 在客户机上创建repo配置文件, 阅读全文
posted @ 2018-10-22 18:24 sherlock-merlin 阅读(292) 评论(0) 推荐(0) 编辑
摘要:安装必要的依赖 yum install subversion binutils bzip2 gcc gcc-c++ gawk gettext flex ncurses-devel zlib-devel make patch unzip perl-ExtUtils-MakeMaker glibc gl 阅读全文
posted @ 2018-08-17 17:35 sherlock-merlin 阅读(4586) 评论(0) 推荐(0) 编辑
摘要:实验方式:先从linux虚拟机ping windows主机,然后从windows主机ping linux虚拟机,在pc上采用wireshark抓包。 如下(只保留了关键信息) 可以看到linux发出的ICMP请求和window下是有所区别的,linux下默认大小是98字节,windows下是74字节 阅读全文
posted @ 2018-08-16 23:15 sherlock-merlin 阅读(952) 评论(0) 推荐(0) 编辑
摘要:安装前注意事项: 1、cobbler主机要为静态ip,否则和dhcpd服务冲突。 2、如果用虚拟机安装,client的内存请设置为2g以上,否则会报错。 3、kickstart文件中不要出现中文,大坑。。 需要关闭selinux。(重要) centos官方源中无cobbler软件包,需要先安装epe 阅读全文
posted @ 2018-08-01 22:31 sherlock-merlin 阅读(305) 评论(0) 推荐(0) 编辑
摘要:镜像从http://downloads.openwrt.org/releases下载 注意选择generic-rootfs.tar.gz这种类型的镜像 使用docker import导入镜像,导入后可以使用docker images查看看 进入lede里的shell交互环境 docker run - 阅读全文
posted @ 2018-07-31 14:45 sherlock-merlin 阅读(17653) 评论(0) 推荐(0) 编辑
摘要:使用chkconfig命令列举出所有服务,配合管道筛选出开机默认启动的服务,再去掉level0(关机)、level4(无意义)和level6(重启)的显示,使结果更直观。 chkconfig | grep 3:on | awk '{print $1,$3,$4,$5,$7}' abrt-ccpp 1 阅读全文
posted @ 2018-07-28 15:43 sherlock-merlin 阅读(666) 评论(0) 推荐(0) 编辑
摘要:以前以为添加计划任务就是crontab -e来添加,知道今天偶然发现了/etc/cron.d目录,才发现事情没有那么简单。。 crontab -e命令编辑的文件是保存在/var/spool/cron/目录下的一个以用户名为名的文件。 cron有三个地方的配置文件:/etc/crontab,/etc/ 阅读全文
posted @ 2018-07-24 15:27 sherlock-merlin 阅读(428) 评论(0) 推荐(0) 编辑
摘要:我们经常用ps | grep xxx来查询是否存在某进程,但默认情况下会将grep这个命令也作为结果返回,这样无论是否存在查询的进程,该命令的返回值都是0。 要避免这种情况可以使用grep的-v参数,含义是Select non-matching lines(选择不匹配的行)。 比如查询cron服务是 阅读全文
posted @ 2018-07-19 09:44 sherlock-merlin 阅读(4866) 评论(0) 推荐(0) 编辑
摘要:在linux控制台下工作,有时候遇到不懂的单词,想要找个linux下的词典程序,搜寻无果,只好自己动手写个了。 首先获取词典文本文件,在github上找到一个 建立数据库 create database dictdb; 创建表 create table dict(en text,zh text); 阅读全文
posted @ 2018-07-09 12:14 sherlock-merlin 阅读(175) 评论(0) 推荐(0) 编辑
摘要:yum install mysql mysql-server 或者 yum install mariadb mariadb-server 安装完后启动mysql systemctl start mariadb 设置root密码 mysqladmin -u root password "urpassw 阅读全文
posted @ 2018-07-08 18:30 sherlock-merlin 阅读(430) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示