Servers
Change php directives with suPHP
You need to create 2 files in public_html of website where suPHP is enabled. A .htaccess specifying path to php.ini configuration and a php.ini with directives.
Example for account “account-name”. Make sure you update that in .htaccess content:
.htaccess
suPHP_ConfigPath /home/account-name/public_html
php.ini
register_globals = Off
Related Posts:
Configuring Flash Live Video Streaming Applications
Measure connection capabilities
To configure flash applications streaming you will first need to determine the connections that most users will have. So test first with your connection and also request other users to test.
So let’s consider this situation determined by http://www.speedtest.net (measure speed to a server close to the location of your streaming server):
Download: 9.43Mbp/s
Upload: 0.49Mbps
This looks like ADSL (in this situation upload bandwidth is 20 times lower than total connection bandwidth).
0.49 Mbps = 502 Kbps (kilobits per second)
8 bits = 1 byte, so that means you can upload with 62 kb/s (kilobytes per second)
As you can see, usually, connection is the cause of quality and latency limitations. A server with 1000Mbps connection will theoretically be able to handle up to 2000 x 0.49Mbps streams, so the server is not the problem with your tests, unless you’re on a shared plan and other clients are maxing out the resources.
How to configure flash videochat applications?
Considering you also have to upload audio and other data on that connection, you could setup camBandwidth to 49152 bytes/s (allocate for the compressed video stream).
On chat systems buffering should be reduced to 0.1 so delays are minimized. On 1 way streaming systems, you can use higher buffering to increase fluency in case of connection turbulence.
Flash streaming applications vs Skype
Skype desktop application uses different technology than these web based applications limited by browser based flash technology limitations . Skype uses:
- p2p connections between all users and also uses fast 3rd users as proxies (not using server – so if you are in the same local network with the other tester or with a 3rd skype client with better connection, it uses the local bandwidth)
- better codecs to get better quality for same bandwidth (flash player currently encodes only h263 and external encoders must be used to encode h264)
Related Posts:
Increase Size of /tmp (/usr/tmpDSK) Partition in Linux
service httpd stop
service mysql stop
pstree -p | grep tailwatchd
umount /var/tmp
umount -l /tmp
dd if=/dev/zero of=/usr/tmpDSK bs=1024k count=2048
du -sch /usr/tmpDSK
mkfs -t ext3 /usr/tmpDSK
file /usr/tmpDSK
mount -o loop,noexec,nosuid,rw /usr/tmpDSK /tmp
install -d –mode=1777 /tmp
mount -o bind,rw,noexec,nosuid /tmp /var/tmp
service httpd start
service mysql start
mount -o bind,rw,noexec,nosuid /tmp /var/tmp
Related Posts:
Install GhostScript and ImageMagick on Linux
yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel
svn co http://svn.ghostscript.com/ghostscript/trunk/gs
cd gs
./autoconf.sh
./configure && make && make installwget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
cd ImageMagick-6.6.5-4
./configure –prefix=/usr/local –with-bzlib=yes –with-fontconfig=yes –with-freetype=yes –with-gslib=yes –with-gvc=yes –with-jpeg=yes –with-jp2=yes –with-png=yes –with-tiff=yes
make && make install
You should get something like this:
root@host [~]# convert –version
Version: ImageMagick 6.6.5-4 2010-10-28 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
(more…)
Related Posts:
Install get_flash_videos on Linux
yum install ncftp
perl -MCPAN -e ‘install Bundle::CPAN’perl -MCPAN -e shell
install XML:Simple
install Data:AMF
install Compress:Zlib
install Crypt:Rijndael
install WWW:Mechanize
install Authen::NTLM
install Compress::Zlib
install HTML::Entities
install HTML::Parser
install Net::SSLexit
wget http://get-flash-videos.googlecode.com/files/get_flash_videos-1.23 -O /usr/local/bin/get_flash_videos
chmod a+x /usr/local/bin/get_flash_videos/usr/local/bin/get_flash_videos
If this is successful you should see get_flash_videos instructions and no dependency errors.
wget http://get-flash-videos.googlecode.com/files/get_flash_videos-1.23 -O /usr/local/bin/get_flash_videos chmod a+x /usr/local/bin/get_flash_videos
Related Posts:
Install Red5 on SUSE Linux
First know your system to know what to install.
Use uname -a to see if you need to download 32 or 64 bits versions.
Get SUSE release: cat /etc/SuSE-release
INSTALL JDK
Install latest JDK from http://java.sun.com/javase/downloads/index.jsp .
Use chmod a+x to make downloaded file executable and execute it.
Make sure latest version is used:
ln -s /usr/java/latest /usr/local/jdk
ln -s /usr/java/latest/jre /usr/local/jre
rm /usr/bin/java
ln -s /usr/java/latest/bin/java /usr/bin/java
export JAVA_HOME=/usr/java/latest/
INSTALL SVN
Get SVN from: http://software.opensuse.org/search?baseproject=ALL&p=1&q=subversion
Install RPMs with: rpm -iv package.rpm
Install any dependencies as required. Search from http://software.opensuse.org/search .
INSTALL ANT
wget http://www.apache.org/dist/ant/binaries/apache-ant-1.8.0-bin.tar.gz
tar zxvf apache-ant-1.8.0-bin.tar.gz
mv apache-ant-1.8.0 /usr/local/ant
Configure
export ANT_HOME=/usr/local/ant
ln -s /usr/local/ant/bin/ant /usr/local/bin/ant
Replace old ant
rm /usr/bin/ant
ln -s /usr/local/ant/bin/ant /usr/bin/ant
Check ant version:
ant –version
INSTALL Red5
Get latest Red5 :
svn co http://red5.googlecode.com/svn/java/server/trunk red5
Build Red5 :
cd red5
ant prepare
ant dist
Move Red5:
cd ..
mv red5 /opt/red5
OPERATE RED5
Start Red5 (when need or on server reboot):
cd /opt/red5/dist
./red5.sh > start.log &
Install/update applications in the /opt/red5/dist/webapps folder . For changes to take effect, Red5 must be restarted:
1. Check if red5 is running:
ps aux | grep red5
2. Go to its folder and shut red5 down:
cd /opt/red5/dist
./red5-shutdown.sh
3. See if it’s still running or not:
ps aux | grep red5
4. Restart it, and also make it output the logs into a file of your choice:
./red5.sh > start.log &
5. Make sure it’s back online:
ps aux | grep red5
Related Posts:
Red5 Linux Server Optimizations and Tools
Some java optimizations to add in red5.sh :
export JAVA_OPTS=”-Xrs -Xms128M -Xmx256M -Dsun.rmi.dgc.client.gcInterval=300000 -Dsun.rmi.dgc.server.gcInterval=360000 -Djava.net.preferIPv4Stack=true -XX:+ExplicitGCInvokesConcurrent -XX:+UseConcMarkSweepGC -Xverify:none”
Assuming red5 was installed in /opt/red5/dist admin will often need to restart it or check if it’s running.
Make sure Red5 restarts: restart.sh
#!/bin/bash
#Restart the process
#First see if running
PID=`ps -eo ‘tty pid args’ | grep ‘red5′ | grep -v grep | grep -v restart | tr -s ‘ ‘ | cut -f2 -d ‘ ‘`
cd /opt/red5/dist
if [ -z "$PID" ]
then
#not running
echo “Red5 was not running at `date`” >> /opt/red5/dist/run-restart.log
else
echo “Red5: $PID”
#shutdown
/opt/red5/dist/red5-shutdown.sh
sleep 6
#make sure
kill $PID >> null
sleep 2
fi
#start
/opt/red5/dist/red5.sh >> /opt/red5/dist/red5.log &
echo “On request restarted Red5 at `date`” >> /opt/red5/dist/run-restart.log
Mare sure Red5 process is running, if not start it: running.sh
#!/bin/bash
#set environment
PID=`ps -eo ‘tty pid args’ | grep ‘red5′ | grep -v grep | grep -v running | tr -s ‘ ‘ | cut -f2 -d ‘ ‘`
if [ -z "$PID" ]
then
#Restart the process
cd /opt/red5/dist
/opt/red5/dist/red5.sh >> /opt/red5/dist/red5.log &
echo “Restarted Red5 at `date`” >> /opt/red5/dist/run-restart.log
else
#do nothing
echo “Red5 is already running with PID=$PID at `date`” >> /opt/red5/dist/run-checked.log
fi
Red5 Services
Red5 Hosting
Red5 installation on VPS & Dedicated Servers (Linux / Windows)
Related Posts:
Install GeoIP PHP Extension
Install GeoIP C API
Change 1.4.6 to downloaded version.
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar zxvf GeoIP.tar.gz
cd GeoIP-1.4.6
./configure
make
make check
make install
Install PHP PECL extension
wget http://pecl.php.net/get/geoip
tar zxvf geoip
cd geoip-1.0.7
phpize
./configure
make
make check
make install
Find php.ini
php -i | grep php.ini
Enable extension to load in php.ini:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=geoip.so
You may need to restart HTTP server (apache) to apply changes.
Download Geo Lite City database
wget -N -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
mv GeoLiteCity.dat /usr/local/share/GeoIP/GeoIPCity.dat
For more accurate detection and production projects, buy the full GeoCity database from MaxMind.
Related Posts:
Red5 0.9 Final Released
Get latest Red5 0.9 Final (27 January 2010) from http://code.google.com/p/red5/.
This final release includes important improvements and bug fixes.
http://code.google.com/p/red5/updates/list
Red5 Tutorials
Red5 Centos Linux Installation
Red5 Unbuntu Linux Installation
Run Red5 & Wowza Flash Media Servers on Same Linux Server
Red5 Services
Red5 Hosting
Red5 installation on VPS & Dedicated Servers (Linux / Windows)
Related Posts:
Run Red5 & Wowza Flash Media Servers on Same Linux Server
This post shows how to install Wowza on a server where there is another RTMP server, already installed, i.e. Red5. Run 2 rtmp servers at same time and allow applications to connect on both simultaneously.
Video Broadcast
Enter Presentation
Enter Conference