Re: [p4] Perforce on Synology and Unreal Engine 4

p4rfong <[email protected]> Thu, 26 Apr 2018 11:10:02 -0700
Newsgroups gmane.comp.version-control.perforce
Message-ID <[email protected]>
Posted on behalf of forum user 'p4rfong'.

Here's the original post:

http://maillist.perforce.com/pipermail/perforce-user/2013-December/068906.html
[p4] Perforce Install on Synology DiskStation
CalebS perforce-user-forum at forums.perforce.com
Wed Dec 11 00:45:01 PST 2013

    Previous message: [p4] P4V on Mac: I can&#39;t sync
to a certain changelist
    Next message: [p4] Perforce Install on Synology
DiskStation
    Messages sorted by: [ date ] [ thread ] [ subject ] [
author ]

Posted on behalf of forum user 'CalebS'.

Sorry for bumping an older thread but I came across this while trying to answer
the same basic question and maybe someone will benefit from my experiences.


All of this work was done on a Synology DS414, with a hostname of
'synologyDS414':


1.  Enable SSH through the DSM control panel.
2.  Enable home directory support for your super user.
3.  SSH to your Synology server.
4.  Run `mkdir /volume1/perforce`
5.  D/L the  armel  binaries for the Perforce
version of your choice
into /volume1/perforce.  I used 13.3 from here:  
ftp://ftp.perforce.com/perforce/r13.3/bin.linux26armel/
[ftp://ftp.perforce.com/perforce/r13.3/bin.linux26armel/]
[  ftp://ftp.perforce.com/perforce/r13.3/bin.linux26armel/]
[ftp://ftp.perforce.com/perforce/r13.3/bin.linux26armel/]]
6.  Make sure you `chmod +x p4d` if need be.
7.  Run `/mkdir /volume1/perforce/P4ROOT`
8.  I like to make a 'start.sh' script to handle my defaults
for p4d execution, like so:

> cat start.sh # start.sh # -d : daemonize /volume1/perforce/p4d -d -r
/volume1/perforce/P4ROOT -p tcp:synologyDS414:1666 -J /volume1/perforce/journal
-L /volume1/perforce/synologyDS414_p4d.log  

After that you just need to invoke your start.sh and you've got a brand new
Perforce instance running on the default port on your NAS.

It Just Works!    :)

Also see    https://forum.synology.com/enu/viewtopic.php?t=29558

Re: Installing Perforce server on DS410

    Quote

Postby allanmb » Fri Mar 14, 2014 5:27 pm
I had perforce all up and running on my DS211j but when I upgraded to DSM 5 I
lost p4 so I just had to re-install. If there was an official package then it
would have hopefully been ok. Anyway here is what I did to get perforce
installed. There may be better directories to put the binaries but my Synology
box is only used as a P4 server and internal file server so it works for me.

login to your synology box using ssh as root

cd /volume1/homes/admin
wget   ftp://ftp.perforce.com/perforce/r13.1/b
[ftp://ftp.perforce.com/perforce/r13.1/b]  ... 6armel/p4d
wget   ftp://ftp.perforce.com/perforce/r13.1/b
[ftp://ftp.perforce.com/perforce/r13.1/b]  ... 26armel/p4
chmod +x p4
chmod +x p4d

for first time install
mkdir /volume1/p4root

test to see if we are working
/volume1/homes/admin/p4d -r /volume1/p4root &

use the following to work out the process id
ps | grep p4d

then do the following to kill the PID (the first number in the line from above)
kill -9 PID

cd /usr/syno/etc/rc.d
touch S90p4d.sh
vi S90p4d.sh

paste the contents below into the file

------- start file after this line
#!/bin/sh
### BEGIN INIT INFO
# Provides: p4d
# Required-Start: $local_fs $network $named $time
$syslog
# Required-Stop: $local_fs $network $named $time
$syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: perforce service
### END INIT INFO

SCRIPT='/volume1/homes/admin/p4d -r /volume1/p4root'
RUNAS=root

PIDFILE=/var/run/p4d.pid
LOGFILE=/var/log/p4d.log

start() {
if [ -f /var/run/$PIDNAME ] && kill -0 $(cat
/var/run/$PIDNAME); then
echo 'Service already running' >&2
return 1
fi
echo 'Starting service…' >&2
local CMD="$SCRIPT &> \"$LOGFILE\" & echo
\$!"
su -c "$CMD" $RUNAS > "$PIDFILE"
echo 'Service started' >&2
}

stop() {
if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat
"$PIDFILE"); then
echo 'Service not running' >&2
return 1
fi
echo 'Stopping service…' >&2
kill -15 $(cat "$PIDFILE") && rm -f
"$PIDFILE"
echo 'Service stopped' >&2
}

uninstall() {
echo -n "Are you really sure you want to uninstall this service? That
cannot be undone. [yes|No] "
local SURE
read SURE
if [ "$SURE" = "yes" ]; then
stop
rm -f "$PIDFILE"
echo "Notice: log file is not be removed: '$LOGFILE'"
>&2
update-rc.d -f p4d remove
rm -fv "$0"
fi
}

case "$1" in
start)
start
;;
stop)
stop
;;
uninstall)
uninstall
;;
retart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|uninstall}"
esac
------ stop file above this line

then test by
./S90p4d start
./S90p4d stop

voila! You should now have p4 auto start each time you reboot



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/3330-perforce-on-synology-and-unreal-engine-4
_______________________________________________
perforce-user mailing list  -  [email protected]
http://maillist.perforce.com/mailman/listinfo/perforce-user