无法安装Adobe AIR 提示,管理员不允许在系统上安装和卸载Adobe AIR
Windows Install Clean Up 百度网盘有保存(msicuu2.exe)
链接:http://pan.baidu.com/s/1bnjUYcB 密码:ktw7
参考文档:
http://www.dnpz.net/guzhang/1158.html
无法安装Adobe AIR 提示,管理员不允许在系统上安装和卸载Adobe AIR
Windows Install Clean Up 百度网盘有保存(msicuu2.exe)
链接:http://pan.baidu.com/s/1bnjUYcB 密码:ktw7
参考文档:
http://www.dnpz.net/guzhang/1158.html
问题现象:
公司重装修后,门禁的网线连接交换机,交换机的指示灯亮一下就灭,等几秒再重复亮、灭
经测线仪测试,6线不通(网线 1 2 3 6),导致。
IOS
1 | Cisco IOS Software, C3750E Software (C3750E-UNIVERSALK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1) |
故障现象:
故障接口插不插网线指示灯都为 桔红色,查看接口状态为
1 | #sh interfaces status |
2 | Port Name Status Vlan Duplex Speed Type |
3 | Gi1/0/48 err-disabled 1 auto auto 10/100/1000BaseTX |
原因查找:
01 | 查看err-disable原因 |
02 | #show interface status err-disable |
03 |
04 | Port Name Status Reason Err-disabled Vlans |
05 | Gi1 /0/48 err-disabled loopback |
06 |
07 | loopback,看来是环路了 |
08 |
09 | #看看具体配置 |
10 |
11 | #查看针对哪些功能开启了err检测 |
12 | #sh errdisable detect |
13 | ErrDisable Reason Detection Mode |
14 | ----------------- --------- ---- |
15 | arp-inspection Enabled port |
16 | bpduguard Enabled port |
17 | channel-misconfig (STP) Enabled port |
18 | community-limit Enabled port |
19 | dhcp-rate-limit Enabled port |
20 | dtp-flap Enabled port |
21 | gbic-invalid Enabled port |
22 | inline-power Enabled port |
23 | invalid-policy Enabled port |
24 | l2ptguard Enabled port |
25 | link-flap Enabled port |
26 | loopback Enabled port |
27 | lsgroup Enabled port |
28 | mac-limit Enabled port |
29 | pagp-flap Enabled port |
30 | port-mode-failure Enabled port |
31 | pppoe-ia-rate-limit Enabled port |
32 | psecure-violation Enabled port /vlan |
33 | security-violation Enabled port |
34 | sfp-config-mismatch Enabled port |
35 | small-frame Enabled port |
36 | storm-control Enabled port |
37 | udld Enabled port |
38 | vmps Enabled port |
39 |
40 | #检测到err后是否重启接口,重启接口的间隔时间是多少 |
41 | #sh errdisable recovery |
42 | ErrDisable Reason Timer Status |
43 | ----------------- -------------- |
44 | arp-inspection Disabled |
45 | bpduguard Disabled |
46 | channel-misconfig (STP) Disabled |
47 | dhcp-rate-limit Disabled |
48 | dtp-flap Disabled |
49 | gbic-invalid Disabled |
50 | inline-power Disabled |
51 | l2ptguard Disabled |
52 | link-flap Disabled |
53 | mac-limit Disabled |
54 | loopback Disabled |
55 | pagp-flap Disabled |
56 | port-mode-failure Disabled |
57 | pppoe-ia-rate-limit Disabled |
58 | psecure-violation Disabled |
59 | security-violation Disabled |
60 | sfp-config-mismatch Disabled |
61 | small-frame Disabled |
62 | storm-control Disabled |
63 | udld Disabled |
64 | vmps Disabled |
65 |
66 | Timer interval: 300 seconds |
67 |
68 | Interfaces that will be enabled at the next timeout: |
恢复接口:
1 | #关闭再打开接口就行了 |
2 | #interface Gi1/0/48 |
3 | #shutdown |
4 | #no shutdown |
PXE网络安装CentOS 7.1,安装环境:
先安装一台桌面版CentOS(使用CentOS-7-x86_64-DVD-1503-01.iso安装),作为启动服务器,ip为192.168.72.32。
1 | #安装http、tftp、dhcp服务 |
2 | yum install httpd tftp-server dhcp |
3 |
4 | #安装syslinux,安装后才有文件 /usr/share/syslinux/pxelinux.0 |
5 | yum install syslinux |
6 |
7 | #安装system-config-kickstart配置启动文件, |
8 | yum install system-config-kickstart |
1 | #DHCP配置 |
2 | cp /usr/share/doc/dhcp-4 .2.5 /dhcpd .conf.example /etc/dhcp/dhcpd .conf |
DHCP配置文件修改
01 | # cat /etc/dhcp/dhcpd.conf |
02 | # dhcpd.conf |
03 | # |
04 | # Sample configuration file for ISC dhcpd |
05 | # |
06 |
07 | # option definitions common to all supported networks... |
08 | #domain-name 修改为对应名称 |
09 | option domain-name "localhost" ; |
10 | option domain-name-servers 223.5.5.5, 223.6.6.6; |
11 |
12 | default-lease- time 600; |
13 | max-lease- time 7200; |
14 |
15 | # Use this to enble / disable dynamic dns updates globally. |
16 | #ddns-update-style none; |
17 |
18 | # If this DHCP server is the official DHCP server for the local |
19 | # network, the authoritative directive should be uncommented. |
20 | #authoritative; |
21 |
22 | # Use this to send dhcp log messages to a different log file (you also |
23 | # have to hack syslog.conf to complete the redirection). |
24 | log-facility local7; |
25 |
26 | # No service will be given on this subnet, but declaring it helps the |
27 | # DHCP server to understand the network topology. |
28 |
29 |
30 | subnet 192.168.72.0 netmask 255.255.255.0 { |
31 | range 192.168.72.243 192.168.72.250; |
32 | option routers 192.168.72.1; |
33 | next-server 192.168.72.32; #TFTP服务器IP |
34 | filename "pxelinux.0" ; |
35 |
36 | } |
#tftp配置,disable = no
01 | # cat /etc/xinetd.d/tftp |
02 | # default: off |
03 | # description: The tftp server serves files using the trivial file transfer \ |
04 | # protocol. The tftp protocol is often used to boot diskless \ |
05 | # workstations, download configuration files to network-aware printers, \ |
06 | # and to start the installation process for some operating systems. |
07 | service tftp |
08 | { |
09 | socket_type = dgram |
10 | protocol = udp |
11 | wait = yes |
12 | user = root |
13 | server = /usr/sbin/in .tftpd |
14 | server_args = -s /var/lib/tftpboot |
15 | disable = no #修改 |
16 | per_source = 11 |
17 | cps = 100 2 |
18 | flags = IPv4 |
19 | } |
httpd配置
1 | cd /etc/httpd/conf .d/ |
2 | #移除并备份conf文件,目的不显示测试页面 |
3 | mv autoindex.conf autoindex.conf.bak |
4 | mv userdir.conf userdir.conf.bak |
5 | mv welcome.conf welcome.conf.bak |
6 |
7 | #http目录文件准备 |
8 | mkdir /var/www/html/centos |
9 | mount ~ /CentOS-7-x86_64-DVD-1503-01 .iso /var/www/html/centos |
/var/www/html/ks.cfg 文件配置
01 | # cat /var/www/html/ks.cfg |
02 | #platform=x86, AMD64, or Intel EM64T |
03 | #version=DEVEL |
04 | # Install OS instead of upgrade |
05 | install |
06 | # Keyboard layouts |
07 | keyboard 'us' # Reboot after installation |
08 | reboot |
09 | # Root password |
10 | rootpw --iscrypted $1$BhbE2ZLC$D /XPM6Jscst055R3X0nLp . |
11 | # System timezone |
12 | timezone Asia /Shanghai --isUtc |
13 | # Use network installation |
14 | url --url= "http://192.168.72.32/centos" #最后面不需要加 / |
15 | # System language |
16 | lang en_US |
17 | # Firewall configuration |
18 | firewall --disabled |
19 | # Network information |
20 | network --bootproto=dhcp --device=ens0 --onboot= yes --noipv6 -- hostname =pxe_one |
21 | # System authorization information |
22 | auth --useshadow --passalgo=sha512 |
23 | # Use graphical install |
24 | graphical |
25 | firstboot --disable |
26 | # SELinux configuration |
27 | selinux --disabled |
28 |
29 | # System bootloader configuration |
30 | # 新硬盘需要创建mbr |
31 | bootloader --location=mbr |
32 | # Clear the Master Boot Record |
33 | zerombr |
34 | # Partition clearing information |
35 | clearpart --all --initlabel |
36 | # Disk partitioning information |
37 | part / --asprimary --fstype= "xfs" --size=20480 |
38 | part /boot --asprimary --fstype= "xfs" --size=512 |
39 | part swap --asprimary --fstype= "swap" --size=2048 |
40 | part /data --asprimary --fstype= "xfs" --grow --size=1 |
41 |
42 | %packages |
43 | @core |
44 | #@chinese-support |
45 | #iptraf |
46 | #vim |
47 | #openssh-server |
48 | #ntp |
49 | #wget |
50 |
51 | %end |
http根目录结构
01 | # tree -aL 2 /var/www/html/ |
02 | /var/www/html/ |
03 | ├── centos |
04 | │ ├── CentOS_BuildTag |
05 | │ ├── .discinfo |
06 | │ ├── EFI |
07 | │ ├── EULA |
08 | │ ├── GPL |
09 | │ ├── images |
10 | │ ├── isolinux |
11 | │ ├── LiveOS |
12 | │ ├── Packages |
13 | │ ├── repodata |
14 | │ ├── RPM-GPG-KEY-CentOS-7 |
15 | │ ├── RPM-GPG-KEY-CentOS-Testing-7 |
16 | │ ├── TRANS.TBL |
17 | │ └── .treeinfo |
18 | └── ks.cfg |
19 |
20 | 7 directories, 9 files |
tftp目录文件准备
01 | #tftp目录文件准备 |
02 | cp /usr/share/syslinux/pxelinux .0 /var/lib/tftpboot/ |
03 | mkdir /var/lib/tftpboot/pxelinux .cfg |
04 | cp /var/www/html/centos/isolinux/isolinux .cfg /var/lib/tftpboot/pxelinux .cfg /default |
05 | cp /var/www/html/centos/images/pxeboot/ {vmlinuz,initrd.img} /var/lib/tftpboot/ |
06 | cp /var/www/html/centos/isolinux/ {vesamenu.c32,boot.msg,splash.png} /var/lib/tftpboot/ |
07 |
08 | # tree /var/lib/tftpboot/ |
09 | /var/lib/tftpboot/ |
10 | ├── boot.msg |
11 | ├── initrd.img |
12 | ├── pxelinux.0 |
13 | ├── pxelinux.cfg |
14 | │ └── default |
15 | ├── splash.png |
16 | ├── vesamenu.c32 |
17 | └── vmlinuz |
18 |
19 | 1 directory, 7 files |
/var/lib/tftpboot/pxelinux.cfg/default 文件
001 | # cat /var/lib/tftpboot/pxelinux.cfg/default |
002 | default vesamenu.c32 |
003 | timeout 60 |
004 |
005 | display boot.msg |
006 |
007 | # Clear the screen when exiting the menu, instead of leaving the menu displayed. |
008 | # For vesamenu, this means the graphical background is still displayed without |
009 | # the menu itself for as long as the screen remains in graphics mode. |
010 | menu clear |
011 | menu background splash.png |
012 | menu title CentOS 7 |
013 | menu vshift 8 |
014 | menu rows 18 |
015 | menu margin 8 |
016 | #menu hidden |
017 | menu helpmsgrow 15 |
018 | menu tabmsgrow 13 |
019 |
020 | # Border Area |
021 | menu color border * #00000000 #00000000 none |
022 |
023 | # Selected item |
024 | menu color sel 0 #ffffffff #00000000 none |
025 |
026 | # Title bar |
027 | menu color title 0 #ff7ba3d0 #00000000 none |
028 |
029 | # Press [Tab] message |
030 | menu color tabmsg 0 #ff3a6496 #00000000 none |
031 |
032 | # Unselected menu item |
033 | menu color unsel 0 #84b8ffff #00000000 none |
034 |
035 | # Selected hotkey |
036 | menu color hotsel 0 #84b8ffff #00000000 none |
037 |
038 | # Unselected hotkey |
039 | menu color hotkey 0 #ffffffff #00000000 none |
040 |
041 | # Help text |
042 | menu color help 0 #ffffffff #00000000 none |
043 |
044 | # A scrollbar of some type? Not sure. |
045 | menu color scrollbar 0 #ffffffff #ff355594 none |
046 |
047 | # Timeout msg |
048 | menu color timeout 0 #ffffffff #00000000 none |
049 | menu color timeout_msg 0 #ffffffff #00000000 none |
050 |
051 | # Command prompt text |
052 | menu color cmdmark 0 #84b8ffff #00000000 none |
053 | menu color cmdline 0 #ffffffff #00000000 none |
054 |
055 | # Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message. |
056 |
057 | menu tabmsg Press Tab for full configuration options on menu items. |
058 |
059 | menu separator # insert an empty line |
060 | menu separator # insert an empty line |
061 |
062 | label linux |
063 | menu label ^Install CentOS 7 |
064 | menu default |
065 | kernel vmlinuz |
066 | # append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet |
067 | append initrd=initrd.img inst.ks=http: //192 .168.72.32 /ks .cfg quiet |
068 |
069 | label check |
070 | menu label Test this ^media & install CentOS 7 |
071 | kernel vmlinuz |
072 | append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rd.live.check quiet |
073 |
074 | menu separator # insert an empty line |
075 |
076 | # utilities submenu |
077 | menu begin ^Troubleshooting |
078 | menu title Troubleshooting |
079 |
080 | label vesa |
081 | menu indent count 5 |
082 | menu label Install CentOS 7 in ^basic graphics mode |
083 | text help |
084 | Try this option out if you're having trouble installing |
085 | CentOS 7. |
086 | endtext |
087 | kernel vmlinuz |
088 | append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 xdriver=vesa nomodeset quiet |
089 |
090 | label rescue |
091 | menu indent count 5 |
092 | menu label ^Rescue a CentOS system |
093 | text help |
094 | If the system will not boot, this lets you access files |
095 | and edit config files to try to get it booting again. |
096 | endtext |
097 | kernel vmlinuz |
098 | append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rescue quiet |
099 |
100 | label memtest |
101 | menu label Run a ^memory test |
102 | text help |
103 | If your system is having issues, a problem with your |
104 | system's memory may be the cause. Use this utility to |
105 | see if the memory is working correctly. |
106 | endtext |
107 | kernel memtest |
108 |
109 | menu separator # insert an empty line |
110 |
111 | label local |
112 | menu label Boot from ^ local drive |
113 | localboot 0xffff |
114 |
115 | menu separator # insert an empty line |
116 | menu separator # insert an empty line |
117 |
118 | label returntomain |
119 | menu label Return to ^main menu |
120 | menu exit |
121 |
122 | menu end |
启动服务器
01 | #启动服务器 |
02 | iptables -F |
03 | systemctl start httpd.service |
04 | systemctl status httpd.service |
05 | systemctl enable httpd.service |
06 |
07 | systemctl start dhcpd.service |
08 | systemctl status dhcpd.service |
09 | systemctl enable dhcpd.service |
10 |
11 | systemctl start xinetd.service |
12 | systemctl status xinetd.service |
13 | systemctl enable xinetd.service |
14 |
15 | systemctl start tftp.socket |
16 | systemctl status tftp.socket |
17 | systemctl enable tftp.socket |
18 |
19 | systemctl start tftp.service |
20 | systemctl status tftp.service |
21 | systemctl enable tftp.service |
查看服务端口是否正常
1 | #查看服务端口是否正常 tcp-80、udp-67、udp-69 |
2 | ss -tilnp |
3 | ss -uilnp |
4 | #或 |
5 | netstat -nat |
6 | netstat -nau |
7 |
8 | #查看dhcp地址分配情况 |
9 | /var/lib/dhcpd/dhcpd .leases |
补充相关PPT及视频(20150906):
PPT:
http://download.csdn.net/album/detail/1623
或
链接:http://pan.baidu.com/s/1gd8kKQR 密码:vykm
雨痕 Go 学习笔记 第四版.pdf
https://github.com/qyuhen/book
视频:
http://www.imooc.com/learn/407
astaxie
分享内容:
安装系统:CentOS 7.1
1 | wget http: //www .zerozone.it /Software/Linux/SquidTL/squidtl-0 .0.2. tar .gz |
2 |
3 | tar -vxzf squidtl-0.0.2. tar .gz |
4 |
5 | cd squidtl/ |
1 | yum install automake |
2 | cp -rf /usr/share/automake-1 .13 /usr/share/automake-1 .10 |
01 | # ./configure |
02 | checking for a BSD-compatible install ... /usr/bin/install -c |
03 | checking whether build environment is sane... yes |
04 | checking for a thread-safe mkdir -p... /usr/bin/mkdir -p |
05 | checking for gawk ... gawk |
06 | checking whether make sets $(MAKE)... yes |
07 | checking for gcc... gcc |
08 | checking for C compiler default output file name... a.out |
09 | checking whether the C compiler works... yes |
10 | checking whether we are cross compiling... no |
11 | checking for suffix of executables... |
12 | checking for suffix of object files... o |
13 | checking whether we are using the GNU C compiler... yes |
14 | checking whether gcc accepts -g... yes |
15 | checking for gcc option to accept ISO C89... none needed |
16 | checking for style of include used by make ... GNU |
17 | checking dependency style of gcc... gcc3 |
18 | checking how to run the C preprocessor... gcc -E |
19 | checking for grep that handles long lines and -e... /usr/bin/grep |
20 | checking for egrep ... /usr/bin/grep -E |
21 | checking for ANSI C header files... yes |
22 | checking for mysql_config... no |
23 | configure: error: Couldn't find mysql_config. Please verify that it is installed. |
configure: error: Couldn’t find mysql_config. Please verify that it is installed.
01 | # yum provides */mysql_config |
02 | Loaded plugins: fastestmirror, langpacks |
03 | Loading mirror speeds from cached hostfile |
04 | * base: mirrors.aliyun.com |
05 | * epel: epel.mirror.srv.co. ge |
06 | * extras: mirrors.aliyun.com |
07 | * updates: mirrors.aliyun.com |
08 | epel /x86_64/filelists_db | 6.3 MB 00:00:06 |
09 | 1:mariadb-devel-5.5.41-2.el7_0.i686 : Files for development of MariaDB /MySQL applications |
10 | Repo : base |
11 | Matched from: |
12 | Filename : /usr/lib/mysql/mysql_config |
13 | Filename : /usr/bin/mysql_config |
14 |
15 |
16 |
17 | 1:mariadb-devel-5.5.41-2.el7_0.x86_64 : Files for development of MariaDB /MySQL applications |
18 | Repo : base |
19 | Matched from: |
20 | Filename : /usr/bin/mysql_config |
21 | Filename : /usr/lib64/mysql/mysql_config |
1 | yum install mariadb-devel |
01 | . /configure |
02 | checking for a BSD-compatible install ... /usr/bin/install -c |
03 | checking whether build environment is sane... yes |
04 | checking for a thread-safe mkdir -p... /usr/bin/mkdir -p |
05 | checking for gawk ... gawk |
06 | checking whether make sets $(MAKE)... yes |
07 | checking for gcc... gcc |
08 | checking for C compiler default output file name... a.out |
09 | checking whether the C compiler works... yes |
10 | checking whether we are cross compiling... no |
11 | checking for suffix of executables... |
12 | checking for suffix of object files... o |
13 | checking whether we are using the GNU C compiler... yes |
14 | checking whether gcc accepts -g... yes |
15 | checking for gcc option to accept ISO C89... none needed |
16 | checking for style of include used by make ... GNU |
17 | checking dependency style of gcc... gcc3 |
18 | checking how to run the C preprocessor... gcc -E |
19 | checking for grep that handles long lines and -e... /usr/bin/grep |
20 | checking for egrep ... /usr/bin/grep -E |
21 | checking for ANSI C header files... yes |
22 | checking for mysql_config... /usr/bin/mysql_config |
23 | checking for pkg-config... /usr/bin/pkg-config |
24 | checking pkg-config is at least version 0.9.0... yes |
25 | checking for XML... no |
26 | configure: error: libxml2 is required. |
configure: error: libxml2 is required.
1 | yum install libxml2-devel |
01 | # ./configure |
02 | checking for a BSD-compatible install ... /usr/bin/install -c |
03 | checking whether build environment is sane... yes |
04 | checking for a thread-safe mkdir -p... /usr/bin/mkdir -p |
05 | checking for gawk ... gawk |
06 | checking whether make sets $(MAKE)... yes |
07 | checking for gcc... gcc |
08 | checking for C compiler default output file name... a.out |
09 | checking whether the C compiler works... yes |
10 | checking whether we are cross compiling... no |
11 | checking for suffix of executables... |
12 | checking for suffix of object files... o |
13 | checking whether we are using the GNU C compiler... yes |
14 | checking whether gcc accepts -g... yes |
15 | checking for gcc option to accept ISO C89... none needed |
16 | checking for style of include used by make ... GNU |
17 | checking dependency style of gcc... gcc3 |
18 | checking how to run the C preprocessor... gcc -E |
19 | checking for grep that handles long lines and -e... /usr/bin/grep |
20 | checking for egrep ... /usr/bin/grep -E |
21 | checking for ANSI C header files... yes |
22 | checking for mysql_config... /usr/bin/mysql_config |
23 | checking for pkg-config... /usr/bin/pkg-config |
24 | checking pkg-config is at least version 0.9.0... yes |
25 | checking for XML... yes |
26 | checking for strdup... yes |
27 | checking for strerror... yes |
28 | checking for vsprintf... yes |
29 | checking for sigaction... yes |
30 | checking for signal... yes |
31 | configure: creating . /config .status |
32 | config.status: creating Makefile |
33 | config.status: creating src /Makefile |
34 | config.status: creating src /config .h |
35 | config.status: executing depfiles commands |
现象:
网页登陆Exchange邮箱,登陆页正常,输入用户、密码后,页面报错。
错误信息如下:
1 | 网址为 https://mail.uname.com/owa/auth.owa 的网页可能暂时无法连接,或者它已永久性地移动到了新网址。 |
2 |
3 | 错误代码:ERR_RESPONSE_HEADERS_TRUNCATED |
解决方法:
服务中–开启 “基于 Microsoft Exchange 表单的身份验证服务”.
基于 Microsoft Exchange 表单的身份验证服务
参考:
http://www.it0124.com/Home/ArticleDetail/231be72f-9002-4e0f-a00a-9aee4ea063c9
Squid使用过程中,禁止的行为一般还是需要提供反馈页面的,以便普通使用者知道什么原因无法访问页面的。同时也便于管理者进行维护。
当然报错页面我们还是需要修改一下,使得更加友好和本地化。
如下图为,Squid默认的报错提示页面,我们需要修改的内容:
1、部分提示内容修改为中文;
2、图片修改为公司logo或个人logo;
3、管理员邮箱
Squid默认报错提示页面
1 | # ls /usr/share/squid/errors/zh-cn/ |
2 | ERR_ACCESS_DENIED ERR_CANNOT_FORWARD ERR_FORWARDING_DENIED ERR_FTP_PUT_ERROR ERR_INVALID_RESP ERR_PRECONDITION_FAILED ERR_TOO_BIG |
3 | ERR_ACL_TIME_QUOTA_EXCEEDED ERR_CONFLICT_HOST ERR_FTP_DISABLED ERR_FTP_PUT_MODIFIED ERR_INVALID_URL ERR_READ_ERROR ERR_UNSUP_HTTPVERSION |
4 | ERR_AGENT_CONFIGURE ERR_CONNECT_FAIL ERR_FTP_FAILURE ERR_FTP_UNAVAILABLE ERR_LIFETIME_EXP ERR_READ_TIMEOUT ERR_UNSUP_REQ |
5 | ERR_AGENT_WPAD ERR_DIR_LISTING ERR_FTP_FORBIDDEN ERR_GATEWAY_FAILURE ERR_NO_RELAY ERR_SECURE_CONNECT_FAIL ERR_URN_RESOLVE |
6 | ERR_CACHE_ACCESS_DENIED ERR_DNS_FAIL ERR_FTP_NOT_FOUND ERR_ICAP_FAILURE ERR_ONLY_IF_CACHED_MISS ERR_SHUTTING_DOWN ERR_WRITE_ERROR |
7 | ERR_CACHE_MGR_ACCESS_DENIED ERR_ESI ERR_FTP_PUT_CREATED ERR_INVALID_REQ error-details.txt ERR_SOCKET_FAILURE ERR_ZERO_SIZE_OBJECT |
1 | /* Page displayed title area */ |
2 | #titles { |
3 | margin-left : 15px ; |
4 | padding : 10px ; |
5 | padding-left : 100px ; |
6 | /*padding-left 根据图片像素(宽)调整,否则图片和文字重叠了*/ |
7 | /*把url修改为自己的图片链接*/ |
8 | background : url ( 'http://www.squid-cache.org/Artwork/SN.png' ) no-repeat left ; |
9 | } |
1 | # cat /etc/squid/squid.conf |
2 | visible_hostname squid.allgo.cc #主机名 |
3 | cache_mgr zhb@allgo.cc #管理员邮箱 |
1 | error_default_language zh-cn #语言 error_directory /usr/share/squid/errors/zh-cn/ #路径 # squid -v Squid Cache: Version 3.3.8 #CentOS 7.1 yum 方式安装的Squid configure options: '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-strict-error-checking' '--exec_prefix=/usr' '--libexecdir=/usr/lib64/squid' '--localstatedir=/var' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--with-logdir=$(localstatedir)/log/squid' '--with-pidfile=$(localstatedir)/run/squid.pid' '--disable-dependency-tracking' '--enable-eui' '--enable-follow-x-forwarded-for' '--enable-auth' '--enable-auth-basic=DB,LDAP,MSNT,MSNT-multi-domain,NCSA,NIS,PAM,POP3,RADIUS,SASL,SMB,getpwnam' '--enable-auth-ntlm=smb_lm,fake' '--enable-auth-digest=file,LDAP,eDirectory' '--enable-auth-negotiate=kerberos' '--enable-external-acl-helpers=file_userip,LDAP_group,time_quota,session,unix_group,wbinfo_group' '--enable-cache-digests' '--enable-cachemgr-hostname=localhost' '--enable-delay-pools' '--enable-epoll' '--enable-icap-client' '--enable-ident-lookups' '--enable-linux-netfilter' '--enable-removal-policies=heap,lru' '--enable-snmp' '--enable-ssl' '--enable-ssl-crtd' '--enable-storeio=aufs,diskd,ufs' '--enable-wccpv2' '--enable-esi' '--enable-ecap' '--with-aio' '--with-default-user=squid' '--with-filedescriptors=16384' '--with-dl' '--with-openssl' '--with-pthreads' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fpie' 'LDFLAGS=-Wl,-z,relro -pie -Wl,-z,relro -Wl,-z,now' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fpie' 'PKG_CONFIG_PATH=%{_PKG_CONFIG_PATH}:/usr/lib64/pkgconfig:/usr/share/pkgconfig' [root@localhost ~]# |
1 | # cat /etc/redhat-release |
2 | CentOS Linux release 7.1.1503 (Core) |
3 | # uname -a |
4 | Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux |
01 | # cat /etc/sysconfig/network-scripts/ifcfg-enp2s4 |
02 | BOOTPROTO=dhcp |
03 | DEFROUTE= yes |
04 | PEERDNS= yes |
05 | PEERROUTES= yes |
06 | IPV4_FAILURE_FATAL=no |
07 | IPV6INIT= yes |
08 | IPV6_AUTOCONF= yes |
09 | IPV6_DEFROUTE= yes |
10 | IPV6_PEERDNS= yes |
11 | IPV6_PEERROUTES= yes |
12 | IPV6_FAILURE_FATAL=no |
13 | IPV6_FAILURE_FATAL=no |
14 | TYPE=Ethernet |
15 | NAME=enp2s4 |
16 | UUID=65b1d8b3-2214-45ec-987f-d0f1cc0004cb |
17 | DEVICE=enp2s4 |
18 | ONBOOT= yes |
19 |
20 | # cat /etc/sysconfig/network-scripts/ifcfg-enp3s5 |
21 | BOOTPROTO=dhcp |
22 | DEFROUTE= yes |
23 | PEERDNS= yes |
24 | PEERROUTES= yes |
25 | IPV4_FAILURE_FATAL=no |
26 | IPV6INIT= yes |
27 | IPV6_AUTOCONF= yes |
28 | IPV6_DEFROUTE= yes |
29 | IPV6_PEERDNS= yes |
30 | IPV6_PEERROUTES= yes |
31 | IPV6_FAILURE_FATAL=no |
32 | IPV6_FAILURE_FATAL=no |
33 | TYPE=Ethernet |
34 | NAME=enp3s5 |
35 | UUID=65b1d8b3-2214-45ec-987f-d0f1cc0004cb |
36 | DEVICE=enp3s5 |
37 | ONBOOT= yes |
01 | # cd /etc/sysconfig/network-scripts |
02 |
03 | # cat ifcfg-br0 #桥接口名称为br0 |
04 | TYPE=Bridge |
05 | BOOTPROTO=static |
06 | IPADDR=192.168.1.82 |
07 | PREFIX=24 |
08 | IPV4_FAILURE_FATAL=no |
09 | NAME=br0 |
10 | DEVICE=br0 |
11 | ONBOOT= yes |
12 | BRIDGE_STP= yes |
13 |
14 | # cat ifcfg-enp2s4 |
15 | TYPE=Ethernet |
16 | NAME=enp2s4 |
17 | UUID=30a9efb8-2594-4596-9cde-d87c1ac06003 |
18 | #HWADDR=00:1c:c4:df:db:e4 |
19 | DEVICE=enp2s4 |
20 | ONBOOT= yes |
21 | BRIDGE=br0 |
22 |
23 | # cat ifcfg-enp3s5 |
24 | TYPE=Ethernet |
25 | NAME=enp3s5 |
26 | #HWADDR=00:1c:c4:df:db:e6 |
27 | UUID=65b1d8b3-2214-45ec-987f-d0f1cc0004cb |
28 | DEVICE=enp3s5 |
29 | ONBOOT= yes |
30 | BRIDGE=br0 |
31 |
32 | # systemctl status network.service #重启网络服务 |
33 |
34 | #查看是否失效 |
35 | # ifconfig |
36 | br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 |
37 | inet 192.168.1.82 netmask 255.255.255.0 broadcast 192.168.71.255 |
38 | inet6 fe80::21c:c4ff:fedf:dbe4 prefixlen 64 scopeid 0x20<link> |
39 | ether 00:1c:c4: df :db:e4 txqueuelen 0 (Ethernet) |
40 | RX packets 1438 bytes 182390 (178.1 KiB) |
41 | RX errors 0 dropped 0 overruns 0 frame 0 |
42 | TX packets 8 bytes 592 (592.0 B) |
43 | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
44 |
45 | enp2s4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 |
46 | ether 00:1c:c4: df :db:e4 txqueuelen 1000 (Ethernet) |
47 | RX packets 669318 bytes 968188165 (923.3 MiB) |
48 | RX errors 0 dropped 0 overruns 0 frame 0 |
49 | TX packets 87613 bytes 7615798 (7.2 MiB) |
50 | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
51 |
52 | enp3s5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 |
53 | ether 00:1c:c4: df :db:e6 txqueuelen 1000 (Ethernet) |
54 | RX packets 87597 bytes 7613914 (7.2 MiB) |
55 | RX errors 0 dropped 0 overruns 0 frame 0 |
56 | TX packets 666707 bytes 967793844 (922.9 MiB) |
57 | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
58 |
59 | # brctl show |
60 | bridge name bridge id STP enabled interfaces |
61 | br0 8000.001cc4dfdbe4 no enp2s4 |
62 | enp3s5 |
01 | #安装brctl |
02 | yum install bridge-utils |
03 |
04 | # ifconfig enp2s4 down |
05 | # ifconfig enp3s5 down |
06 | # ifconfig enp2s4 0.0.0.0 |
07 | # ifconfig enp3s5 0.0.0.0 |
08 |
09 | # brctl addbr br0 |
10 | # brctl addif br0 enp2s4 |
11 | # brctl addif br0 enp3s5 |
12 |
13 | # ifconfig br0 192.168.1.82 up |
14 |
15 | # brctl stp br0 off #关闭生成树协议 |
16 | # brctl show |
17 |
18 | #brctl 命令配置重启后失效,可以把相关命令添加到/etc/rc.d/rc.local 即可。 |
参考:
使用CentOS mini版,安装后一般做一些基本设置才能更好的使用。
版本:
http://mirrors.aliyun.com/centos/7.1.1503/isos/x86_64/CentOS-7-x86_64-Minimal-1503-01.iso
01 | # cat /etc/redhat-release |
02 | CentOS Linux release 7.1.1503 (Core) |
03 |
04 | # uname -a |
05 | Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux |
06 |
07 |
08 | /etc/sysconfig/network-scripts/ifcfg-enp5s0 #开机启动网卡 |
09 | ONBOOT= yes |
10 |
11 | systemctl restart network.service #重启网络服务 |
12 | #或 |
13 | /etc/rc .d /init .d /network restart |
14 |
15 |
16 |
17 |
18 | yum -y install wget #安装wget |
19 |
20 | #更换阿里云yum源 |
21 | mv /etc/yum .repos.d /CentOS-Base .repo /etc/yum .repos.d /CentOS-Base .repo.backup |
22 |
23 | wget -O /etc/yum .repos.d /CentOS-Base .repo http: //mirrors .aliyun.com /repo/Centos-7 .repo |
24 |
25 | #第三方源 |
26 | yum install http: //dl .fedoraproject.org /pub/epel/7/x86_64/e/epel-release-7-5 .noarch.rpm |
27 | #或 |
28 | yum install http: //mirrors .ustc.edu.cn /epel/7/x86_64/e/epel-release-7-5 .noarch.rpm |
29 |
30 | #生成缓存 |
31 | yum makecache |
32 |
33 | #安装常用软件、工具 |
34 | yum -y install vim htop |
35 |
36 | #add command ifconfig |
37 | yum -y net-tools |
38 |
39 | #add command nslookup、dig |
40 | yum -y install bind-utils |
41 |
42 | #设置vim 别名 |
43 | vi .bashrc |
44 | alias vi = 'vim' |