第八周作业

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

相关推荐

  • 计算机网络基础

    计算机网络基础 分层的网络模型 网络发展到今天,规模很庞大,内容很复杂,不利于网络的管理和教学。网络分层可以:降低网络结构的复杂性、把各层的接口标准化、简化模块设计、确保技术的互操作性、加快发展速度以及简化教学过程。 OSI模型——国际标准:根据国际标准化组织( ISO,International Standards Orgnization)提案,计算机网络…

    Linux干货 2016-11-22
  • 磁盘管理

     磁盘管理  1 磁盘的结构  设备文件     I/O Ports: I/O设备地址  一切皆文件: open(), read(), write(), close()  设备类型: 块设备:block,存取单位“块”,磁盘 字符设备:char,存取单位“字符”,键盘  设备文件:关联至一个设备驱动程序…

    Linux干货 2016-08-26
  • Linux中Vim编辑器的使用

    Linux中Vim编辑器的使用 Vim功能介绍 vim是一款功能丰富而强大的文本编辑器,支持语法高亮,支持多窗口编辑,是vi文本编辑器的增强版。如果在CentOS7.2中如果是选择最小化安装,其默认是没有安装vim rpm包的,需要自行安装,可以使用yum工具进行在线安装。  vim至今已经走过了25个春秋,现在8.0版的已经发布了。  …

    Linux干货 2016-12-02
  • GRUB启动故障排除和内核编译

    如何进入光盘应急系统(以下修复操作仅适用于GRUB legacy, 不适用于GRUB2): 步骤一:给主机挂上安装光盘, 或者有相应启动镜像的硬盘分区(可移动的分区) 步骤二:开机时选择CDROM先启动 步骤三:进入光盘启动界面选择应急救援模式 步骤四: 不选择设置网络接口, 直接读取磁盘分区并以读写方式挂载 步骤五: 选择shell进入bash中对磁盘进行…

    Linux干货 2016-09-12
  • 基于LNMP网站平台,测试增加memcached缓存系统后网站访问效果

    LNMP安装教程链接:22-love cat 17周博客作业第2部分-构建一个LVS-DR模型的高性能集群 memcached 安装及测试效果 一、概念     memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载。它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态…

    Linux干货 2016-08-22
  • Linux系统的介绍及如何获取帮助?(学习笔记)

    第一、Linux 基础   CPU架构:      x86      x64 (amd64)      m68000,m68k      arm    &nbs…

    Linux干货 2016-12-12