Zen Tao Migration (windows_to_linux)

demand analysis

With the increase of Zen Tao data, the corresponding speed of the MySQL server provided by the virtual machine cannot keep up with the demand. In addition, the front-end and database of Zen Tao were installed separately in windows and linux, and now the physical server is provided, and the Zen Tao environment needs to be migrated.

Confirm environmental information

ip system version sql version Role
192.168.1.249 cents 6.4 5.6.28-log mysql old server
192.168.35.130 cents 7.2 10.1.22-MariaDB new server

Steps

Install the same version of the ZenTao one-click installation package in the linux server

  • Extract to opt directory tar -zxvf ZenTaoPMS.9.6.2.zbox_64.tar.gz -C /opt

  • Start and stop of apache and mysql

    • Run the /opt/zbox/zbox start command to start Apache and Mysql.
    • Execute the /opt/zbox/zbox stop command to stop Apache and Mysql.
    • Run the /opt/zbox/zbox restart command to restart Apache and Mysql.
    • /opt/zbox/zbox -ap 8080 -mp 3307
      • The ap parameter can modify the port of Apache
      • The mp parameter can modify the port of Mysql
    • If you need to automatically start at boot, you can add /opt/zbox/zbox restart to the auto-start directory of the operating system.

restore data

  • Upload the backup of the Windows attachment (zentao\www\data\upload\1) to the Linux server, overwriting the corresponding directory file, /opt/zbox/app/zentao/www/data/upload/1
  • Export data (old database)
    • $ /usr/local/mysql/bin/mysqldump -S /data/mysql/mysql3307/tmp/mysql.sock -h192.168.1.249 —master-data=2 —single-transaction —default-character-set=utf8 -uroot -p zentao > zentao.sql

    • Error:

      ERROR 1194 (HY000): Table ‘zt_file’ is marked as crashed and should be repaired

    • Solution:

      REPAIR TABLEzt_file

  • Import data (new database)
    • mysql -u root -p < zentao.sql

restart the service

Zen use

  • Access and Login ZenTao

    • After starting the Apache and Mysql services, the browser can directly access http://ZenTao server ip:apache port to access and log in ZenTao.
    • Note: If the webpage cannot be accessed, please turn off the firewall and selinux of the computer where ZenTao is located, and then refresh the webpage to try it.
    • The default administrator account of ZenTao is admin and the password is 123456.
  • Zen Tao Database

    • Web login database

      • ZenTao database management uses adminer, but for security, authentication is required when accessing adminer, you need to run /opt/zbox/auth/adduser.sh to add users (first cd /opt/zbox/auth/ and then execute ./ adduser.sh)
      • Visit http://the ip:apache port of Zen Tao Service on the webpage , click the "Database Management" button to have 2 layers of verification:
        • The pop-up window verification is to enter the username and password added by running addusers.sh
        • The webpage directly displays the login interface:
          • System: MySQL is selected by default.
          • server: 127.0.0.1: mysql port
          • Username: root
          • Password: 123456
          • Database: zentao
    • Connect to the database from the command line

      • Log in to the database: /opt/zbox/bin/mysql -u root -P mysql port -p (for example: /opt/zbox/bin/mysql -u root -P 3306 -p)
      • Import database: /opt/zbox/bin/mysql -u root -P mysql port -p library name to be imported < XXXX.sql (for example: /opt/zbox/bin/mysql -u root -P 3306 -p zentao < zentao.sql)
      • Linux database storage directory: opt/zbox/data/mysql/zentao

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325141016&siteId=291194637