随笔分类 - Linux Shell
摘要:前提条件: Linux上安装JDK8: 1.yum -y list java* 2.sudo yum install java-1.8.0-openjdk.x86_64 3.vim /etc/profile 设置到环境变量中: 4.source /etc/profile 环境变量立即生效 5.jav
阅读全文
摘要:1,安装 mailx [root@node 1 opt] yum install mailx 2,编辑配置文件 [root@node 1 opt] vim /etc/mail.rc 添加如下内容 set from=xxxx@163.com set smtp=smtp.163.com set smtp
阅读全文
摘要:1. 查看磁盘使用情况 df h 2. 查看大文件 du h max depth=1 3. 找到五天前的log,删除 find . mtime +5 type f name " .log" exec rm f {} \; 4. 查看大于100M的文件 find / type f size +100M
阅读全文
摘要:使用 r恢复缓存中的文件 vim r swap_file.txt
阅读全文
摘要:```shell
Q: fork: retry: Resource temporarily unavailable
A: ulimit -a #查看open files 和max user processes 的允许数 /etc/security/limits.d/90-nproc.conf 调大数据
```

阅读全文
摘要:SSH 免密登录 1. A服务器上家目录执行:ssh keygen t rsa; 2. A服务器上执行:ssh copy id i ~/.ssh/id_rsa.pub user@10.10.22.11 3. A服务器上执行:ssh user@10.10.22.11 已不需要密码即可登录。 重启tom
阅读全文
摘要:```shell
查看网络流量:
tcpdump -i eth0 按时间顺序列出文件:
ls -ltr
-l use a long listing format
-t sort by modification time
-r reverse order while sorting 实时查看日志:
tail -f /log.txt 查看进程:
ps aux 搜索可用安装包:...
阅读全文
摘要:1.下载 key并添加: http://nginx.org/keys/nginx_signing.key 2.在 /etc/apt/sources.list 文件中加入下面两行: deb http://nginx.org/packages/ubuntu/ codename nginx deb src
阅读全文
摘要:```shell
$ cd
$ ls -al .bash_profile
$ vim .bash_profile
export EXINIT="set ts=4 sw=4" # 在文件最后增加此行设置,tab 空格 4 个 $ source .bash_profile
```
阅读全文
摘要:JAVA: Tomcat: MySQL: Solr: Redis: ActiveMQ:
阅读全文
摘要:1、查看Linux 服务器的CPU 详细情况: cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l --显示物理CPU 个数 cat /proc/cpuinfo | grep "cpu cores" | uniq --显示每个物理
阅读全文
摘要:Cron表达式是一个字符串,字符串以5或6个空格隔开,分为6或7个域,每一个域代表一个含义,Cron有如下两种语法格式: Seconds Minutes Hours DayofMonth Month DayofWeek Year或 Seconds Minutes Hours DayofMonth M
阅读全文
摘要:1. $ ls -l /etc/2. $ vim /etc/vimrc3. 在vimrc 最后一行添加 set bs=4 // 设置tab键位4格4. 重新打开vim,生效。另:set nu //显示行号set nonu //不显示行号set expandtab //把tab 显示成空格se...
阅读全文
摘要:增加中文输入法: 1.用root登录 ,或su root2.yum install "@Chinese Support"3.exit4.回到桌面,system->preferences->input method>Input Method Preferences>Input Method 下拉选择拼
阅读全文
摘要:1.打开虚拟机》Edit》选择VMnet0, VMnet Information 选择Bridged to 1x1 11b/g/n Wireless LAN;然后点击 OK。2. 选择虚拟机右键》Settings》Hardware》Network Adapter》Network Connection...
阅读全文

浙公网安备 33010602011771号