Migrating from Tomcat to BES
If Java is not installed, set up the Java environment.
- Download the BES application and conversion tool, or contact BES to directly obtain them.
- Run the following command on Linux or use a tool on Windows to decompress the application and tool packages.
1tar -zxvf BES-AppServer-Standard-With-Tool-devkit-ver-9.5.5.7266.tar.gz
- Create a user account, an upload directory, and an input directory.
1 2 3 4 5
groupadd bes; useradd -g bes bes; mkdir -p /home/bes/bes_appserver_standard_9.5.5.7266; mkdir -p /home/bes/migration; mkdir -p /home/bes/migration_input;
- Upload the application package and conversion tool.
- Upload the BES_AppServer application package to the /home/bes/bes_appserver_standard_9.5.5.7266 directory.
- Upload the BES conversion tool package to the /home/bes/migration directory.
- Copy the following files to the input directory, set JAVA_HOME, and change the owner group of the directory.
Check that the permission on the Java directory obtained by running which java is at least 755.
cp -r {tomcat_home} /home/bes/migration_input; readlink -f "$(which java)" | sed "s:/bin/java::"; echo "export JAVA_HOME=OS_JAVA_HOME" >> "/home/bes/.bashrc"; echo "export PATH=$JAVA_HOME/bin:$PATH" >> "/home/bes/.bashrc"; chmod 700 -R /home/bes; chown bes:bes -R /home/bes; su - bes; source .bashrc;
- tomcat_home: source Tomcat installation directory. Replace it with the actual directory.
- OS_JAVA_HOME: path obtained by running the readlink -f command. Replace it with the actual path.
After setting JAVA_HOME, run the following command to verify the setting:1java -version;
- Decompress the BES application and tool packages and modify the migrate.properties file.
1 2 3 4 5
tar -zxvf /home/bes/bes_appserver_standard_9.5.5.7266/BES-AppServer-Standard-9.5.5.7266.tar.gz -C /home/bes/bes_appserver_standard_9.5.5.7266/ tar -zxvf /home/bes/migration/BES_App_Server_Tools.tar.gz -C /home/bes/ chmod 500 -R /home/bes/migration/bin cd /home/bes/migration/conf; vi migrate.properties;
- Press i to enter the insert mode and modify the following configuration items.
srcdir=Absolute Tomcat path in the migration_input directory # Example: /home/bes/migration_input/apache_tomcat_x.x.x destdir=BES installation path # Example: /home/bes/bes_appserver_standard_9.5.5.7266 srctype=Major Tomcat version # Example: tomcat7 desttype=bes955
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Starts the BES service.
1cd /home/bes/bes_appserver_standard_9.5.5.7266/bin; ./iastool --user admin --passwordfile ../conf/.passwordfile start --server;
- Start the migration.
1cd /home/bes/migration/bin && ./migration
If "Migration completed" is displayed in the console, the migration is successful.
- Log in to the BES console at http://IP_address:1900/console.For details about the default user name and password, see Accounts. If the login fails, check whether port 1900 is enabled.
1firewall-cmd --list-all- Check whether the ports line contains 1900. If not, add the port.
1 2
firewall-cmd --zone=public --add-port=1900/tcp --permanent; firewall-cmd --list-all
- Make the firewall configuration take effect and access the preceding URL again.
1firewall-cmd --reload
- Check whether the ports line contains 1900. If not, add the port.
- If you do not upload a license certificate for the migration, the default BES trial certificate is used (validity period: 185 days).
If you want to renew the license, contact BES to obtain a permanent certificate and import the license by following instructions in Updating the BES License.
Parent topic: Middleware Migration Guide