返回首页

gbase数据、南大通用产品文档:GBase8a

更新日期:2024年09月11日

GBaseTransaction属性

使用apache 搭建HTTP 文件服务器
1)
安装apr 和httpd
# rpm -ivh
apr-1.3.9-3.el6_1.2.x86_64.rpm

GBase 8a MPP Cluster 产品手册
5 数据库管理指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
1165
apr-util-1.3.9-3.el6_0.1.x86_64.rpm apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm
# rpm -ivh
httpd-2.2.15-15.el6.x86_64.rpm
httpd-manual-2.2.15-15.el6.noarch.rpm
httpd-tools-2.2.15-15.el6.x86_64.rpm
2)
修改HTTP 服务器默认配置
# vim /etc/httpd/conf/httpd.conf
修改服务器名称
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#ServerName www.example.com:80
ServerName 192.168.10.114:80
修改以下位置,将其中的"/var/www/html"修改为"/var/www/files"
也可直接使用"/var/www/html"作为文件存储位置,跳过这一步
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/var/www/html"
DocumentRoot "/var/www/files"
#
# This should be changed to whatever you set DocumentRoot to.
#
#

修改其它参数
# 是否使用memory-mapping,默认值on,挂载nfs 系统时设为off
# EnableMMAP off
# 是否使用sendfile 系统调用,默认值on,挂载nfs 系统时设为off
# EnableSendfile off

GBase 8a MPP Cluster 产品手册
5 数据库管理指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
1166
# 连接超时,默认值为60
# Timeout 60
禁用长文件名截断,添加以下配置。

IndexOptions NameWidth=*

或者
IndexOptions FancyIndexing VersionSort NameWidth*
注意
如果不禁用长文件名截断,由于Apache 会返回不完整的文件名,会
导致使用通配符方式加载HTTP 文件时发生错误。
3)
编辑默认欢迎页配置
# vim /etc/httpd/conf.d/welcome.conf
注释掉以下几行(默认如果html 下没有默认页面将显示403 错误页面)
#
# Options -Indexes
# ErrorDocument 403 /error/noindex.html
#

4)
关闭或配置防火墙

关闭防火墙
停止防火墙服务
# service iptables stop
iptables:清除防火墙规则:
[确定]
iptables:将链设置为政策ACCEPT:filter
[确定]
iptables:正在卸载模块:
[确定]
查看防火墙是否在开机时自动启动
# chkconfig --list iptables
Iptables
0:关闭
1:关闭
2:启用
3:启用
4:启用
5:启用
6:关闭
禁止防火墙在开机时自动启动

GBase 8a MPP Cluster 产品手册
5 数据库管理指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
1167
# chkconfig iptables off

# chkconfig iptables off --level 2345
设置后防火墙在开机时自动启动状态
# chkconfig --list iptables
Iptables
0:关闭
1:关闭
2:关闭
3:关闭
4:关闭
5:关闭
6:关闭

配置防火墙
设置默认规则
# iptables -A INPUT -j DROP
# iptables -A FORWARD -j ACCEPT
开放HTTP 端口
# iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
# iptables -I OUTPUT -p tcp -m tcp --sport 80 -j ACCEPT
保存防火墙设置
# iptables-save > /etc/sysconfig/iptables
5)
启动httpd 服务并设置为开机启动项
# service httpd start
正在启动httpd:
[确定]
# chkconfig httpd on
6)
将数据文件复制到/var/www/files(或/var/www/html)下
7)
用浏览器访问http://192.168.10.114 即可看到文件列表(前面配置的
ServerName 192.168.10.114:80)

使用“新建模板”功能,您可以创建所需的模板。
在“模板资源管理器”的根节点“GCluster Server 模板”上单击右键,
选择右键菜单中的“新建”→“文件夹”,并输入新模板文件夹名称,如下图
所示:

GBase 8a MPP Cluster 管理工具手册

- 192 -

南大通用数据技术股份有限公司

图 9-3 新建模板文件夹
在新建的模板文件夹上单击右键,选择“新建”→“模板”,并输入新模
板名称,如下图所示:

图 9-4 新建模板