Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2013-09-27 10:17:17

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

[HOWTO] Install crtmpserver for Adult Script Pro on CentOS

Hi,

This is a small howto on installing crtmpserver (http://crtmpserver.com/) on CentOS 6.x (it does not work on 5.x) . Crtmpserver is a full and fast RTMP server. If you want to stop downloads, prevent hotlinking or even improve the playback of your videos this is the tool to use. There are other RTMP servers out there (Flash Media Server, Red5, WOWZA), however none is as easy to setup/configure, and most important, in my experience, none of them is as fast as crtmpserver.

You will need to run the bellow commands as root:

For x86:

wget http://crtmpserver.com/assets/binaries/784/crtmpserver-1.1_beta-i686-CentOS_6.2.tar.gz

For x86_64:

wget http://crtmpserver.com/assets/binaries/784/crtmpserver-1.1_beta-x86_64-CentOS_6.2.tar.gz

Once downloaded create the folder /opt/crtmpserver:

mkdir /opt/crtmpserver
tar xjf crtmpserver-1.1_beta-i686-CentOS_6.2.tar.gz
mv crtmpserver-1.1_beta-i686-CentOS_6.2/* /opt/crtmpserver/

Edit the configuration file /opt/crtmpserver/configs/flvplayback.lua and find:

mediaFolder="./media",

replace with:

mediaFolder="/where/adult-script-pro/is/installed/media/videos",

The crtmpserver is now ready for use. We will create a init script for centos (so we can automatically restart the server on reboot).
Save the following code to /etc/init.d/crtmpserver:

#! /bin/sh
# Basic support for IRIX style chkconfig
###
# chkconfig: 235 98 55
# description: Manages the services you are controlling with the chkconfig command
###

# Source function library.
. /etc/init.d/functions

NAME=crtmpserver
DAEMON=/opt/crtmpserver/crtmpserver
DAEMON_ARGS=" --daemon "
CONFIG_FILE="/opt/crtmpserver/configs/flvplayback.lua"
DAEMON_USER=root

DAEMON_UID=$(getent passwd ${DAEMON_USER} | cut -d":" -f3)
[ -z ${DAEMON_UID} ] && (echo "User ${DAEMON_USER} not exists"; return 1)
DAEMON_UID_ARG=" --uid=${DAEMON_UID} "

case "$1" in
  start)
	echo -n "Starting $NAME"
	${DAEMON} ${DAEMON_ARGS} ${DAEMON_UID_ARG} --pid=/var/run/${NAME}.pid ${CONFIG_FILE}
	echo "."
	;;
  stop)
	echo -n "Stopping $NAME"
	killproc ${DAEMON}
	echo "."
	;;
  *)
	echo "Usage: /sbin/service $NAME {start|stop}"
	exit 1
esac

exit 0

Make sure the file is executable:

chmod 755 /etc/init.d/crtmpserver

You can now start the crtmpserver using the following command:

service crtmpserver start

To make sure the server will start on reboot add the following 2 commands:

chkconfig --add crtmpserver
chkconfig crtmpserver on

To enable RTMP streaming go to Admin -> Video -> Config -> View and select RTMP for Streaming Method and enter rtmp://ip-where-crtmpserver-is-installed/vod/ for RTMP Stream Location. Thats it, you should be able to serve your videos via RTMP now :-)

Troubleshooting:
1. If you are running a firewall, make sure ports 1936, 6666 and 9999 are open.

If you want use to install and configure crtmpserver for you, we offer this service for 49$. Please email us at support@adultscriptpro.com if interested.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB