随笔分类 - linux
摘要:[root@muze1 ~]$ vi /etc/ssh/sshd_config 修改如下2个选项: GSSAPIAuthentication no UseDNS no 重启ssh服务 [root@muze1 ~]$ systemctl restart sshd
阅读全文
摘要:[root@sfzwapp2 /]# umount -f /app umount2: Device or resource busy umount: /app: device is busy. (In some cases useful info about processes that use t
阅读全文
摘要:top中使用CPU或MEM排序,还是看不到我们想了解的进程的相关信息;这时就可以指定对某个或某些进程进行TOP信息显示;1、查看某个进程的信息例:mysqld的信息(1)得到mysqld进程的pid[root@6 ~]# pidof mysqld21538(2)top指定查看PID[root@6 ~
阅读全文
摘要:[root@sfzwapp2 /]# mkdir /home/iso [root@sfzwapp2 /]# mkdir /home/linuxsource [root@sfzwapp2 /]# mkdir /mnt/soft [root@sfzwapp2 home]# mount -t nfs -o
阅读全文
摘要:umount时提示device is busy,如下:# umount /data/disk1umount: /data/disk1: device is busy. (In some cases useful info about processes that use the device is
阅读全文
摘要:[root@edc01 ~]# free -m total used free shared buffers cached Mem: 15951 15779 171 0 300 4223 -/+ buffers/cache: 11256 4694 Swap: 0 0 0 [root@edc01 ~]
阅读全文
摘要:NFS 文件服务的 /data/share 通过NFS挂载共享给ng服务器。 一 、 NFS 服务端 172.31.17.91 上 创建共享目录 mkdir /data/share 附权限 chown -R ifly:ifly /data/share chmod -R 777 /data/share
阅读全文
摘要:[root@lzx1 ~]# date -RMon, 19 Jun 2017 14:45:05 +0000 vim /etc/profileexport TZ='CST-8'vim .bash_profileexport TZ='CST-8'source /etc/profile source .b
阅读全文
摘要:du -h --max-depth=1|sort -rn 空间占用按照大小排序 通过输入流快速清空大文件。>server.log 查出文件删除的进程pid ,进程释放掉,空间也就会释放。lsof|grep deletekill -9 pid
阅读全文
摘要:[root@aa ~]# netstat -nat |awk -F ' ' '{print $6}'establishedForeignLISTENLISTENLISTENLISTENTIME_WAITTIME_WAITESTABLISHEDESTABLISHEDLISTENLISTENLISTEN
阅读全文
摘要:转自:https://www.jianshu.com/p/093d712c777d 1. 扫描主机端口状态 #!/bin/bash HOST=$1 PORT="22 80 8080 3306" for PORT in $PORT; do if echo &>/dev/null > /dev/tcp/
阅读全文
摘要:1.下载软件包 [root@pxc2 opt]# wget https://www.rarlab.com/rar/rarlinux-x64-5.6.0.tar.gz 2.解压 [root@pxc2 opt]# tar -zxvf rarlinux-x64-5.6.0.tar.gz 3.安装 [roo
阅读全文
摘要:[root@pxc3 ~]# vi function8.sh#!/bin/bashtext="global variable"tj=91850use_local_var_fun(){ local text="local variable" echo "In function use_local_va
阅读全文
摘要:#!/bin/bashshow_week(){ for day in Monday Tuesday Wednesday Thursday Friday Saturday Sunday do echo "$day " done} show_number(){ for (( i = 1; i <= 7;
阅读全文
摘要:#! /bin/bashparameter=ind_argind_arg=Helloind_func(){ echo "$1"}ind_fun(){ echo "test!!!"}ind_func "$1"ind_func "$parameter"ind_func "${!parameter}"in
阅读全文
摘要:假设在win(192.168.0.101)上安装了xmanager,想接收来自linux(192.168.100.16)的图形界面。1.在win端打开Xmanager - Passive 2.在linux上设置DISPLAY环境变量 export DISPLAY=192.168.0.101:0.0
阅读全文
摘要:centos6下修改hostname [root@centos6 ~]$ hostname # 查看当前的hostnmae centos6.magedu.com [root@centos6 ~]$ vim /etc/sysconfig/network # 编辑network文件修改hostname行
阅读全文
摘要:#!/bin/shdatetime=`date +%Y%m%d%H%M%S` user=`whoami`logDir=/app/logs/sg_qyjx domainBase=/app/weblogic/domains domainName=qyjx_cluster adminip=192.168.
阅读全文
摘要:1) -p 指定要显示的提示 [root@muze1 home]$ cat test1.sh #! /bin/bashread -p "Please input your age: " agedays=$[ $age * 365 ]echo "That makes you over $days da
阅读全文
摘要:今天在编译安装一个源码包的时候,看到麦老师使用了一个make -j 8的参数,make命令常见用来进行编译的,编译完成后执行make install进行安装,可是-j 8 是用来做什么的?用make -j带一个参数,可以并行编译,多核CPU的机器上,make -j 参数这样可以更有效的利用CPU资源
阅读全文