锘??xml version="1.0" encoding="utf-8" standalone="yes"?>db2瀹夎瀹屾垚鍚庯紝tcp/ip杩炴帴绔彛榛樿涓?0000?#32029;鍙?#38315;?#26473;?#28051;嬮潰鐨勬柟娉曠璁?#38171;?/span>

 

1銆佷娇鐢懡浠?db2 get dbm cfg |find "SVCENAME" 鏌?#37813;?#37714;癟CP/IP 鏈嶅姟鍚?/span>

 

2銆?#37714;?#32495;荤粺閰嶇疆鏂?#28000;?#38322;?#37813;?#37714;皊ervice name 瀵瑰簲鐨?port number
windows锛?#37836;湅 c:\windows\system32\drivers\etc\services                                                

aix锛?nbsp;        鏌湅 /etc/services

濡?#28051;?#38171;?/span>

DB2_DB2              60000/tcp
DB2_DB2_1          60001/tcp
DB2_DB2_2          60002/tcp
DB2_DB2_END      60003/tcp

db2c_DB2             50000/tcp

 

3銆佷娇鐢?netstat -an ?#25057;浠?#37836;?#37813;tcp/ip 鏈嶅姟鐨?#32468;彛

 
4銆?#28103;敼绔彛鍙?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />   鐩存帴淇敼services鏂?#28000;?#28051;綋鍓?#37832;嶅姟鍚嶅?#29808;簲鐨?#32468;彛鍙?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />濡?#38171;歞b2c_DB2 50000/tcp
鐒?#37722;?#38322;?#37722;?#37825;版嵁搴?#37719;OK  db2stop  db2start

5銆?#37721;?#28598;栭檮涓?#28051;涓叧浜?a href="https://www.baidu.com/s?wd=linux%E7%B3%BB%E7%BB%9F&tn=24004469_oem_dg&rsv_dl=gh_pl_sl_csd" target="_blank" style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; color: #6795b5; text-decoration: none; cursor: pointer; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; word-wrap: break-word;">linux绯荤粺涓?#37928;?#37836;?#37813;炬柟娉?#38171;堟憳鎶勫笘瀛?#38171;?#38171;?/span>

In JDBC configurations for WPA, you have to specify the port that DB2 is listening on. I usually look for /etc/services or try one of 50000/50001 and it usually works. In SUSE Linux, both the solutions did not work and there was another process (Multithreaded routing toolkit aka mrt) was listening on port 50000.

So how do we find out the DB2 port in a reliable way? Read on...
Step 1: Set the DB2 environment.
$ . ~db2inst1/sqllib/db2profile

Step 2: Find the service name for DB2 instance. It basically involves running "db2 get dbm cfg" command and finding a line containing SVCENAME. 
$ svc=`db2 get dbm cfg | grep SVCENAME | cut -d= -f2 | awk '{print $1}'`

Step 3: Find the service name that you got from Step 2 in /etc/services or %SYSTEMROOT%\system32\drivers\etc\services. That is the port DB2 is listening on. $ grep $svc /etc/services

 

Hope you find this useful.




鐢sqoop鍋氭祴璇曪紝鍙戠幇绔彛鍙?0000琚?#37719;?#37922;?#27996;嗭紝鎵浠氨鏇存敼浜?#28051;涓婦B2鐨?#32468;彛鍙?#37510;?/span>


绗?#28051;姝紝鐧诲綍DB2鏁版嵁搴?#37928;?#28729;炰緥鐢埛锛屾垜杩?#38322;屾?#30169;b2inst1

db2 get dbm cfg|grep SVCENAME

鍙?#28000;湅鍒?#28725;瑰簲鐨凷VCENAME鐨?#37722;嶇?#29256;槸浠涔?#37510;?/span>

clipboard.png


杩?#38322;?#28729;规?#25779;?#34425;幇涓涓棶棰?#37510;傛寜鐓綉涓?#37832;?#27996;?#29831;?#37928;勶紝浼氬皢SVCENAME?#25980;涓?#32468;彛鍙凤紝閭?#28051;?#37828;敊璇?#37928;?#37510;?#28051;瀹氳?#20344;皢杩?#28051;?#37722;嶇?#26495;拰services涓?#37928;?#37722;嶇?#25198;粺涓銆?/span>


绗?#27996;屾?#32029;閫鍥?#37714;root鐢埛?#32029;

vim /etc/services?#32029;鎵?#37714;?#28725;瑰簲鐨凷VCENAME鐨?#37722;嶇鎵瀵瑰簲鐨?#32468;彛鍙?#37510;?/span>

?#22428;杩?#38322;?#37929;存帴?#32042;杈戞垚50001

clipboard.png

绗?#28051;?#23005;紝鍏堝叧鏁版嵁搴擄紝鍐嶅紑?#27688;鍙?#28000;?#27996;?#37510;?/span>

db2stop

db2start


瀹為檯涓婃病鏈?#28598;嶆鐨勬楠紝鍙?#37828;?#28610;?#28598;?#27996;?#37712;?#37928;勬杈?#37928;?#28052;紝杩?#28051;嶅姞瑙?#38322;?#29831;存?#24239;紝鎵浠潙浜?#27996;?#37510;?/span>



鍙?#28000;?#38315;?#26473;db2 get dbm cfg?#32029;鏌?#29831;?#37825;版嵁搴撶?#24714;鍣?#38320;嶇疆鍙?#37825;帮紝?#27688;鍙?#28000;?#37836;?#37714;?#32468;彛鍙?#37812;?#32468;彛鍚?#37510;?/p>

绀轰緥锛?/p>

$ db2 get dbm cfg | grep -i svcTCP/IP Service name (SVCENAME) = 50000

50000?#27688;鏄?#32468;彛鍙?#27996;?#37510;?/p>


濡傛灉鏌?#37714;?#37928;勬槸绔彛鍚嶏紝鍙?#28000;?#38315;?#26473;?#32515;戠粶鏈嶅姟閰嶇疆鏂?#28000;?#37833;?#37813;?#37714;?#28725;瑰簲?#21479;绯?#37510;?/p>

绀轰緥锛?/p>

$ db2 get dbm cfg | grep -i svc

TCP/IP Service name (SVCENAME) = db2c_DB2

杩欐椂?#32029;?#27688;闇瑕?#37836;?#37813;綿b2c_DB2瀵瑰簲鐨?#32468;彛鍙?#27996;?#37510;?/p>

$ cat /etc/services | grep db2c_DB2

db2c_DB2 60000/tcp

杩?#28051;?0000?#27688;鏄?#32468;彛鍙?#27996;?#37510;?/p>

濡傛灉DB2鏄装鍦windows鐨剆erver涓婏紝閭?#28052;堝氨闇瑕?#37836;?#37813;?#26473;?#28051;?#38320;嶇疆鏂?#28000;?#27996;嗭紝C:\WINDOWS\system32\drivers\etc\services鏍煎紡锛歞b2c_DB2 50000/tcp





Prayer 2019-03-25 11:41 鍙戣璇?#29825;?/a>
]]>redis閰嶇疆http://www.9087120.com/jack-wang/archive/2019/03/24/216308.html灏忕帇灏忕帇Sun, 24 Mar 2019 06:02:00 GMThttp://www.9087120.com/jack-wang/archive/2019/03/24/216308.htmlhttp://www.9087120.com/jack-wang/comments/216308.htmlhttp://www.9087120.com/jack-wang/archive/2019/03/24/216308.html#Feedback0http://www.9087120.com/jack-wang/comments/commentRss/216308.htmlhttp://www.9087120.com/jack-wang/services/trackbacks/216308.html涓?#26462;?#37826;?#28000;?#29785;帇鍚?/div>
sudo mv redis-5.0.4 /usr/local/redis
杩?#37711;redis鏂?#28000;跺
sudo make
sudo make test
sudo make install
redis宸?#32513;?#28729;夎鍒?usr/local/bin/涓?br />
2銆?#26473;?#29723;?/div>
杩?#37711;?usr/local/redis/
鎵撳紑redis.conf鏂?#28000;?/div>
锛?锛?#37824;?#37816;侀櫎鏈?#37734;?#28598;?#37711;?#28000;朓P璁块棶
?#25950;閲婃?#22632;ind 127.0.0.1
锛?锛夎?#27342;淇?#37814;?#22959;紡
protected-mode yes?#25980;涓no
锛?锛夎?#21095;疆瀹?#37814;?#26473;?#32459;嬫?#32033;
demonize no?#25980;涓yes
3銆佸叧闂?/div>
鏌?#29831;redis杩?#32459;id
ps -ef|grep redis
kill -9 杩?#32459;id




]]>ue宸晶鐨勮?#21228;簮绠悊鍣?#38341;愯棌浜嗘?#28052;?#29835;?#37713;?#37833;?/title><link>http://www.9087120.com/prayer/archive/2019/03/21/216305.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Thu, 21 Mar 2019 06:46:00 GMT</pubDate><guid>http://www.9087120.com/prayer/archive/2019/03/21/216305.html</guid><wfw:comment>http://www.9087120.com/prayer/comments/216305.html</wfw:comment><comments>http://www.9087120.com/prayer/archive/2019/03/21/216305.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.9087120.com/prayer/comments/commentRss/216305.html</wfw:commentRss><trackback:ping>http://www.9087120.com/prayer/services/trackbacks/216305.html</trackback:ping><description><![CDATA[<div>https://zhidao.baidu.com/question/337623541.html<br /><br /><span style="color: #333333; font-family: 'PingFang SC', 'Lantinghei SC', 'Microsoft YaHei', arial, 瀹嬩綋, sans-serif, tahoma; font-size: 16px; line-height: 26px; background-color: #ffffff;">鏁?#28051;?#37826;?#28000;?#29785;?#37733;?#28051;?#29785;?#27996;?#37721;?#28000;寜CTRL+U?#23516;鍑?#37833;紝FTP瑙?#37733;?#28051;?#29785;?#27996;?#37510;?#37721;?#28000;?#37904;瑰?#23130;珮绾?#26916;?-銆嬮?#23943;疆--銆婩TP閫夐--銆嬪湪娴?#29785;堝櫒瑙?#37733;?#38322;屾樉绀FTP甯愭埛銆?/span></div><img src ="http://www.9087120.com/prayer/aggbug/216305.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.9087120.com/prayer/" target="_blank">Prayer</a> 2019-03-21 14:46 <a href="http://www.9087120.com/prayer/archive/2019/03/21/216305.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>鍔?#37804;佸簱(.so)閾炬帴闈欐佸簱(.a)鐨勬儏鍐垫荤粨http://www.9087120.com/prayer/archive/2019/03/20/216304.htmlPrayerPrayerWed, 20 Mar 2019 07:28:00 GMThttp://www.9087120.com/prayer/archive/2019/03/20/216304.htmlhttp://www.9087120.com/prayer/comments/216304.htmlhttp://www.9087120.com/prayer/archive/2019/03/20/216304.html#Feedback0http://www.9087120.com/prayer/comments/commentRss/216304.htmlhttp://www.9087120.com/prayer/services/trackbacks/216304.html鏉嚜锛歨ttp://www.cnblogs.com/nobugtodebug/archive/2012/11/07/e6cd72c67b3dd843f40d7ce919f7336a.html

鍔?#37804;佸簱(.so)閾炬帴闈欐佸簱(.a)鐨勬儏鍐垫荤粨 
涓鑸?#37833;?#29831;?#37734;?#38334;炬帴?#26882;?#20802;瑕佷娇鐢?#38344;欐佸簱鏈?#28051;?#32457;嶆柟娉?#38171;?/div>
1銆乴ink?#26882;鍔?#28051;?-static 閫夐锛涘綋鍔?#28051;?-static閫夐鍚庯紝gcc?#32048;鎶?#37813;鏈?#37922;?#37714;?#37928;?#25652;撻兘鍋?#38344;欐?#26473;炴帴銆?/div>
2銆乴ink?#26882;鐩存帴鎸?#28729;氭兂瑕侀?#27408;?#26473;炴帴鐨?a鏂?#28000;?#37928;勭粷瀵硅矾寰?#37510;備紭鐐规槸?#27342;闈?a鏂?#28000;?#28051;嶅瓨鍦紝鍚?#37714;?#38002;?#28729;?#37832;?#37825;?#38171;涚?#34425;偣涔?#37828;?#23536;堟槑鏄?#38171;屾嬁鍒板叾浠?#37832;?#37731;?#28051;紪璇戞椂?#32029;.a鏂?#28000;?#28052;熷?#21620;?#35826;湪鐩?#37722;?#37928;勮矾寰?#28051;?#28699;?#37824;?#37510;?/div>
3銆佸湪瑕侀?#27408;?#26473;炴帴鐨?#25652;?#37715;嶆寚瀹?Bstatic ?#32029;鍦?#29781;佸姩鎬?#26473;炴帴鐨?#25652;?#37715;嶆寚瀹?Bdynamic閫夐銆?#26473;炴帴鍣?#37734;湅鍒?Bstatic?#26882;?#32048;浼?#27996;?#37720;?#37813;鹃?#27408;佸?#25796;紝濡傛灉鎵?#28051;?#37714;板?#23941;幓鎵?#37716;?#37804;佸簱銆?-Bdynamic涔?#37828;?#37722;屾牱鐨勬儏鍐?#37510;?/span>锛?span style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; word-wrap: break-word; color: #ff0000;">鍙?#37828;垜瀹為鐨勭?#25780;灉鏄?#26473;?#28051;?#28051;?#38315;夐?#35268;鏈?#28051;嶈?#34562;綔鐢?#38171;屾垜鐨勭幆澧?#37828;centos 6.2 gcc4.7.2, 浠?#32513;湅浜gcc 鏂囨?#32029;杩?#28051;?#28051;?#38315;夐?#35268;槸?#25313;瀵筕xWorks骞?#37721;?#37928;勶紝鎵浠?#28051;嶈?#34562;綔鐢?#37510;?/span>锛?/div>
 
褰撴垜浠?#29781;佺紪璇?#28051;涓猻o鎻愪緵缁?#28598;栭?#23047;鐢紝杩?#28051;猻o鏈韩渚?#29863;?#28051;浜?#32471;?#28051;夋柟搴?#37510;備絾鏄垜浠?#37719;?#29999;?#37832;so鐨勪娇鐢?#28051;?#37922;叧蹇?#29831;so瀵瑰叾浠?#25652;?#37928;勪緷璧?#37510;?#23536;堣嚜鐒?#37928;勬槸?#32048;?#20802;鍒板湪?#32042;璇so鐨勬?#36346;?#37814;婁緷璧?#37714;?#37928;?#32471;?#28051;夋柟搴?#38344;欐侀?#28844;帴杩?#37833;?#37510;?/div>
?#22428;鍦?#26473;欐牱鍋?#37928;勬?#36346;欑鍒?#27996;棶棰?#38171;氭寚瀹?static閫夐?#35268;椂?#32029;link澶辫触?#32029;?#25930;璇?#37819;?#32448;?#29831;?#29781;?#37922;?#37714;?#37928;刼bject鏂?#28000;跺簲璇?#37922;?fPIC閫夐閲?#37826;扮紪璇?#37813;?#29723;?#38171;?#28052;熷氨鏄?#29831;达紝鍙?#37832;?#37922;?fPIC閫夐?#22317;紪璇?#37928;刼bject鏂?#28000;惰兘琚link鍒?so閲?#38171;?#38171;涘綋鐩存帴缁?#37713;?a鐨勭粷瀵硅矾寰?#37928;勬?#36346;檒ink?#22426;鍔燂紝浣?#37828;?so閲?#37719;村?#33333;病鏈?#37929;存?#23512;鍚?#37813;鐢?#37714;?#37928;?#32471;?#37722;?#26473;炴帴銆傞拡瀵圭鍒?#37928;勯棶棰?#38171;屾垜鍋?#27996;?#28051;浜?#28729;為銆?#28729;為?#23677;涓?#38171;?/div>
static.c

#include <stdio.h>
 
const char* sz_static = "i'm a static str.";
 
void print_niuzai_said()
{
    printf("in static lib, niu zai said, i'm happy!\n");
}

dynamic.c
 
#include <stdio.h>
#include "static.h"
 
void print_papa_said()
{
    print_niuzai_said();
    printf("in dynamic lib, papa said, niu zai is wonderful!\n");
}
 

main.c
 
#include <unistd.h>
#include "dynamic.h"
 
int main(int argc, char** argv)
{
    print_papa_said();
    return 0;
}
鍒?#37714;?#37922;?#28051;?#32513;勫懡浠紪璇?#37713;?#27996;?#28051;?#28051;?a 鏂?#28000;?/div>
1銆乬cc -o static.o -c static.c
      ar -r libstatic.a static.o
2銆乬cc -o static_shared.o -shared -fPIC -c static.c
      ar -r libstatic_shared.a static_shared.o
 
鐒?#37722;?#37922;?#23005;懡浠?nbsp; "gcc -o dynamic.o -c dynamic.c"  ?#32042;璇?#37713;篸ynamic.o鏂?#28000;?/div>
?#24116;涓?#37833;氨鏄?#37832;?#37826;?#37928;?#28051;?#26864;?#27996;嗭紝閾炬帴鐢熸垚libdynamic.so.姝椂鏈夎繖涔?#37713;?#32457;嶆儏鍐?#38171;?/div>
1銆佷娇鐢?"gcc -o libdynamic.so -shared -fPIC -L. -lstatic dynamic.o "?#32029;杩炴帴?#22426;鍔燂紝浣?so閲?#28729;為檯涓婃病鏈static.o閲?#37928;勫唴瀹?#37510;?img src="http://images.cnblogs.com/cnblogs_com/nobugtodebug/201211/20121107132126610.png" border="0" alt="" style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; max-width: 100%; word-wrap: break-word; cursor: -webkit-zoom-in; border: 0px;" />
2銆佷娇鐢?gcc -o libdynamic.so dynamic.o -shared -fPIC -L. -lstatic",杩炴帴澶辫触 
3銆佷娇鐢?"gcc -o libdynamic.so -shared -fPIC -L. -lstatic_shared dynamic.o"?#32029;杩炴帴?#22426;鍔燂紝浣?so閲?#28729;為檯涓婃病鏈static.o閲?#26473;?#37828;病鏈?#37928;勫唴瀹?#37510;?/div>
 
4銆佷娇鐢?"gcc -o libdynamic.so dynamic.o -shared -fPIC -L. -lstatic_shared",杩炴帴?#22426;鍔燂紝.a鐨勫唴瀹?#29722;?#26473;炴帴鍒?#27996;?so閲岄潰銆?/div>
 
 
鍙?#28598;紝閾炬帴闈欐?#37922;熸垚鍙?#37813;?#29723;岀搴椂?#32029;闈欐佸?#25780;槸涓嶆槸鐢?"-shared -fPIC" 閫夐?#22317;紪璇?#27996;?#37922;?#37928;勬病鏈夊?#21342;銆傞兘?#20824;姝?#29999;?#37922;熸垚鍙?#37813;?#29723;岀搴?#37510;?/div>
缁?#37722;?#28000;?#28051;婃儏鍐?#38171;屾荤粨濡?#28051;?#38171;?/div>
1銆佸姩鎬?#26473;炴帴搴?#28051;?#37922;?#37714;?#37928;刼bject鏂?#28000;跺?#21620;鏄?#37922;?"-shared -fPIC"閫夐?#22317;紪璇?#27996;?#37922;?#37928;勶紝鍚?#37714;?#26473;炴帴?#26882;瑕佷箞鎶敊?#32029;瑕佷箞琚?#36423;界銆?/div>
2銆侀?#27408;佸簱涓?#37928;刼bject鏂?#28000;?#37832;濂戒篃鐢?-shared -fPIC"閫夐?#22317;紪璇紝杩欐牱闈欐佸?#25779;氨鍙?#28000;?#37722;屾椂琚?#26473;炴帴鍒?so 鎴栬?#37721;?#37813;?#29723;屾?#37826;?#28000;?#28051;?#37510;?/div>
3銆佸姩鎬佸簱鍙兘杩炴帴鐢?-shared -fPIC"閫夐?#22317;紪璇?#37713;?#37833;?#37928;?#38344;欐佸簱锛堝拰绗?鐐规槸鍚?#28051;浠?#27996;?#38171;?/div>
4銆?#26473;炴帴閫夐鐨?#26916;?#25652;?#28725;?#26473;炴帴鍣?#37928;勮涓?#37832;夐噸瑕佸?#21342;锛?/div>
 
闈欐佸簱?#23047;鐢?shared -fPIC杩炴帴?#25057;浠?/span>杩炴帴鎵?#29723;?#32513;撴灉鍔?#37804;佸?#25782;?#25780;灉鏈缁?#32513;撴灉
鍚?/td>gcc -o libdynamic.so -shared -fPIC -L. -lstatic dynamic.o?#22426;鍔?/td>闈欐佸?#25779;唴瀹规病鏈夎杩炴帴澶辫触
鍚?/td>gcc -o libdynamic.so dynamic.o -shared -fPIC -L. -lstatic澶辫触 澶辫触
鏄?/td>gcc -o libdynamic.so -shared -fPIC -L. -lstatic_shared dynamic.o?#22426;鍔?/td>闈欐佸?#25779;唴瀹规病鏈夎杩炴帴澶辫触
鏄?/td>gcc -o libdynamic.so dynamic.o -shared -fPIC -L. -lstatic_shared?#22426;鍔?/td>闈欐佸?#25779;唴瀹?#29722;?#26473;炴帴?#22426;鍔?/td>
 


Prayer 2019-03-20 15:28 鍙戣璇?#29825;?/a>
]]>*.md (markdown)http://www.9087120.com/guijie/archive/2019/03/20/216303.html鏉板摜鏉板摜Tue, 19 Mar 2019 19:08:00 GMThttp://www.9087120.com/guijie/archive/2019/03/20/216303.htmlhttp://www.9087120.com/guijie/comments/216303.htmlhttp://www.9087120.com/guijie/archive/2019/03/20/216303.html#Feedback0http://www.9087120.com/guijie/comments/commentRss/216303.htmlhttp://www.9087120.com/guijie/services/trackbacks/216303.htmlFor https://github.com/scutan90/DeepLearning-500-questions/blob/master/ch07_%E7%94%9F%E6%88%90%E5%AF%B9%E6%8A%97%E7%BD%91%E7%BB%9C(GAN)/%E7%AC%AC%E4
%B8%83%E7%AB%A0_%E7%94%9F%E6%88%90%E5%AF%B9%E6%8A%97%E7%BD%91%E7%BB%9C(GAN).md, the formula doesn't show well. I asked Zhengxia, he says that markdown doesn't support formula very well. As he knows markdown doesn't support the in-line formula. He uses markdown, but he doesn't use formula in it. If you have to use formula, you can use latex. If we use Typora, at the lower left corner, select "鍚?#37922;?#23143;?#28000;?#37934;佹?#32033;". Change 


]]> տ3
<center id="iceyg"><tr id="iceyg"></tr></center>
<noscript id="iceyg"></noscript>
<center id="iceyg"></center>
<noscript id="iceyg"></noscript>
<noscript id="iceyg"></noscript>
<center id="iceyg"><tr id="iceyg"></tr></center>
<noscript id="iceyg"></noscript>
<center id="iceyg"></center>
<noscript id="iceyg"></noscript>
<noscript id="iceyg"></noscript>