-
Notifications
You must be signed in to change notification settings - Fork 3
Setup
To accepting inbound HTTP and HTTPS trafics from whole IP range (default)
Ports needed for Red5: 1935, 1936, 5080, 8088
To enable SSH access to the server (Linux/Mac)
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
$ chmod 400 my-key-pair.cer
- Make sure your private key file isn't publicly viewable
$ ssh -i my-key-pair.cer ec2-user@[DNS/IP to host]
Or you can use ssh config to simplify your life:
$ nano ~/.ssh/config
And write the text on (Without comments):
Host dev
HostName dev.example.com // IP or DNS
Port 22000 // Port to the ssh - I didn't use that
User ec2-user // Default Amazon AMI user
IdentityFile /Users/Someone/Documents/my-key-pair.cer</p>
Host github.com
IdentityFile ~/.ssh/github.key
Then you can use:
$ ssh dev
- to ssh into "dev" host.
Updates the instance with the newest updates
$ sudo yum update -y
Apache web server, with PHP and mySQL
Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html Source: https://gist.github.com/sl-digital/9838411
Amazon AMI have PHP5.3 by default. Must alter it to install PHP5.5 and more
$ sudo yum install httpd24 php55 php55-common php55-pdo php55-mysqlnd php55-gd php55-mbstring php55-mcrypt php55-pecl-apc php55-devel
$ sudo service httpd start // Start web server
$ sudo chkconfig httpd on
$ chkconfig --list httpd
Check it: 0:fra 1:fra 2:til 3:til 4:til 5:til 6:fra
$ sudo nano /etc/php.ini
error_log = /var/log/php-error.log
date.timezone = "America/Chicago"
$ sudo service httpd restart
Find the link to mysql yum distro: http://dev.mysql.com/downloads/repo/yum/
$ sudo yum localinstall http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
$ sudo yum install mysql-community-server
$ sudo service mysqld start
$ sudo /usr/bin/mysql_secure_installation // Set root pwd and say yes to all
$ sudo chkconfig mysqld on // Start mySQL in startup
$ chkconfig --list mysqld
Check it: 0:fra 1:fra 2:til 3:til 4:til 5:til 6:fra
$ sudo chown -R ec2-user /var/www/html
- Gives the ec2-user ownship on html - makes ftps access easier
We use Git to pull from Github.com
$ sudo yum install git-core
- Installs git
$ sudo ssh-keygen -t rsa
-> Chose "no passphrase"
$ sudo cat /root/.ssh/id_rsa.pub
-> Add the key as a "deploy key" at https://github.com/you/myapp/admin
$ cd /var/www/
$ sudo git clone git@github.com:yourUsername/yourApp.git html
$ cd /var/www/html
$ sudo git pull
Forget it! Too complicated!!
- Hard to install
- Requires a wide knowledge in Java, Actionscript and building a application in linux
- Too few/simple documentations about a complicated topic
- Have to create a flash object to communicate in RMTP proctol
- Must build a .swf object in Flex or Flash Builder - to properly communicate with the server
- Must find a way to communicate php/js ~ actionscript to have database updated correctly
- It's just stupid!
If you absolute want to read how to install Red5 in a Amazon AMI instance... here u go...
Uses a third-part to handle recording, uploading and encoding.
The choice of the project: Tag - https://cameratag.com/
Source: http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/creating-migrating.html
Alternative FMS than Red5 (which is hard to install and use) https://github.com/arut/nginx-rtmp-module BTW, maybe too hard to have 2 HTTP servers side-to-side?
The project is licensed under the MIT License. Copyright © Troels Madsen 2014