test with Sqoop, found that the port number 50000 is occupied, so changed the DB2 port number.
The first step is to log in to the instance user of the DB2 database, and here I am db2inst1
DB2 Get dbm Cfg|grep SVCENAME
You can see what the name of the corresponding Svcename is.
There is an easy problem here. According to some people on the Internet, will change the svcename to the port number, that is wrong. Be sure to unify the name and the name in the services.
Step two, go back to the root user,
vim/etc/services, find the port number corresponding to the name of the corresponding svcename.
I'm here to edit directly into 50001
The third step, first close the database, then open on it.
Db2stop
Db2start
In fact, there is no complicated step, just a lot of people write the comparison of the chaos, not explained, so pits some.
Change the DB2 port number under Linux