/*add by HanSyaun for showing code on article. start*/ /*add by HanSyaun for showing code on article. end*/

2017年10月24日 星期二

Perforce Server setup for Internet connection. (Success)


1.下載p4(Command Line)和P4d(Server)


https://www.lifewire.com/view-hidden-mac-folders-using-terminal-2260776
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

/usr/local/bin

p4 set p4client=my_client

2.關掉防火牆
3.將p4和p4d都用chmod +x變成可以執行檔,放在usr/local/bin,點兩下好像可以執行安裝?
4.查本機ip,router要指定本機ip做port forward,設完要重開。router設就好,modem不用設。
5.查自己的public ip準備給別人連。111.240.147.89
6.export P4PORT=111.240.147.89:1666  (設port,P4PORT大小寫好像有差)
7.打p4 info出錯
Hans-MacBook-Pro:~ yhs$ p4 info
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to 111.240.147.89:1666 failed.

connect: 111.240.147.89:1666: Connection refused
8.執行p4d也出錯