随笔分类 -  Linux

Linux 服务器管理、运维等
摘要:文件与目录操作ls:列出目录内容。例如,ls -l 以详细格式显示文件信息。‌ cd:切换目录。例如,cd /home 进入 /home 目录,cd .. 返回上一级目录。‌ pwd:显示当前工作目录的路径。‌ mkdir:创建新目录。例如,mkdir newdir 创建名为 newdir 的目录。 阅读全文
posted @ 2025-12-05 15:58 cnlovefish 阅读(22) 评论(0) 推荐(0)
摘要:#cd /usr/local #yum -y groupinstall "Development tools" #yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel 阅读全文
posted @ 2024-03-03 17:38 cnlovefish 阅读(278) 评论(0) 推荐(0)
摘要:#cd /usr/local #yum -y groupinstall "Development tools" #yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel 阅读全文
posted @ 2024-03-02 22:02 cnlovefish 阅读(553) 评论(0) 推荐(0)
摘要:#yum install tcl-devel libpng-devel libjpeg-devel bzip2-devel freetype-devel libtiff-devel ghostscript-devel#yum -y install ImageMagick#yum -y install 阅读全文
posted @ 2024-02-21 01:52 cnlovefish 阅读(263) 评论(0) 推荐(0)
摘要:convert 20240220220452.jpg -channel rgba -matte -fuzz 10% -fill "rgba(255,255,255,0.5)" -opaque "rgb(255,255,255)" semi_transparent_20240220220452.png 阅读全文
posted @ 2024-02-21 01:51 cnlovefish 阅读(179) 评论(0) 推荐(0)
摘要:命令为 ps -ef | grep 进程名 | grep -v grep |awk '{print "kill -9 "$2}'|bash例如:后台启动了n个java程序,想要一下子都杀掉,启动时候执行该命令启动的 java cn.edu.ruc.cmd.BootStrap 则批量杀进程命令为 ps 阅读全文
posted @ 2023-07-18 11:41 cnlovefish 阅读(1133) 评论(0) 推荐(0)
摘要:#!/bin/bash File_Name=/root/a.txt if (whiptail --title "代码升级" --yesno "确定升级测试版吗?" 10 60) then if [ -e "$File_Name" ] then rm -f $File_Name else echo " 阅读全文
posted @ 2023-07-13 15:31 cnlovefish 阅读(24) 评论(0) 推荐(0)
摘要:cd /etc/init.dvi startall.sh里面的内容是: # chkconfig: 2345 10 90 # description: start myservice on boot /usr/local/php/bin/php /var/www/lyjt_wtx_mg/html/Pu 阅读全文
posted @ 2023-05-24 17:10 cnlovefish 阅读(106) 评论(0) 推荐(0)
摘要:yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum 阅读全文
posted @ 2021-02-16 22:41 cnlovefish 阅读(724) 评论(0) 推荐(0)
摘要:参考https://www.cnblogs.com/lazyInsects/p/9778910.html cd /usr/src wget https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.xzlstar xvf 阅读全文
posted @ 2020-07-24 09:20 cnlovefish 阅读(325) 评论(0) 推荐(1)
摘要:比如我们要在目录/usr/local/nginx/conf/vhost/下查找baidu.com这个关键字的文件 方法1: find /usr/local/nginx/conf/vhost/ -exec grep "baidu.com" '{}' \; -print 方法2:grep -R "bai 阅读全文
posted @ 2020-06-08 16:32 cnlovefish 阅读(668) 评论(0) 推荐(0)
摘要:找到redis 安装目录 例如 cd /usr/local/redis 打开 redis.conf 修改以下参数: # vi /usr/local/redis/etc/redis.conf appendonly yes (默认no,关闭)表示是否开启AOF持久化: appendfilename “a 阅读全文
posted @ 2020-06-08 10:12 cnlovefish 阅读(3974) 评论(0) 推荐(0)
摘要:[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33 TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="static" DEFROUTE=" 阅读全文
posted @ 2020-05-23 15:06 cnlovefish 阅读(231) 评论(0) 推荐(0)
摘要:$ip a 看见系统中有两块网卡 lo: ...... ens33: ...... #cd /etc/netplan$ls目录下面有文件01-network-manager-all.yaml $sudo vim 01-network-manager-all.yaml 文件内容类似如下 一定要注意ya 阅读全文
posted @ 2020-05-23 14:12 cnlovefish 阅读(580) 评论(0) 推荐(0)
摘要:$sudo which iptables /usr/sbin/iptables说明有安装 如果没有安装,那么使用sudo apt-get install iptables 安装。 刚装机,是这个样子。 $sudo iptables -LChain INPUT (policy DROP)target 阅读全文
posted @ 2020-05-23 14:11 cnlovefish 阅读(615) 评论(0) 推荐(0)
摘要:$sudo vi /lib/systemd/system/rc-local.service内容如下[Unit]Description=/etc/rc.local CompatibilityDocumentation=man:systemd-rc-local-generator(8)Condition 阅读全文
posted @ 2020-05-23 14:10 cnlovefish 阅读(580) 评论(0) 推荐(0)
摘要:#mkdir /home/redishome#mkdir /home/redishome/data#chmod -R 777 /home/redishome把redis.conf传到/home/redishome目录下 # docker search redis docker pull redis 阅读全文
posted @ 2020-05-23 13:55 cnlovefish 阅读(127) 评论(0) 推荐(0)
摘要:相信不少SecureCRT的新手都有过这样的困扰:SecureCRT 超时自动断开连接 很影响工作 解决办法: Options->Session Options->Terminal->Anti-idle->勾选Send protocol NO-OP (中文版:选项->会话选项->终端->发送协议NO 阅读全文
posted @ 2020-05-23 13:50 cnlovefish 阅读(1188) 评论(0) 推荐(0)
摘要:samba的用途:有的时候,我们需要在centos7 的文件能共享给其他机器。 rpm -qa|grep samba yum install -y samba setenforce 0 sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selin 阅读全文
posted @ 2020-05-23 13:45 cnlovefish 阅读(698) 评论(0) 推荐(0)