/usr/li/usr/lib /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11′ not found

执行strings /usr/lib/libstdc++.so.6 | grep GLIBC

[root@localhost NeoShine]# strings /usr/lib/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBC_2.0
GLIBC_2.3
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH
[root@localhost NeoShine]# ls -l /usr/lib/libst
libstartup-notification-1.so.0      libstdc++.so.6
libstartup-notification-1.so.0.0.0  libstdc++.so.6.0.10
[root@localhost NeoShine]# ls -l /usr/lib/libstdc++.so.6
lrwxrwxrwx 1 root root 19 01-27 20:19 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.10
[root@localhost NeoShine]#

不会搞来,嘻嘻。

查看linux版本

     如何查看自己使用的linux是什么版本呢?

  1. 查看内核版本命令:

  1) [root@nq ~]# cat /proc/version

   Linux version 2.6.9-22.ELsmp (nq@.redhat.com) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 SMP Mon Sep 19 18:00:54 EDT 2005

  2) [root@nq ~]# uname -a

  Linux nq 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

  3) [root@nq ~]# uname -r

  2.6.9-22.ELsmp

  2. 查看linux版本:

  1) 登录到服务器执行 lsb_release -a ,即可列出所有版本信息,例如:

  [[root@nq ~]# lsb_release -a

  LSB Version: :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:graphics-3.0-amd64:graphics-3.0-

  ia32:graphics-3.0-noarch

  Distributor ID: RedHatEnterpriseAS

  Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

  Release: 4

  Codename: NahantUpdate2

  注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。

  2) 登录到linux执行cat /etc/issue,例如如下:

  [root@nq ~]# cat /etc/issue

  Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

  Kernel \r on an \m

  3) 登录到linux执行cat /etc/redhat-release ,例如如下:

  [root@nq ~]# cat /etc/redhat-release

  Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

  注:这种方式下可以直接看到具体的版本号,比如 AS4 Update 1

  4)登录到linux执行rpm -q redhat-release ,例如如下:

  [root@nq ~]# rpm -q redhat-release

  redhat-release-4AS-3

  注:这种方式下可看到一个所谓的release号,比如上边的例子是3

  这个release号和实际的版本之间存在一定的对应关系,如下:

  redhat-release-3AS-1 -> Redhat Enterprise Linux AS 3

  redhat-release-3AS-7.4 -> Redhat Enterprise Linux AS 3 Update 4

  redhat-release-4AS-2 -> Redhat Enterprise Linux AS 4

  redhat-release-4AS-2.4 -> Redhat Enterprise Linux AS 4 Update 1

  redhat-release-4AS-3 -> Redhat Enterprise Linux AS 4 Update 2

  redhat-release-4AS-4.1 -> Redhat Enterprise Linux AS 4 Update 3

  redhat-release-4AS-5.5 -> Redhat Enterprise Linux AS 4 Update 4

  另:第3)、4)两种方法只对Redhat Linux有效。

配置Apache 监听多个端口及运行在不同的端口上

     在IIS中,可以设置web服务跑在不同的端口下,仅需简单的点点鼠标配置下即可:

                                               我们可以将 端口(T):改为其他的,比如8080

然后确定后我们查看端口状态:

C:\>netstat -an | find “80”
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING

下面说一下在linux下apache的配置方法:

首先,dns做好了,分别为80.com   8080.com   对应的IP都是1.1.1.1

首先设置apache的监听端口:

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
listen 8080

#  有几个写几个

接着配置虚拟主机,那我机器肯定是基于域名的虚拟主机了。

# Use name-based virtual hosting.
#
#NameVirtualHost *:80
namevirtualhost 1.1.1.1:80
#

<virtualhost www.80.com:80>
serveradmin venuslinux@gmail.com
servername www.80.com
documentroot /wz/80
errorlog logs/80_error.log
customlog logs/80_access.log common
directoryindex index.html
</virtualhost>

<virtualhost www.8080.com:8080>
serveradmin venuslinux@gmail.com
servername www.8080.com
documentroot /wz/8080
errorlog logs/8080_error.log
customlog logs/8080_access.log common
directoryindex index.html
</virtualhost>

然后为其创建根目录,index.html内容分别为80 8080

然后客户端测试:

http://www.80.com                            显示80

http://www.8080.com:8080/           显示8080(因为运行的端口不是在默认的80上,所以要手动指定)

至此,配置结束。

浅谈 apache 是通过哪条语句判断虚拟主机

       客户端向服务器发起请求后,服务器上有多个虚拟主机,那么服务器是怎么判断归属哪个主机的呢?下面来试验一下:

做好的dns解析为: www.dz.com   1.1.1.1

apache配置文件为:
<VirtualHost 1.1.1.1:80>
    ServerAdmin venuslinux@gmail.com
    DocumentRoot /wz/dz
    ServerName 1.1.1.1
    ErrorLog logs/dz.com-error_log
    CustomLog logs/dz.com-access_log common
    directoryindex index.php
</virtualhost>

肯定不能访问到dz页,按顺序的话,应该会访问到排序第一的虚拟主机。
当设置为:
<VirtualHost 1.1.1.1:80>
    ServerAdmin venuslinux@gmail.com
    DocumentRoot /wz/dz
    ServerName www.dz.com
    ErrorLog logs/dz.com-error_log
    CustomLog logs/dz.com-access_log common
    directoryindex index.php
</virtualhost>

可以访问dz页面。

当设置为:
<VirtualHost www.dz.com:80>
    ServerAdmin venuslinux@gmail.com
    DocumentRoot /wz/dz
    ServerName 1.1.1.1
    ErrorLog logs/dz.com-error_log
    CustomLog logs/dz.com-access_log common
    directoryindex index.php
</virtualhost>

可以访问到dz页面。

设置为:

<VirtualHost www.dz.com:80>
    ServerAdmin venuslinux@gmail.com
    DocumentRoot /wz/dz
    ServerName www.dz.com
    ErrorLog logs/dz.com-error_log
    CustomLog logs/dz.com-access_log common
    directoryindex index.php
</virtualhost>
可以访问。

那么我们现在可以下结论了,在<virtualhost>语句中填入域名可以访问的到,在servername中填写也可以访问到,一般情况下呢,还是都填写域名的好。

apache 添加多域名支持 (绑定多个域名)

      基于域名的虚拟主机,添加多域名支持只需配置<virtualhost> 这段代码即可

方式如下:

<VirtualHost www.nq.com:80 (这里有个空格)www.rootop.org:80>
    ServerAdmin venuslinux@gmail.com
    DocumentRoot /wz/nq
    ServerName www.nq.com
    ErrorLog logs/nq.com-error_log
    CustomLog logs/nq.com-access_log common
    directoryindex index.php
</virtualhost>

       后面的www.rootop.org:80 就是所添加的域名,这样一来,即可以通过www.nq.com 来访问也可以通过www.rootop.org访问了。

第二种方法:

在<VirtualHost></VirtualHost>字段之间加一行 ServerAlias www.domain.com 即可。

所有要绑定的域名都写在serveralias 后面

参考链接:https://www.rootop.org/ApacheManual/Apache2.2_zh_CN/vhosts/name-based.html