Linux基础
Administrator4
不告诉你
展开
-
第三个:Linux配置第三方邮件代理,发送邮件与测试!
意思就是使用自己的Linux服务器代理一个已有的邮箱(比如163.com),向另外一个邮箱(比如qq.com)发送电子邮件。例如我自己这次测试:1、系统 CentOS Linux release 7.4.1708 (Core)2、安装mailx [root@m01 ~]#yum install mailx [root@m01 ~]# mail -V 12.5 ...原创 2018-06-21 14:42:14 · 4628 阅读 · 0 评论 -
Linux:echo $?
该指令,会返回什么呢?原创 2018-08-23 16:13:36 · 2386 阅读 · 0 评论 -
bash的基础特性
===================bash编程初步==============bash基础特性(1): 命令行展开:~,{} 命令别名:alias/unalias 命令历史:history 命令和路径补全:$PATH glob:*,?,[],[^] 快捷键:Ctrl+{a,e,l,u,k,c} 命令hash:hashbash基础特...原创 2018-07-18 13:48:04 · 194 阅读 · 0 评论 -
Linux:一些重要的命令用法总结
#Linux基础命令##################测试文本#####################[root@m01 ~]# vim /data/test.txt I like Linux123451 2 3@##$%%hello worldHELLO WORLD####################测试文本######################1、文件管理***cat***:co...原创 2018-07-05 16:11:50 · 225 阅读 · 0 评论 -
Linux:grep 用法详解
grep 用法详解 选项: --color=auto: 对匹配到的文本着色显示; -v: 显示不能够被pattern匹配到的行; -i: 忽略字符大小写; -o: 仅显示匹配到的字符串...原创 2018-07-10 17:41:58 · 279 阅读 · 0 评论 -
Linux:用户管理几个重要的命令
1:添加普通用户user1useradd user12:查看user1[root@m01 ~]# id user1uid=1002(user1) gid=1002(user1) groups=1002(user1)3:修改user1相关属性usermod -u --修改uid -g --修改gid -c --修改说明(/etc/passwd中的一个字段) ...原创 2018-06-28 14:16:30 · 240 阅读 · 0 评论 -
Linux:用户权限管理
主要关注3个文件:1: cat /etc/passwd[root@m01 ~]# cat /etc/passwdroot:x:0:0:root:/root:/bin/bash --用户名:密码占位符:UID:GID:用户身份信息:用户家目录:用户默认shellbin:x:1:1:bin:/bin:/sbin/nologindaemon:x:2:2:daemon:/sbin:/s...原创 2018-06-27 15:32:33 · 473 阅读 · 0 评论 -
Linux:bash之命令替换
使用方法:使用bash执行一个命令时,将另一个bash命令的执行结果作为命令元素。例子: 1:自定义打印当前所在路径 [root@m01 etc]# cd /etc/sysconfig/ [root@m01 sysconfig]# echo "the current dirctory is $(pwd)" the current dirctory i...原创 2018-06-27 13:52:47 · 1195 阅读 · 0 评论 -
Linux:常用基本快捷指令
1、history:查看命令历史缓冲区 !n --执行命令历史中的第n条命令 !! --执行命令历史中最后一条命令2、ESC + . 快捷补全上次打开的路径3、alias:别名 用法 --alias newname=‘oldname’ 例子: alias cls='clear'4、...原创 2018-06-27 09:56:28 · 217 阅读 · 0 评论 -
第二个:ssh秘钥分发脚本
#管理机创建公钥(dsa)ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa >/dev/null 2>&1#服务器密码统一,可以这样玩password=123456#分发密钥for i in "192.168.10.10" "192.168.10.11" "192.168.10.12" do sshpass...转载 2018-06-20 10:20:25 · 376 阅读 · 0 评论 -
第一个:Linux系统性能优化
#安装常用工具,添加国内源yum install wget net-tools -ymv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupwget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-...原创 2018-06-20 09:30:17 · 424 阅读 · 0 评论 -
Linux:文本相关命令
文本查看:1、cat:连接文件并显示 --tac:反向查看文件 -n 显示行号 -E 显示行结束符($)2、more,less分屏显示 more:向后翻 less :和man一样3、head,tail head:查看前n(10)行 tail:查看后n行 tail -f:查看文件尾部,不退出,等待显示后续追加至此文件的新内容文本处理:...原创 2018-06-26 14:35:04 · 146 阅读 · 0 评论 -
Linux:文件管理命令
1、type 显示别名2、file 显示文件信息3、copy -a 归档复制,常用于备份 -r 递归复制 -f 强行复制 -i 交换式显示 -p 保留属组,属主信息4、mv 移动文件5、cal,date,clock=hwclock cal:查看日历...原创 2018-06-25 15:42:02 · 169 阅读 · 0 评论 -
第四个:centos7搭建nginx环境
1、nginx-1.14最新版本 http://nginx.org/download/nginx-1.14.0.tar.gz2、安装依赖: yum -y install gcc gcc-c++ autoconf automakeyum -y install pcre pcre-develyum -y install openssl openssl-develyum -y install z...原创 2018-06-22 17:50:20 · 191 阅读 · 0 评论 -
Linux:GCC
GCC(1) GNU GCC(1)NAME gcc - GNU project C and C++ compiler SYNOPSIS gcc [-c|-S|-E] [-std=stand...原创 2018-08-23 16:16:06 · 166 阅读 · 0 评论