Serv-U使用SQL Server作为存储源的安装说明

1、运行MSSQL企业管理器,新加数据库ServU,新建SQL登录账号ServU,密码xxxx,指定为数据库的dbowner,指定默认数据库为ServU
2、在企业管理器中选中数据库ServU,进入顶部菜单 工具——查询分析器,将下面"建表SQL语句"后面的所有内容复制到查询分析器中运行
4、创建系统DSN,名称为ServU,指向SQL Server的数据库ServU
5、在Serv-U Administrator里面新建域Simple Domain,使用ODBC存储,在树形菜单中选中Simple Domain,点击右侧控制面板上部的'ODBC'
选项卡,在下面第1、2、3格中分别填入系统DSN的名字、使用的账号、密码,点应用。
6、停止Serv-U服务,到Serv-u安装目录下打开ServUDaemon.ini,将[Domain1]小节下的两行设置"ODBCTables" and "ODBCColumns",替换为

ODBCTables=ftp_users|ftp_groups|ftp_userAccess|ftp_groupAccess|ftp_userIPs|ftp_groupIPs
ODBCColumns=ftpUserName|ftpPassword|sKey|dirHome|loginMsgFile|accessRule|disabled|sessionEncryption|dirHomeLock|hideHidden|alwaysAllowLogin|changePassword|quotaEnable|maxUsersLoginPerIP|speedLimitUp|speedLimitDown|maxUsersConcurrent|timeOutIdle|timeOutSession|ratioUp|ratioDown|ratioCredit|quotaCurrent|quotaMax|expiration|privilege|ftpPasswordType|ratioType|groups|notes|indexNo

7、启动Serv-U服务,OK了

注意:上面所有的名称均可更改;[DomainXX]中的XX应为新建的域对应的数字

建表SQL语句


IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('dbo.ftp_groupAccess') AND OBJECTPROPERTY(id, 'IsUserTable') = 1)
DROP TABLE dbo.ftp_groupAccess
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('dbo.ftp_groupIPs') AND OBJECTPROPERTY(id, 'IsUserTable') = 1)
DROP TABLE dbo.ftp_groupIPs
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('dbo.ftp_groups') AND OBJECTPROPERTY(id, 'IsUserTable') = 1)
DROP TABLE dbo.ftp_groups
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('dbo.ftp_userAccess') AND OBJECTPROPERTY(id, 'IsUserTable') = 1)
DROP TABLE dbo.ftp_userAccess
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('dbo.ftp_userIPs') AND OBJECTPROPERTY(id, 'IsUserTable') = 1)
DROP TABLE dbo.ftp_userIPs
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('dbo.ftp_users') AND OBJECTPROPERTY(id, 'IsUserTable') = 1)
DROP TABLE dbo.ftp_users
GO

CREATE TABLE dbo.ftp_groupAccess (
 indexNo smallint NOT NULL,
 ftpUserName varchar (50) NOT NULL,
 accessRule varchar (200) NOT NULL
)
GO

CREATE TABLE dbo.ftp_groupIPs (
 indexNo smallint NOT NULL,
 ftpUserName varchar (50) NOT NULL,
 accessRule varchar (80) NOT NULL
)
GO

CREATE TABLE dbo.ftp_groups (
 id int IDENTITY (1, 1) NOT NULL,
 ftpUserName varchar (50) NOT NULL,
 accessRule varchar (200) NULL,
 notes varchar (255) NULL
)
GO

CREATE TABLE dbo.ftp_userAccess (
 indexNo smallint NOT NULL,
 ftpUserName varchar (50) NOT NULL,
 accessRule varchar (200) NOT NULL
)
GO

CREATE TABLE dbo.ftp_userIPs (
 indexNo smallint NOT NULL,
 ftpUserName varchar (50) NOT NULL,
 accessRule varchar (80) NOT NULL
)
GO

CREATE TABLE dbo.ftp_users (
 id int IDENTITY (1, 1) NOT NULL,
 ftpUserName varchar (50) NOT NULL,
 ftpPassword varchar (50) NOT NULL,
 ftpPasswordType tinyint NULL,
 changePassword bit NOT NULL,
 sKey varchar (50) NOT NULL,
 accessRule varchar (200) NULL,
 dirHome varchar (200) NOT NULL,
 privilege tinyint NULL,
 loginMsgFile varchar (80) NULL,
 disabled bit NOT NULL,
 sessionEncryption bit NOT NULL,
 dirHomeLock bit NOT NULL,
 hideHidden bit NOT NULL,
 alwaysAllowLogin bit NOT NULL,
 maxUsersConcurrent smallint NOT NULL,
 speedLimitUp int NULL,
 speedLimitDown int NULL,
 maxUsersLoginPerIP smallint NOT NULL,
 timeOutIdle int NULL,
 timeOutSession int NULL,
 quotaEnable bit NOT NULL,
 quotaCurrent bigint NULL,
 quotaMax bigint NULL,
 ratioType tinyint NULL,
 ratioUp smallint NULL,
 ratioDown smallint NULL,
 ratioCredit float NULL,
 expiration smalldatetime NULL,
 groups varchar (80) NULL,
 notes varchar (255) NOT NULL
)
GO

ALTER TABLE dbo.ftp_groups WITH NOCHECK ADD CONSTRAINT pk_ftp_groups PRIMARY KEY CLUSTERED (id)
GO

ALTER TABLE dbo.ftp_users WITH NOCHECK ADD CONSTRAINT pk_ftp_users PRIMARY KEY CLUSTERED (id)
GO

ALTER TABLE dbo.ftp_groupAccess ADD CONSTRAINT df_ftp_groupAccess_indexNo DEFAULT (2) FOR indexNo
GO

CREATE INDEX ix_ftp_groupAccess__ftpUserName ON dbo.ftp_groupAccess(ftpUserName, indexNo)
GO

ALTER TABLE dbo.ftp_groupIPs ADD CONSTRAINT df_ftp_groupIPs_indexNo DEFAULT (2) FOR indexNo
GO

CREATE INDEX ix_ftp_groupIPs__ftpUserName ON dbo.ftp_groupIPs(ftpUserName, indexNo)
GO

CREATE UNIQUE INDEX ix_ftp_groups__ftpUserName ON dbo.ftp_groups(ftpUserName)
GO

ALTER TABLE dbo.ftp_userAccess ADD CONSTRAINT df_ftp_userAccess_indexNo DEFAULT (2) FOR indexNo
GO

CREATE INDEX ix_ftp_userAccess__ftpUserName ON dbo.ftp_userAccess(ftpUserName, indexNo)
GO

ALTER TABLE dbo.ftp_userIPs ADD CONSTRAINT df_ftp_userIPs_indexNo DEFAULT (2) FOR indexNo
GO

CREATE INDEX ix_ftp_userIPs__ftpUserName ON dbo.ftp_userIPs(ftpUserName, indexNo)
GO

ALTER TABLE dbo.ftp_users ADD
 CONSTRAINT df_ftp_users_changePassword DEFAULT (1) FOR changePassword,
 CONSTRAINT df_ftp_users_sKey DEFAULT ('') FOR sKey,
 CONSTRAINT df_ftp_users_disabled DEFAULT (0) FOR disabled,
 CONSTRAINT df_ftp_users_sessionEncryption DEFAULT (0) FOR sessionEncryption,
 CONSTRAINT df_ftp_users_dirHome DEFAULT ('') FOR dirHome,
 CONSTRAINT df_ftp_users_dirHomeLock DEFAULT (1) FOR dirHomeLock,
 CONSTRAINT df_ftp_users_hideHidden DEFAULT (1) FOR hideHidden,
 CONSTRAINT df_ftp_users_alwaysAllowLogin DEFAULT (0) FOR alwaysAllowLogin,
 CONSTRAINT df_ftp_users_maxUsersConcurrent DEFAULT (10) FOR maxUsersConcurrent,
 CONSTRAINT df_ftp_users_speedLimitUp DEFAULT ((-1)) FOR speedLimitUp,
 CONSTRAINT df_ftp_users_speedLimitDown DEFAULT ((-1)) FOR speedLimitDown,
 CONSTRAINT df_ftp_users_maxUsersLoginPerIP DEFAULT (5) FOR maxUsersLoginPerIP,
 CONSTRAINT df_ftp_users_timeOutSession DEFAULT ((-1)) FOR timeOutSession,
 CONSTRAINT df_ftp_users_quotaEnable DEFAULT (1) FOR quotaEnable,
 CONSTRAINT df_ftp_users_quotaCurrent DEFAULT (0) FOR quotaCurrent,
 CONSTRAINT df_ftp_users_quotaMax DEFAULT (52428800) FOR quotaMax,
 CONSTRAINT df_ftp_users_notes DEFAULT ('') FOR notes
GO

CREATE UNIQUE INDEX ix_ftp_users__ftpUserName ON dbo.ftp_users(ftpUserName)
GO

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值