Demand analysis
Company server to do maintenance, some servers need to do migration processing, including SER-V FTP server.
Confirm Environment Information
role |
IP |
System Version |
SQL Version |
serv-u version |
ODBC |
Account/password |
Old server |
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 |
New server |
192.168.1.179 (192.168.1.18) |
|
community-5.7.10.0 |
Servu v15.1.2 |
5.1.13-winx64 |
Administrator/thinkiveftp18 |
Original External network mapping: 218.17.161.51:18022
Backup Server App
The backup is divided into four parts: apps, profiles, databases, and attachments.
application/configuration file backup
Application installed in E-drive E:\Serv_U\
E:\Serv_U\. ├─FTP_Workspace │ └─发布目录-文件路径说明 ├─LOG └─Serv_IN └─Serv-U
Copy the serv_in directory as a whole
Attachment backup
Attachments are mounted to \192.168.1.252\ftpdata using Windows disk Mapping
- Account:ftpdata
- password:thinkive20060808
Database backup
Using tool Backup
Command-Line Backup
mysqldump -u root -p `serv_u` > backup.sql#回车后,输入密码Enter password: ******
Migration Restore
- Upload the app backup to the new server, and the directory is consistent with the original directory
F:.├─FTP_Workspace│ └─发布目录-文件路径说明├─LOG└─Serv_IN └─Serv-U
[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 = 0#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 = # 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 = 1 Log_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 = 0query_cache_type = 0query_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
- modify system variable
- path after adding the path to the MySQL Bin folder
- new system variable , variable name: Mysql_home variable value 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
- port exposed with original consistency: 3306
- Start command: net start MySQL
- Close command: net stop MySQL
- set MySQL database root user password
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;
- Set Root remote connection
mysql> grant all privileges on *.* to [email protected]"%" identified by ‘thinkive‘ with grant option;mysql> flush privileges;
Recovering a database file
- Tools import directly (new database)
- Open Heidisql-> Connect new Database Tools, load SQL file
- Command line import data (new database)
Mysql-u Root-p < Backup.sql
Installing the ODBC configuration data source
- Double-click Install Mysql-connector-odbc-5.1.13-winx64.msi
- Start, management tools, data Source Manager, System DSN, add Serv_u data source
Mapping System Disks
- My Computer-----Map Network Drive---drive letter Selection Z----Input account/password to add
Add Serv-u to Windows services
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= autosc start "Serv-U File Server"
Restart Service
- Add Serv-u File Server to system service
- "E:\Serv_U\Serv_IN\Serv-U\Serv-U.exe"-service
- Setting up system service logins
- Open the Serv-u File Server service properties and specify the system administrator account to log in
- Run FTP directory under Serv-u-tray.exe, add system Run console
- Install Chrome Browser
- Bottom right corner of the system to run the console, right-click the System browser to run (access to the System administration page-only this page can set group and directory permissions)
- Double-click the Quick Launch app you've made
Serv-u use
Access and login serv-u
- Once the Serv-u service is started, the browser directly accesses Http://Serv-U server IP:80 port to access and log in Serv-u.
- Note: If the page cannot be accessed, first turn off the firewall on the computer where Serv-u is trying to refresh the Web page access.
- serv-u default management, login server
- e:\serv_u\serv_in\serv-u\serv-u-tray.exe-administrator
- configuration serv_ U groups assign group permissions and can only be manipulated using the change mode
Serv-u Database
- Heidisql Tool Access
- Network type: MySQL is selected by default.
- Host name/ip:127.0.0.1:mysql Port
- User name: Root
- Password: xxxxxx
- Database: Serv_u
- Database storage directory: Default in
- C:\Program Files\mysql\mysql Server 5.0\data
Exception handling
Server 2003 R2 Enterprise x64 Edition Service Pack 2 is normally unable to open the browser, the following plugins need to be installed:
?
Serv-u FTP migration (WINDOWS_TO_WINDWOS)