由一前HP 360DL做为前端,由三台4U盘柜做为存储连接而成的一个视频上传,点播系统的结构。
219.235.241.237
建立目录设置权限
drwxrwxrwx 2 www www 512 Jun 11 10:50 cnzmkmfiles1
drwxrwxrwx 2 www www 512 Jun 11 10:50 cnzmkmfiles2
drwxrwxrwx 2 www www 512 Jun 11 10:50 cnzmkmfiles3
修改虚拟主机配置文件
/usr/local/apache/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /files/web/cnzmkmfiles1
ServerName flv1.cnzmkm.com
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/logfiles/flv2cnzmkm_log%Y%m%d.log" combined
CBandRemoteSpeed 80Kb/s 3 10
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /files/web/cnzmkmfiles2
ServerName flv2.cnzmkm.com
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/logfiles/flv2cnzmkm_log%Y%m%d.log" combined
CBandRemoteSpeed 80Kb/s 3 10
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /files/web/cnzmkmfiles3
ServerName flv3.cnzmkm.com
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/logfiles/flv2cnzmkm_log%Y%m%d.log" combined
CBandRemoteSpeed 80Kb/s 3 10
</VirtualHost>
检查配置文件语法,重新加载配置文件,查看虚拟主机参数
flvserver2# ../../bin/apachectl -t
Syntax OK
flvserver2# ../../bin/apachectl -k graceful
flvserver2# ../../bin/apachectl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server flv1.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:27)
port 80 namevhost flv1.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:27)
port 80 namevhost flv2.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:40)
port 80 namevhost flv3.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:53)
port 80 namevhost flv1.cnzmkm.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:66)
port 80 namevhost flv2.cnzmkm.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:75)
port 80 namevhost flv3.cnzmkm.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:84)
Syntax OK
219.235.241.236
建立目录设置权限
drwxrwxrwx 2 www www 512 Jun 11 11:05 cnzmkmfiles4
drwxrwxrwx 2 www www 512 Jun 11 11:06 cnzmkmfiles5
drwxrwxrwx 2 www www 512 Jun 11 11:06 cnzmkmfiles6
修改虚拟主机配置文件
/usr/local/apache/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /files/web/cnzmkmfiles4
ServerName flv4.cnzmkm.com
CBandRemoteSpeed 80Kb/s 3 10
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/logfiles/flv3cnzmkm_log%Y%m%d.log" combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /files/web/cnzmkmfiles5
ServerName flv5.cnzmkm.com
CBandRemoteSpeed 80Kb/s 3 10
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/logfiles/flv3cnzmkm_log%Y%m%d.log" combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /files/web/cnzmkmfiles6
ServerName flv6.cnzmkm.com
CBandRemoteSpeed 80Kb/s 3 10
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/logfiles/flv3cnzmkm_log%Y%m%d.log" combined
</VirtualHost>
检查配置文件语法,重新加载配置文件,查看虚拟主机参数
flvserver3# ../../bin/apachectl -t
Syntax OK
flvserver3# ../../bin/apachectl -k graceful
flvserver3# ../../bin/apachectl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server flv4.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:28)
port 80 namevhost flv4.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:28)
port 80 namevhost flv5.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:40)
port 80 namevhost flv6.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:52)
port 80 namevhost flv4.cnzmkm.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:65)
port 80 namevhost flv5.cnzmkm.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:74)
port 80 namevhost flv6.cnzmkm.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:83)
Syntax OK
219.235.241.235
建立目录设置权限
drwxrwxrwx 2 www www 512B Jun 11 11:09 cnzmkmfiles7
drwxrwxrwx 2 www www 512B Jun 11 11:09 cnzmkmfiles8
drwxrwxrwx 2 www www 512B Jun 11 11:09 cnzmkmfiles9
修改虚拟主机配置文件
/usr/local/apache/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /files/web/cnzmkmfiles7
ServerName flv7.cnzmkm.com
CBandRemoteSpeed 80Kb/s 3 10
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/logfiles/flv4cnzmkm_log%Y%m%d.log" combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /files/web/cnzmkmfiles8
ServerName flv8.cnzmkm.com
CBandRemoteSpeed 80Kb/s 3 10
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/logfiles/flv4cnzmkm_log%Y%m%d.log" combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /files/web/cnzmkmfiles9
ServerName flv9.cnzmkm.com
CBandRemoteSpeed 80Kb/s 3 10
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/logfiles/flv4cnzmkm_log%Y%m%d.log" combined
</VirtualHost>
检查配置文件语法,重新加载配置文件,查看虚拟主机参数
flvserver4# ../../bin/apachectl -t
Syntax OK
flvserver4# ../../bin/apachectl -k graceful
flvserver4# ../../bin/apachectl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server flv7.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:21)
port 80 namevhost flv7.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:21)
port 80 namevhost flv8.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:30)
port 80 namevhost flv9.unidee.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:39)
port 80 namevhost flv7.cnzmkm.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:49)
port 80 namevhost flv8.cnzmkm.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:58)
port 80 namevhost flv9.cnzmkm.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:67)
Syntax OK
虚拟主机域名对应目录
219.235.241.237 flv1.cnzmkm.com /files/web/cnzmkmfiles1
219.235.241.237 flv2.cnzmkm.com /files/web/cnzmkmfiles2
219.235.241.237 flv3.cnzmkm.com /files/web/cnzmkmfiles3
219.235.241.236 flv4.cnzmkm.com /files/web/cnzmkmfiles4
219.235.241.236 flv5.cnzmkm.com /files/web/cnzmkmfiles5
219.235.241.236 flv6.cnzmkm.com /files/web/cnzmkmfiles6
219.235.241.235 flv7.cnzmkm.com /files/web/cnzmkmfiles7
219.235.241.235 flv8.cnzmkm.com /files/web/cnzmkmfiles8
219.235.241.235 flv9.cnzmkm.com /files/web/cnzmkmfiles9
219.235.241.231 WEB服务器挂载NFS目录
219.235.241.237:/files/web/files1 /usr/local/www/files1
219.235.241.237:/files/web/files2 /usr/local/www/files2
219.235.241.237:/files/web/files3 /usr/local/www/files3
219.235.241.236:/files/web/files4 /usr/local/www/files4
219.235.241.236:/files/web/files5 /usr/local/www/files5
219.235.241.236:/files/web/files6 /usr/local/www/files6
219.235.241.235:/files/web/files7 /usr/local/www/files7
219.235.241.235:/files/web/files8 /usr/local/www/files8
219.235.241.235:/files/web/files9 /usr/local/www/files9
219.235.241.237:/files/web/cnzmkmfiles1 /usr/local/www/cnzmkmfiles1
219.235.241.237:/files/web/cnzmkmfiles2 /usr/local/www/cnzmkmfiles2
219.235.241.237:/files/web/cnzmkmfiles3 /usr/local/www/cnzmkmfiles3
219.235.241.236:/files/web/cnzmkmfiles4 /usr/local/www/cnzmkmfiles4
219.235.241.236:/files/web/cnzmkmfiles5 /usr/local/www/cnzmkmfiles5
219.235.241.236:/files/web/cnzmkmfiles6 /usr/local/www/cnzmkmfiles6
219.235.241.235:/files/web/cnzmkmfiles7 /usr/local/www/cnzmkmfiles7
219.235.241.235:/files/web/cnzmkmfiles8 /usr/local/www/cnzmkmfiles8
219.235.241.235:/files/web/cnzmkmfiles9 /usr/local/www/cnzmkmfiles9
UNIDEE网站加载NFS目录
mount 219.235.241.237:/files/web/files1 /usr/local/www/files1
mount 219.235.241.237:/files/web/files2 /usr/local/www/files2
mount 219.235.241.237:/files/web/files3 /usr/local/www/files3
mount 219.235.241.236:/files/web/files4 /usr/local/www/files4
mount 219.235.241.236:/files/web/files5 /usr/local/www/files5
mount 219.235.241.236:/files/web/files6 /usr/local/www/files6
mount 219.235.241.235:/files/web/files7 /usr/local/www/files7
mount 219.235.241.235:/files/web/files8 /usr/local/www/files8
mount 219.235.241.235:/files/web/files9 /usr/local/www/files9
CNZMKM加载NFS目录
mount 219.235.241.237:/files/web/cnzmkmfiles1 /usr/local/www/cnzmkmfiles1
mount 219.235.241.237:/files/web/cnzmkmfiles2 /usr/local/www/cnzmkmfiles2
mount 219.235.241.237:/files/web/cnzmkmfiles3 /usr/local/www/cnzmkmfiles3
mount 219.235.241.236:/files/web/cnzmkmfiles4 /usr/local/www/cnzmkmfiles4
mount 219.235.241.236:/files/web/cnzmkmfiles5 /usr/local/www/cnzmkmfiles5
mount 219.235.241.236:/files/web/cnzmkmfiles6 /usr/local/www/cnzmkmfiles6
mount 219.235.241.235:/files/web/cnzmkmfiles7 /usr/local/www/cnzmkmfiles7
mount 219.235.241.235:/files/web/cnzmkmfiles8 /usr/local/www/cnzmkmfiles8
mount 219.235.241.235:/files/web/cnzmkmfiles9 /usr/local/www/cnzmkmfiles9
测试NFS,文件名是写入文件的主机IP,每目录下两个文件分别为客户端和服务端shell下写入的文件
[root@webserver2 /usr/local/www] ll cnzmkmfiles1
total 0
-rw-r--r-- 1 4294967294 www 0B Jun 11 13:19 231
-rw-r--r-- 1 root www 0B Jun 11 13:19 237
[root@webserver2 /usr/local/www] ll cnzmkmfiles2
total 0
-rw-r--r-- 1 4294967294 www 0B Jun 11 13:19 231
-rw-r--r-- 1 root www 0B Jun 11 13:19 237
[root@webserver2 /usr/local/www] ll cnzmkmfiles3
total 0
-rw-r--r-- 1 4294967294 www 0B Jun 11 13:19 231
-rw-r--r-- 1 root www 0B Jun 11 13:19 237
[root@webserver2 /usr/local/www] ll cnzmkmfiles4
total 0
-rw-r--r-- 1 4294967294 www 0B Jun 11 13:32 231
-rw-r--r-- 1 root www 0B Jun 11 13:37 236
[root@webserver2 /usr/local/www] ll cnzmkmfiles5
total 0
-rw-r--r-- 1 4294967294 www 0B Jun 11 13:32 231
-rw-r--r-- 1 root www 0B Jun 11 13:37 236
[root@webserver2 /usr/local/www] ll cnzmkmfiles6
total 0
-rw-r--r-- 1 4294967294 www 0B Jun 11 13:32 231
-rw-r--r-- 1 root www 0B Jun 11 13:37 236
[root@webserver2 /usr/local/www] ll cnzmkmfiles7
total 0
-rw-r--r-- 1 4294967294 www 0B Jun 11 13:34 231
-rw-r--r-- 1 root www 0B Jun 11 13:40 235
[root@webserver2 /usr/local/www] ll cnzmkmfiles8
total 0
-rw-r--r-- 1 4294967294 www 0B Jun 11 13:35 231
-rw-r--r-- 1 root www 0B Jun 11 13:40 235
[root@webserver2 /usr/local/www] ll cnzmkmfiles9
total 0
-rw-r--r-- 1 4294967294 www 0B Jun 11 13:35 231
-rw-r--r-- 1 root www 0B Jun 11 13:40 235
双向读写正常