公司服務器要作維護,部分服務器須要進行遷移處理,其中就包括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 正常狀況下是沒法打開瀏覽器的,須要安裝如下插件: