随笔分类 -  linux

摘要:Linux下默认cp命令是有别名(alias cp='cp -i')的,无法强制覆盖,即使你用 -f 参数也无法强制覆盖文件,下面提供Linux下cp 覆盖方法. 1) 取消cp的alias,放心这不是永久生效 #unalias cp #cp a /test/a 2) 用 \cp 执行cp命令时不走 阅读全文
posted @ 2020-10-28 10:46 南侠书生 阅读(1649) 评论(0) 推荐(0)
摘要:firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld 开机启用 : s 阅读全文
posted @ 2019-03-28 10:44 南侠书生 阅读(213) 评论(0) 推荐(0)
摘要:1.centos7版本对防火墙进行 加强,不再使用原来的iptables,启用firewall 2.centos7以下版本 阅读全文
posted @ 2018-07-30 14:13 南侠书生 阅读(212) 评论(0) 推荐(0)
摘要:防火墙重新加载配置firewall-cmd --reload 查看开放的端口 firewall-cmd --list-ports 1.命令行 添加端口2201: firewall-cmd --zone=public --add-port=2201/tcp --permanent 删除端口2201: 阅读全文
posted @ 2018-05-28 10:35 南侠书生 阅读(4208) 评论(0) 推荐(0)
摘要:1.检查当前安装的PHP包 yum list installed | grep php 或者 yum list installed php* 如果要删除,可执行 yum remove php.x86_64 php-cli.x86_64 2.rpm包 CentOs 6.xrpm -Uvh http:/ 阅读全文
posted @ 2018-01-05 11:33 南侠书生 阅读(762) 评论(0) 推荐(0)
摘要:三种状态1. Master发送advertisment,包含本机的priority如果收到比自己大的advertisment,则进入Election状态 2. Election发送advertisment,包含本机的priority如果收到比自己priority高的advertisment,则进入b 阅读全文
posted @ 2017-11-17 09:58 南侠书生 阅读(309) 评论(0) 推荐(0)
摘要:iptables的基本语法格式 iptables [-t 表名] 命令选项 [链名] [条件匹配] [-j 目标动作或跳转] 说明:表名、链名用于指定iptables命令所操作的表和链,命令选项用于指定管理iptables规则的方式(比如:插入、增加、删除、查看等;条件匹配用于指定对符合什么样条件的 阅读全文
posted @ 2017-10-30 11:23 南侠书生 阅读(226) 评论(0) 推荐(0)
摘要:1)分区推荐 2)更新yum源 (收藏 https://mirror.webtatic.com/yum/el7/) cd /etc/yum.repos.d/ 更新源 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo 参考网址(http:/ 阅读全文
posted @ 2017-10-30 10:52 南侠书生 阅读(141) 评论(0) 推荐(0)
摘要:The following tutorial aims to provide you a simple step-by-step guide for setting up MySQL (Master-Slave) Replication in RHEL 6.3/6.2/6.1/6/5.8, Cent 阅读全文
posted @ 2017-10-27 14:46 南侠书生 阅读(359) 评论(0) 推荐(0)
摘要:copy centos 报错 Device eth0 does not seem to be present, delaying initialization: Linux Networking # rm /etc/udev/rules.d/70-persistent-net.rules #nano 阅读全文
posted @ 2017-10-27 10:34 南侠书生 阅读(193) 评论(0) 推荐(0)
摘要:Installing NGINX with PHP on CentOS 6 can be a hassle depending on the install and packages you use. We've made a short and easy guide to install a mi 阅读全文
posted @ 2017-07-19 17:06 南侠书生 阅读(305) 评论(0) 推荐(0)
摘要:cd opt/redis-3.2.1/ cd src ./redis-cli get token:xxx del token:xxx set token:xxx 启动 redis-3.2.1/src/redis-server redis-3.2.1/src/redis.conf ps auxf | 阅读全文
posted @ 2016-07-22 10:32 南侠书生 阅读(420) 评论(0) 推荐(0)
摘要:举例文件夹: tong 压缩: tar -czf tong.tar.gz tong tar zvf tong.rar tong 解压缩:tar -xvzf tong.tar.gz -C /www/ (把tong压缩包解压到 /www/ 的目录下切记是大写的-C ) tar xvf tong.rar 阅读全文
posted @ 2016-05-11 17:27 南侠书生 阅读(693) 评论(0) 推荐(0)
摘要:【查看内存使用】 free -m (m是兆的意思) 显示cpu使用率 top 1 查看CPU 1.1 查看CPU个数 # cat /proc/cpuinfo | grep "physical id" | uniq | wc -l 2**uniq命令:删除重复行;wc –l命令:统计行数** 1.2 阅读全文
posted @ 2015-12-22 15:29 南侠书生 阅读(329) 评论(0) 推荐(0)
摘要:(1)首先安装EPEL Repository ## RHEL/CentOS 6 32-Bit ## # wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm # rpm... 阅读全文
posted @ 2015-12-01 11:23 南侠书生 阅读(571) 评论(0) 推荐(0)
摘要:重装了系统,新建了一个ubuntu虚拟机,加载原来的镜像,结果启动后网络变得不正常了,提示信息Waiting for network configuration...Waiting up to 60 more seconds for network configuration...系统登入以后,执行... 阅读全文
posted @ 2015-07-20 15:22 南侠书生 阅读(495) 评论(0) 推荐(0)
摘要:find / -iname "redmine" 查找文件夹 || find / -type d -name 'redmine' 查找文件夹 find / -name php-fpm.conf 查找 /etc/文件夹有php_value的文件 grep -lR 'php_value' /etc/ ca 阅读全文
posted @ 2013-09-22 17:20 南侠书生 阅读(8724) 评论(0) 推荐(1)