首页
学习
活动
专区
工具
TVP
发布

Serv-u FTP迁移

需求分析

公司服务器要做维护,部分服务器需要进行迁移处理,其中就包括Ser-v FTP服务器。

确认环境信息

原外网映射:218.17.161.51:18022

备份服务器应用

备份分为四个个部分:应用、配置文件、数据库和附件。

应用/配置文件备份

应用安装在E盘 E:\Serv_U\ 内

E:\Serv_U\. ├─FTP_Workspace │ └─发布目录-文件路径说明 ├─LOG └─Serv_IN └─Serv-U

将Serv_IN目录整体压缩复制

附件备份

附件采用windows磁盘映射的方式,挂载至\192.168.1.252\ftpdata

account:ftpdata

password:xxx

数据库备份

使用工具备份

命令行备份

mysqldump -u root -p `serv_u` > backup.sql#回车后,输入密码Enter password: ******

迁移还原

将应用备份上传到新服务器中,目录同原始目录保持一致

原始目录

F:.├─FTP_Workspace│ └─发布目录-文件路径说明├─LOG└─Serv_IN └─Serv-U

安装系统依赖

常见问题解决

WIC(32-bit)Windows图像处理组件:http://www.microsoft.com/zh-cn/download/details.aspx?id=32

WIC(64-bit)Windows图像处理组件:http://www.microsoft.com/zh-cn/download/details.aspx?id=1385

.NET Framework 版本和依赖关系:http://msdn.microsoft.com/zh-cn/library/bb822049(v=vs.110).aspx

.NET Framework 4 (Web安装程序包):http://www.microsoft.com/zh-cn/download/details.aspx?id=17851

安装mysql(采用压缩包安装)

mysql-5.6.32-winx64.zip 至 E:\Serv_U\tools\Mysql\mysql\mysql-5.6.32-winx64

修改my.ini存放至mysql目录下

[client]loose-default-character-set=utf8[mysql]default-character-set=utf8tee=E:\\Serv_U\\tools\\Mysql\\mysql\\logsquery.logno-auto-rehash[mysqld]basedir=E:\\Serv_U\\tools\\Mysql\\mysql\\mysql-5.6.32-winx64datadir=E:\\Serv_U\\tools\\Mysql\\mysql\\dataport=3306socket=E:\\Serv_U\\tools\\Mysql\\mysql\\logs\\mysql.sockevent_scheduler=#GTIDgtid_mode=onenforce_gtid_consistency=on#timeoutinteractive_timeout=28800wait_timeout=28800#character setcharacter-set-server=utf8open_files_limit=65535max_connections=500max_connect_errors=100000#logslog-output=fileslow_query_log=1slow_query_log_file=E:\\Serv_U\\tools\\Mysql\\mysql\\logs\\slow.loglog-error=E:\\Serv_U\\tools\\Mysql\\mysql\\logs\\error.loglog_warnings=2long_query_time=1#log-slow-admin-statements = 1#log-queries-not-using-indexes = 1log-slow-slave-statements=1#binlogbinlog_format=rowlog-bin=mybinlogbinlog_cache_size=4Mmax_binlog_size=1Gmax_binlog_cache_size=2Gsync_binlog=1max_allowed_packet=4Mexpire_logs_days=10#relay logskip_slave_start=1max_relay_log_size=1Grelay_log_purge=1relay_log_recovery=1log_slave_updates#slave-skip-errors=1032,1053,1062#buffers & cachetable_open_cache=2048table_definition_cache=2048table_open_cache=2048max_heap_table_size=96Msort_buffer_size=2Mjoin_buffer_size=2Mthread_cache_size=256query_cache_size=query_cache_type=query_cache_limit=256Kquery_cache_min_res_unit=512thread_stack=192Ktmp_table_size=96Mkey_buffer_size=8Mread_buffer_size=2Mread_rnd_buffer_size=16Mbulk_insert_buffer_size=32M#innodbinnodb_buffer_pool_size=1Ginnodb_buffer_pool_instances=1innodb_flush_log_at_trx_commit=1innodb_log_buffer_size=64Minnodb_log_file_size=256Minnodb_log_files_in_group=2innodb_max_dirty_pages_pct=50innodb_file_per_table=1innodb_rollback_on_timeoutinnodb_status_file=1innodb_io_capacity=2000transaction_isolation=READ-COMMITTEDsql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

修改系统变量

Path后添加 mysql bin文件夹的路径

新建系统变量,变量名:MYSQL_HOME 变量值 E:\Serv_U\tools\Mysql\mysql\mysql-5.6.32-winx64

mysqld –install mysql –defaults-file=E:\Serv_U\tools\Mysql\mysql\mysql-5.6.32-winx64\my.ini

端口暴露同原始一致:3306

启动命令:net start mysql

关闭命令:net stop mysql

设置MySQL数据库root用户密码

mysqladmin.exe -uroot -p password "thinkive"Enter password:【直接回车】Warning: Using a password on the command line interface can be insecure.

清理用户

bin>mysql -uroot -pLogging to file 'D:\MySQL\logs\query.log'Enter password: thinkive......mysql> delete from mysql.user where user!='root' or host!='localhost';mysql> truncate mysql.db;mysql> drop database test;mysql> flush privileges;

设置root远程连接

mysql>grantallprivilegeson*.*toroot@"%"identifiedby'thinkive'withgrantoption;mysql>flushprivileges;

恢复数据库文件

打开heidisql - > 连接新数据库 -> 工具 -> 加载sql文件

工具直接导入(新数据库)

命令行导入数据(新数据库)

mysql -u root -p

安装ODBC配置数据源

双击安装 mysql-connector-odbc-5.1.13-winx64.msi

开始 -> 管理工具 -> 数据源管理器 -> 系统DSN -> 添加 serv_u 数据源

映射系统磁盘

我的电脑 -> 工具 -> 映射网络驱动器 -> 驱动器盘符选择Z -> \192.168.1.252\ftpdata -> 输入账号/密码进行添加

添加Serv-u至windows服务

sc create "Serv-U File Server" binpath= "E:\Serv_U\Serv_IN\Serv-U\Serv-U.exe -service"sc config "Serv-U File Server" tart= autosc start "Serv-U File Server"

重启服务

添加 Serv-U File Server 至系统服务

“E:\Serv_U\Serv_IN\Serv-U\Serv-U.exe” -service

设置系统服务登录

打开Serv-U File Server服务属性,指定系统管理员账号进行登录

运行FTP目录下Serv-U-Tray.exe,添加系统运行控制台

安装chrome浏览器

界面右下角系统运行控制台,右键选择系统浏览器进行运行(进入系统管理页面-只有该页面可以设置群组及目录权限)

双击已制作好的快捷启动应用

open.exe

Serv-U使用

访问和登录Serv-U

E:\Serv_U\Serv_IN\Serv-U\Serv-U-Tray.exe -administrator

配置Serv_U群组分配群组权限,只能使用改方式操作

启动Serv-U服务后,浏览器直接访问 http://Serv-U服务器ip:80端口 即可访问和登录Serv-U。

注:如果网页无法访问,请先关闭Serv-U所在电脑的防火墙尝试刷新网页访问。

Serv-U默认管理,登录服务器

Serv-U数据库

网络类型:默认选择MySQL。

主机名/IP:127.0.0.1:mysql端口

用户名: root

密 码:xxxxxx

数据库:serv_u

C:\Program Files\MySQL\MySQL Server 5.0\Data

数据库存储目录: 默认在

heidisql工具访问

异常处理

Server 2003 R2 Enterprise x64 Edition Service Pack 2 正常情况下是无法打开浏览器的,需要安装以下插件:

  • 发表于:
  • 原文链接http://kuaibao.qq.com/s/20180430G0SA8L00?refer=cp_1026
  • 腾讯「腾讯云开发者社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 cloudcommunity@tencent.com 删除。

扫码

添加站长 进交流群

领取专属 10元无门槛券

私享最新 技术干货

扫码加入开发者社群
领券