标签: Linux

45 篇文章

Centos 7 调整 root 和 home 的容量大小
查看磁盘的空间大小: df -h 备份/home : cp -r /home/ homebak/ 卸载 /home : umount /home 如果出现 home 存在进程,使用 fuser -m -v -i -k /home 终止 home 下的进程,最后使用 umount /home 卸载 /home 删除/home所在的lv : lvrem…
yum保存下载安装包
方法1.利用yum的缓存功能 用yum安装软件的时候,首先会下载安装包,但是没有保存,如果想要缓存的安装包,要开启缓存功能。 vi /etc/yum.conf #将其中的keepcache=0改为1,保存退出 yum install httpd #查看缓存目录 cd /var/cache/yum/$basearch/$releasever 方法2.…
Linux快速内容搜索命令ack
安装 yum install ack 使用 ack 'someword' 不区分大小写 ack -i 'someword' 在指定的文件类型中搜索 ack 'someword' --type=php ack非常高效,可以在当前文件夹及子文件夹中快速搜索
thumbnail
Centos7下使用mysql安装包安装mysql5.7
1、检查系统是否安装过mysql #检查系统中有无安装过mysql rpm -qa|grep mysql #查询所有mysql 对应的文件夹,全部删除 whereis mysql find / -name mysql 2、卸载CentOS7系统自带mariadb # 查看系统自带的Mariadb [root@hspEdu01 ~]# rpm…
Centos7 firewall指定IP段与端口访问
添加某个ip段对某端口的访问 firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="113.0.0.0/8" port port="8003" protocol="tcp" accept' #重新载入,使配置生效 firewall-cmd --rel…
Centos查看系统/Nginx/Mysql版本
1、查看系统版本 [root@OK]# cat /etc/redhat-release CentOS release 6.10 (Final) 2、查看Nginx版本,使用命令:nginx -v 如果是源码包安装 可能不会找到nginx 命令 需要使用完整路径 例如 [root@OK]# ps -ef | grep nginx#查找…
Linux服务器中查看公网ip
在linux中我们输入ifconfig只能查看到内网的ip,我们经常需要知道服务器的外网ip,在linux服务器中如何查看外网ip有很多种方法,以下是3种比较方便的方法 curl ip.sb X.X.X.X curl http://httpbin.org/ip {"origin": "X.X.X.X"} curl cip.cc IP : X.X.X…