第八周作业

1、写一个脚本,使用ping命令探测172.16.250.1-172.16.250.254之间的所有主机的在线状态;
     在线的主机使用绿色显示;
     不在线的主使用红色显示;

#!/bin/bash
for i in {1..254};do
        if ping -c 1 -w 1 192.168.1.$i &> /dev/null;then
                echo -e "\033[32m192.168.1.$i\033[0m is up"
        else
                echo -e "\033[31m192.168.1.$i\033[0m is down"
        fi
done


2、如何给网络接口配置多个地址,有哪些

1.使用ifcfg工具来配置

[root@localhost ~]# ifconfig                                                       #先查看下本地网络接口,以ens36为例进行配置多个地址
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.22  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::e4e8:fedc:3ce4:f467  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ca:aa:a0  txqueuelen 1000  (Ethernet)
        RX packets 258664  bytes 16503651 (15.7 MiB)
        RX errors 0  dropped 41  overruns 0  frame 0
        TX packets 21160  bytes 2557022 (2.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens36: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.25  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::e9d2:3bcd:cc12:fcd6  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ca:aa:aa  txqueuelen 1000  (Ethernet)
        RX packets 128498  bytes 8532781 (8.1 MiB)
        RX errors 0  dropped 7653  overruns 0  frame 0
        TX packets 17151  bytes 2660221 (2.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 210  bytes 18936 (18.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 210  bytes 18936 (18.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:ee:0e:1c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost ~]# ifconfig  ens36:0 192.168.1.101/24                              #ifconfig进行配置多地址时需要在接口号后面加上:#来进行配置多个地址
[root@localhost ~]# ifconfig                                                        #再次查看本地网络接口时出现一个名为ens36:0的接口号,这个为ens36的第2个网络地址
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.22  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::e4e8:fedc:3ce4:f467  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ca:aa:a0  txqueuelen 1000  (Ethernet)
        RX packets 259063  bytes 16528702 (15.7 MiB)
        RX errors 0  dropped 41  overruns 0  frame 0
        TX packets 21174  bytes 2558222 (2.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens36: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.25  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::e9d2:3bcd:cc12:fcd6  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ca:aa:aa  txqueuelen 1000  (Ethernet)
        RX packets 129198  bytes 8583799 (8.1 MiB)
        RX errors 0  dropped 7653  overruns 0  frame 0
        TX packets 17375  bytes 2687139 (2.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens36:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.101  netmask 255.255.255.0  broadcast 192.168.1.255
        ether 00:0c:29:ca:aa:aa  txqueuelen 1000  (Ethernet)

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 210  bytes 18936 (18.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 210  bytes 18936 (18.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:ee:0e:1c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

2.使用ip命令进行配置

[root@localhost ~]# ip addr list                                                                          #使用ip addr list来查看本地接口配置,依旧以ens36为例进行配置
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:ca:aa:a0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.22/24 brd 192.168.1.255 scope global dynamic ens33
       valid_lft 85503sec preferred_lft 85503sec
    inet6 fe80::e4e8:fedc:3ce4:f467/64 scope link 
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether 52:54:00:ee:0e:1c brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000
    link/ether 52:54:00:ee:0e:1c brd ff:ff:ff:ff:ff:ff
5: ens36: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:ca:aa:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.25/24 brd 192.168.1.255 scope global dynamic ens36
       valid_lft 55915sec preferred_lft 55915sec
    inet 192.168.1.101/24 brd 192.168.1.255 scope global secondary ens36:0                            #此为刚才ifconfig命令配置的地址
       valid_lft forever preferred_lft forever
    inet6 fe80::e9d2:3bcd:cc12:fcd6/64 scope link 
       valid_lft forever preferred_lft forever
[root@localhost ~]# ip addr add 192.168.1.102/24 dev ens36                                             #使用 ip addr add命令为ens36添加地址为192.168.1.102/24的地址
[root@localhost ~]# ip addr lis                                                                        #配置完毕再次查看接口
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:ca:aa:a0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.22/24 brd 192.168.1.255 scope global dynamic ens33
       valid_lft 85418sec preferred_lft 85418sec
    inet6 fe80::e4e8:fedc:3ce4:f467/64 scope link 
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether 52:54:00:ee:0e:1c brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000
    link/ether 52:54:00:ee:0e:1c brd ff:ff:ff:ff:ff:ff
5: ens36: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:ca:aa:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.25/24 brd 192.168.1.255 scope global dynamic ens36
       valid_lft 55830sec preferred_lft 55830sec
    inet 192.168.1.101/24 brd 192.168.1.255 scope global secondary ens36:0
       valid_lft forever preferred_lft forever
    inet 192.168.1.102/24 scope global secondary ens36                                               #此为是用ip命令为此接口配置的第3条地址
       valid_lft forever preferred_lft forever
    inet6 fe80::e9d2:3bcd:cc12:fcd6/64 scope link 
       valid_lft forever preferred_lft forever

注意:以上2条命令为通过命令直接送至内核当场有效,重启后无效,若要永久有效需通过修改配置文件来实现。

3.通过修改配置文件进行配置

网络配置的配置文件在/etc/sysconfig/network-scripts/下以ifcfg-IFACE名明的文件。

[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# ls                                                                                           #此处任然以ifcfg-ens36为例,由于是命令行配置的地址所以没有配置文件需要手动去创建配置文件
ifcfg-ens33  ifdown-ippp    ifdown-sit       ifup-bnep  ifup-plip    ifup-Team          network-functions-ipv6
ifcfg-lo     ifdown-ipv6    ifdown-Team      ifup-eth   ifup-plusb   ifup-TeamPort
ifdown       ifdown-isdn    ifdown-TeamPort  ifup-ib    ifup-post    ifup-tunnel
ifdown-bnep  ifdown-post    ifdown-tunnel    ifup-ippp  ifup-ppp     ifup-wireless
ifdown-eth   ifdown-ppp     ifup             ifup-ipv6  ifup-routes  init.ipv6-global
ifdown-ib    ifdown-routes  ifup-aliases     ifup-isdn  ifup-sit     network-functions

[root@localhost network-scripts]# cp ifcfg-ens33 ifcfg-ens36                                                                  #复制ens33的配置文件命名为ens36然后进行手动配置
[root@localhost network-scripts]# ls
ifcfg-ens33  ifdown-ib    ifdown-routes    ifup-aliases  ifup-isdn    ifup-sit          network-functions
ifcfg-ens36  ifdown-ippp  ifdown-sit       ifup-bnep     ifup-plip    ifup-Team         network-functions-ipv6
ifcfg-lo     ifdown-ipv6  ifdown-Team      ifup-eth      ifup-plusb   ifup-TeamPort
ifdown       ifdown-isdn  ifdown-TeamPort  ifup-ib       ifup-post    ifup-tunnel
ifdown-bnep  ifdown-post  ifdown-tunnel    ifup-ippp     ifup-ppp     ifup-wireless
ifdown-eth   ifdown-ppp   ifup             ifup-ipv6     ifup-routes  init.ipv6-global

使用vim编辑ifcfg-ens36这个文件

TYPE="Ethernet"
BOOTPROTO="static"
IPADDR="192.168.2.100"
NETMASK="255.255.255.0"
GATEWAY="192.168.2.1"
NAME="ens36"
DEVICE="ens36"
ONBOOT="yes"
~                        

配置完成后保存退出,由于是通过配置文件进行修改,此时需要重启网络服务

[root@localhost network-scripts]# systemctl restart network                          #重启网络服务
[root@localhost network-scripts]# ifconfig                                           #再次查看网络接口
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.22  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::e4e8:fedc:3ce4:f467  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ca:aa:a0  txqueuelen 1000  (Ethernet)
        RX packets 268920  bytes 17141298 (16.3 MiB)
        RX errors 0  dropped 42  overruns 0  frame 0
        TX packets 21373  bytes 2579314 (2.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens36: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.100  netmask 255.255.255.0  broadcast 192.168.2.255          #此时接口地址已经变为配置文件所修改的内容
        inet6 fe80::20c:29ff:feca:aaaa  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ca:aa:aa  txqueuelen 1000  (Ethernet)
        RX packets 140651  bytes 9339322 (8.9 MiB)
        RX errors 0  dropped 7666  overruns 0  frame 0
        TX packets 19594  bytes 2914428 (2.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 262  bytes 23376 (22.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 262  bytes 23376 (22.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:ee:0e:1c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

再此需要对此接口进行配置网络地址时,需要复制原配置文件并把配置文件名字改为原名字后加上:#的格式,然后使用vim对配置文件内容进行修改

[root@localhost network-scripts]# cp ifcfg-ens36 ifcfg-ens36:0                     #复制原文件改名
[root@localhost network-scripts]# vim ifcfg-ens36:0                                #编辑此配置文件

TYPE="Ethernet"
BOOTPROTO="static"
IPADDR="192.168.2.105"
NETMASK="255.255.255.0"
GATEWAY="192.168.2.1"
NAME="ens36:0"
DEVICE="ens36:0"
ONBOOT="yes"
~               
[root@localhost network-scripts]# systemctl restart network                          #重启网络服务
[root@localhost network-scripts]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.22  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::e4e8:fedc:3ce4:f467  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ca:aa:a0  txqueuelen 1000  (Ethernet)
        RX packets 269861  bytes 17214441 (16.4 MiB)
        RX errors 0  dropped 42  overruns 0  frame 0
        TX packets 21709  bytes 2627749 (2.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens36: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.100  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::20c:29ff:feca:aaaa  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ca:aa:aa  txqueuelen 1000  (Ethernet)
        RX packets 141164  bytes 9373345 (8.9 MiB)
        RX errors 0  dropped 7821  overruns 0  frame 0
        TX packets 19629  bytes 2919336 (2.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens36:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500                    #此时出现了ens36接口上的第二个网络地址
        inet 192.168.2.105  netmask 255.255.255.0  broadcast 192.168.2.255
        ether 00:0c:29:ca:aa:aa  txqueuelen 1000  (Ethernet)

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 298  bytes 26456 (25.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 298  bytes 26456 (25.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:ee:0e:1c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

4.使用nmcli命令添加地址

[root@localhost network-scripts]# nmcli conn modify ens36 +ipv4.address 192.168.2.201/24        #为ens36显卡添加新地址
[root@localhost network-scripts]# systemctl restart network                                     #重启网路服务
[root@localhost network-scripts]# nmcli dev show ens36
GENERAL.设备:                           ens36
GENERAL.类型:                           ethernet
GENERAL.硬盘:                           00:0C:29:CA:AA:AA
GENERAL.MTU:                            1500
GENERAL.状态:                           100 (连接的)
GENERAL.CONNECTION:                     ens36
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/31
WIRED-PROPERTIES.容器:                  开
IP4.地址[1]:                            192.168.2.100/24
IP4.地址[2]:                            192.168.2.201/24                                       #此处为新添加的网络地址
IP4.地址[3]:                            192.168.2.105/24
IP4.网关:                               192.168.2.1
IP6.地址[1]:                            fe80::20c:29ff:feca:aaaa/64
IP6.网关:                               

5.使用nmtui进行配置

第八周作业第八周作业第八周作业

完成配置后保存退出


3、写一个脚本,完成以下功能
   (1) 假设某目录(/etc/rc.d/rc3.d/)下分别有K开头的文件和S开头的文件若干;
   (2) 显示所有以K开头的文件的文件名,并且给其附加一个stop字符串;
   (3) 显示所有以S开头的文件的文件名,并且给其附加一个start字符串;
   (4) 分别统计S开头和K开头的文件各有多少;

#!/bin/bash
declare -i n=0;
declare -i m=0;
for FILE in `ls /etc/rc.d/rc3.d`;do
        if [[ $FILE =~ ^K ]];then
                echo "$FILE stop"
                let n=$n+1
        elif [[ $FILE =~ ^S ]];then
                echo "$FILE start"
                let m=$m+1
        fi
done
echo "First char is S = $m , First char is K = $n"

4、写一个脚本,完成以下功能
   (1) 脚本能接受用户名作为参数;
   (2) 计算此些用户的ID之和;

#!/bin/bash
declare -i SUM=0
for i in $@;do
        if ! id $i &> /dev/null ; then
                echo "$i is not exists"
        else
                let SUM=$SUM+$(id -u $i);
        fi
done
echo "uid sum = $SUM"
       


5、写一个脚本
   (1) 传递一些目录给此脚本;
   (2) 逐个显示每个目录的所有一级文件或子目录的内容类型;
   (3) 统计一共有多少个目录;且一共显示了多少个文件的内容类型;

#!/bin/bash
declare -i dir=0
declare -i filetype=0
for i in $@;do
        if [ -d $i ];then
                for j in $i/*;do
                        file $j &> /dev/null
                        let filetype=$filetype+1
                        if [ -d $j ];then
                                let dir=$dir+1
                        fi

                done
        else
                echo "$i is not a dirfile or not exists"
        fi
done
echo " dir = $dir ,all file = $filetype

6、写一个脚本
  通过命令行传递一个参数给脚本,参数为用户名
  如果用户的id号大于等于500,则显示此用户为普通用户

#!/bin/bash
read -p "please send a username:" UNAME
if id $UNAME &> /dev/null ;then
        if [ $(id -u $UNAME) -gt 500 ];then
                echo "this is a normal user"
        fi
else
        echo "no this user"
fi

7、写一脚本,用ping命令测试172.16.250.20-172.16.250.100以内有哪些主机在线,将在线的显示出来;

#!/bin/bash
for i in {20..100};do
        if ping -c 1 -w 1 172.16.250.$i &> /dev/null;then
                echo "172.16.250.$i online"
        fi
done

8、打印九九乘法表;

#!/bin/bash
for i in {1..9};do
        for j in `seq $i`;do
                let num=$j*$i
                echo -n -e "$j*$i=$num\t"
        done
        echo
done

原创文章,作者:M36-Masuri,如若转载,请注明出处:http://www.178linux.com/79365

(0)
M36-MasuriM36-Masuri
上一篇 2017-07-03
下一篇 2017-07-03

相关推荐

  • 十四.Linux博客-2016年8月22日数组

    格式说明: 操作 概念 命令 说明及举例 十四.数组 数组概念 变量:存储单个元素的内存空间数组:存储多个元素的连续的内存空间,相当于多个变量的集合。数组名和索引索引:编号从0开始,属于数值索引注意:索引可支持使用自定义的格式,而不仅是数值格式,即为关联索引,bash4.0版本之后开始支持。bash的数组支持稀疏格式(索引不连续) 声明数组declare -…

    Linux干货 2016-08-24
  • 高阶函数&&装饰器

    Edit 高阶函数&&装饰器 高阶函数 first class object 函数在python中是一等公民 函数也是对象,可调用的对象 函数可以作为普通比变量、参数、返回值 高阶函数 数学概念:y = g(f(x)) 在数学和计算机科学中,高阶函数应当是至少满足下面一个条件的函数 接受一个或多个函数作为参数 输出一个函数,return 函数…

    Linux干货 2017-10-24
  • LINUX课堂笔记(第一周)

    2018.03.05 LINUX: 切换虚拟终端:CTRL+ALT+F[1-6] 查看当前得终端设备命令:tty 查看内存: cat /proc/meminfo free -h 查看分区: cat /proc/partitions lsblk 查看CPU: lscpu cat /proc/cpuinfo 查看版本 cat /etc/centos-releas…

    Linux干货 2018-03-15
  • Linux系统基础命令

    Linux下一些基本常用命令:   1、Lscpu:显示CPU架构详细信息; [root@centos6 ~]#lscpu 2、Cat:查看合并文件到标准输出; [root@centos6 ~]#cat file    Tac:显示的文本与cat显示的文本相反; 3、Who:显示都有那些用户登录到了系统; [root@…

    Linux干货 2016-07-26
  • AIX 6.1 硬件基本管理

    查看整体的硬件信息:          # prtconf #将所有系统信息输出到屏幕上显示          # lsdev -C #查看硬件设备信息及其工作状态 注:硬件的设备通常为2 种状态,"availiable"表示设备可用,de…

    Linux干货 2015-10-18
  • Nginx 负载均衡多个nmmp主机

    设计拓扑图 一、Memcache简介 cache(缓存系统) 高性能分布式缓存服务器,缓存所有的“可流式化”数据:livejournal旗下Danga Interacive公司 程序=指令+数据 指令:程序 数据:IO操作 文件系统: 特征:协议简单  基于libevent的事件处理  内置内存存储方式  memcached 不…

    2014-09-17