公司服务器要作维护,部分服务器须要进行迁移处理,其中就包括Ser-v FTP服务器。vue
角色 | ip | 系统版本 | sql版本 | Serv-U版本 | ODBC | account/password |
---|---|---|---|---|---|---|
旧服务器 | 192.168.1.18 | Server 2003 R2 Enterprise x64 Edition Service Pack 2 | community-5.7.10.0 | ServU v15.1.2 | 5.1.13-winx64 | heyt/hero922175 |
新服务器 | 192.168.1.179 (192.168.1.18) | community-5.7.10.0 | ServU v15.1.2 | 5.1.13-winx64 | administrator/Thinkiveftp18 |
原外网映射:218.17.161.51:18022mysql
备份分为四个个部分:应用、配置文件、数据库和附件。sql
应用安装在E盘 E:\Serv_U\ 内chrome
E:\Serv_U\. ├─FTP_Workspace │ └─发布目录-文件路径说明 ├─LOG └─Serv_IN └─Serv-U
将Serv_IN目录总体压缩复制数据库
附件采用windows磁盘映射的方式,挂载至\192.168.1.252\ftpdatawindows
使用工具有份浏览器
命令行备份服务器
mysqldump -u root -p `serv_u` > backup.sql #回车后,输入密码 Enter password: ******
F:. ├─FTP_Workspace │ └─发布目录-文件路径说明 ├─LOG └─Serv_IN └─Serv-U
安装系统依赖markdown
安装mysql(采用压缩包安装)网络
[client] loose-default-character-set = utf8 [mysql] default-character-set = utf8 tee=E:\\Serv_U\\tools\\Mysql\\mysql\\logsquery.log no-auto-rehash [mysqld] basedir = E:\\Serv_U\\tools\\Mysql\\mysql\\mysql-5.6.32-winx64 datadir = E:\\Serv_U\\tools\\Mysql\\mysql\\data port = 3306 socket = E:\\Serv_U\\tools\\Mysql\\mysql\\logs\\mysql.sock event_scheduler = 0 #GTID gtid_mode = on enforce_gtid_consistency = on #timeout interactive_timeout = 28800 wait_timeout = 28800 #character set character-set-server = utf8 open_files_limit = 65535 max_connections = 500 max_connect_errors = 100000 #logs log-output=file slow_query_log = 1 slow_query_log_file = E:\\Serv_U\\tools\\Mysql\\mysql\\logs\\slow.log log-error = E:\\Serv_U\\tools\\Mysql\\mysql\\logs\\error.log log_warnings = 2 long_query_time = 1 #log-slow-admin-statements = 1 #log-queries-not-using-indexes = 1 log-slow-slave-statements = 1 #binlog binlog_format = row log-bin = mybinlog binlog_cache_size = 4M max_binlog_size = 1G max_binlog_cache_size = 2G sync_binlog = 1 max_allowed_packet = 4M expire_logs_days = 10 #relay log skip_slave_start = 1 max_relay_log_size = 1G relay_log_purge = 1 relay_log_recovery = 1 log_slave_updates #slave-skip-errors=1032,1053,1062 #buffers & cache table_open_cache = 2048 table_definition_cache = 2048 table_open_cache = 2048 max_heap_table_size = 96M sort_buffer_size = 2M join_buffer_size = 2M thread_cache_size = 256 query_cache_size = 0 query_cache_type = 0 query_cache_limit = 256K query_cache_min_res_unit = 512 thread_stack = 192K tmp_table_size = 96M key_buffer_size = 8M read_buffer_size = 2M read_rnd_buffer_size = 16M bulk_insert_buffer_size = 32M #innodb innodb_buffer_pool_size = 1G innodb_buffer_pool_instances = 1 innodb_flush_log_at_trx_commit = 1 innodb_log_buffer_size = 64M innodb_log_file_size = 256M innodb_log_files_in_group = 2 innodb_max_dirty_pages_pct = 50 innodb_file_per_table = 1 innodb_rollback_on_timeout innodb_status_file = 1 innodb_io_capacity = 2000 transaction_isolation = READ-COMMITTED sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
mysqladmin.exe -uroot -p password "thinkive" Enter password:【直接回车】 Warning: Using a password on the command line interface can be insecure.
bin>mysql -uroot -p Logging 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;
mysql> grant all privileges on *.* to root@"%" identified by 'thinkive' with grant option; mysql> flush privileges;
恢复数据库文件
安装ODBC配置数据源
映射系统磁盘
添加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" start= auto sc start "Serv-U File Server"
访问和登陆Serv-U
Serv-U数据库
Server 2003 R2 Enterprise x64 Edition Service Pack 2 正常状况下是没法打开浏览器的,须要安装如下插件: