Вернуться   Форум RadioCMS > RadioCMS > Установка RadioCMS

Добро пожаловать на Форум RadioCMS.
Форум доступен только для чтения.

Ответ
 
Опции темы Опции просмотра
  #1  
Непрочитано 04.09.2011, 22:39
DragonZX DragonZX вне форума
Junior Member
 
Регистрация: 25.12.2010
Сообщений: 23
По умолчанию Установка RadioCMS под Debian

Учитывая, что Debian (в моём случае Squeeze Stable) является более-менее автоматизированной системой и поскольку у меня сервер не один, то е*** с компиляцией пакетов из исходников мне как-то не улыбалось. Не получив вразумительных ответов на форуме, я стал доперать сам Поскольку панелька оказалась несовместима с моей накрученной системой по выдаче вебхостинга, пришлось поднимать VPS под Virtualbox, заказывать у хостера дополнительный IP и ставить её туда. Эту совершенно отдельную эпопею можно почитать по другим форумам.
Итак-с схема какая. Запущен VPS под панельку, который выводит канал, ретранслирующийся другим сервером (в качестве AutoDJ), при подключении к основному серверу автодиджей дропается и включается вновь при выходе из вещания. Да и на техработы VPS изымать гораздо легче чем целую рабочую машину.

Итакс берем за переменные
%myip% - IP-адрес вашего сервера (например 88.88.123.123)
%myserver% - URL-адрес вашего сервера (например mysite.ru)
%myautodj% - поток на который Вы вещаете с панельки


Итак для работы нам понадобится:
1. LAMP сервер
2. Icecast
3. Ezstream
4. RadioCMS
5. Прямые руки и внимательная голова (хотя даже с ними мы про*** дня два)

1. Ставим Lamp сервер(инфа отсюда)
Перед установкой рекомедуется обновить систему:
Код:
apt-get update
Ставим Apache + PHP
Код:
aptitude install apache2 php5 libapache2-mod-php5 php5-curl libssh2-php php5-gd
Выполните:
Код:
echo '<?phpinfo()?>' > /var/www/test.php
Откройте: http://%myip%/test.php. Вы должны увидеть конфигурацию модуля php.

Устанавливаем Mysql
Код:
aptitude install mysql-server mysql-client php5-mysql
Установка пароля root для MySQL:

Код:
mysql -u root
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('новый-пароль') WHERE user='root';
mysql> FLUSH PRIVILEGES;
Установка phpmyadmin

Код:
apt-get install phpmyadmin
Добавьте в файл /etc/apache2/apache2.conf строку:

Код:
Include /etc/phpmyadmin/apache.conf
Перезапустите apache:

Код:
/etc/init.d/apache2 restart
Откройте: http://%myip%/phpmyadmin

2. Установка Icecast + Ezstream

Код:
aptitude install icecast2 ezstream
Редактируем /etc/icecast2/icecast.xml
Код:
<icecast>
    <limits>
        <clients>100</clients>
        <sources>2</sources>
        <threadpool>5</threadpool>
        <queue-size>524288</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>
        <!-- If enabled, this will provide a burst of data when a client 
             first connects, thereby significantly reducing the startup 
             time for listeners that do substantial buffering. However,
             it also significantly increases latency between the source
             client and listening client.  For low-latency setups, you
             might want to disable this. -->
        <burst-on-connect>1</burst-on-connect>
        <!-- same as burst-on-connect, but this allows for being more
             specific on how much to burst. Most people won't need to
             change from the default 64k. Applies to all mountpoints  -->
        <burst-size>65535</burst-size>
    </limits>

    <authentication>
        <!-- Sources log in with username 'source' -->
        <source-password>source-password</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>relay-password</relay-password>

        <!-- Admin logs in with the username given below -->
        <admin-user>autosun</admin-user>
        <admin-password>admin-password</admin-password>
    </authentication>

    <!-- set the mountpoint for a shoutcast source to use, the default if not
         specified is /stream but you can change it here if an alternative is
         wanted or an extension is required
    <shoutcast-mount>/live</shoutcast-mount>
    -->

    <!-- Uncomment this if you want directory listings -->
    <!--
    <directory>
        <yp-url-timeout>15</yp-url-timeout>
        <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
    </directory>
     -->

    <!-- This is the hostname other people will use to connect to your server.
    It affects mainly the urls generated by Icecast for playlists and yp
    listings. -->
    <hostname>localhost</hostname>

    <!-- You may have multiple <listener> elements -->
    <listen-socket>
        <port>8000</port>
        <!-- <bind-address>127.0.0.1</bind-address> -->
        <!-- <shoutcast-mount>/stream</shoutcast-mount> -->
    </listen-socket>
    <!--
    <listen-socket>
        <port>8001</port>
    </listen-socket>
    -->

    <!--<master-server>127.0.0.1</master-server>-->
    <!--<master-server-port>8001</master-server-port>-->
    <!--<master-update-interval>120</master-update-interval>-->
    <!--<master-password>hackme</master-password>-->

    <!-- setting this makes all relays on-demand unless overridden, this is
         useful for master relays which do not have <relay> definitions here.
         The default is 0 -->
    <!--<relays-on-demand>1</relays-on-demand>-->

    <!--
    <relay>
        <server>127.0.0.1</server>
        <port>8001</port>
        <mount>/example.ogg</mount>
        <local-mount>/different.ogg</local-mount>
        <on-demand>0</on-demand>

        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
    </relay>
    -->

    <!-- Only define a <mount> section if you want to use advanced options,
         like alternative usernames or passwords -->
    <mount>
        <mount-name>/play</mount-name>

       

        <max-listeners>100</max-listeners>
        <dump-file>/tmp/dump-example1.ogg</dump-file>
        <burst-size>65536</burst-size>
        <fallback-mount>/example2.ogg</fallback-mount>
        <fallback-override>1</fallback-override>
        <fallback-when-full>1</fallback-when-full>
        <intro>/example_intro.ogg</intro>
        <hidden>1</hidden>
        <no-yp>1</no-yp>
    <!--     <authentication type="htpasswd">
                <option name="filename" value="myauth"/>
                <option name="allow_duplicate_users" value="0"/>
        </authentication> -->
        <on-connect>/home/icecast/bin/stream-start</on-connect>
        <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
    </mount>

 <!--   <mount>
        <mount-name>/auth_example.ogg</mount-name>
        <authentication type="url">
            <option name="mount_add"       value="http://myauthserver.net/notify_mount.php"/>
            <option name="mount_remove"    value="http://myauthserver.net/notify_mount.php"/>
            <option name="listener_add"    value="http://myauthserver.net/notify_listener.php"/>
            <option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
        </authentication>
    </mount>

    -->

    <fileserve>1</fileserve>

    <paths>
		<!-- basedir is only used if chroot is enabled -->
        <basedir>/usr/share/icecast2</basedir>

        <!-- Note that if <chroot> is turned on below, these paths must both
             be relative to the new root, not the original root -->
        <logdir>/var/log/icecast2</logdir>
        <webroot>/usr/share/icecast2/web</webroot>
        <adminroot>/usr/share/icecast2/admin</adminroot>
        <!-- <pidfile>/usr/share/icecast2/icecast.pid</pidfile> -->

        <!-- Aliases: treat requests for 'source' path as being for 'dest' path
             May be made specific to a port or bound address using the "port"
             and "bind-address" attributes.
          -->
        <!--
        <alias source="/foo" dest="/bar"/>
          -->
        <!-- Aliases: can also be used for simple redirections as well,
             this example will redirect all requests for http://server:port/ to
             the status page
          -->
        <alias source="/" dest="/status.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <!-- <playlistlog>playlist.log</playlistlog> -->
      	<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
      	<logsize>10000</logsize> <!-- Max size of a logfile -->
        <!-- If logarchive is enabled (1), then when logsize is reached
             the logfile will be moved to [error|access|playlist].log.DATESTAMP,
             otherwise it will be moved to [error|access|playlist].log.old.
             Default is non-archive mode (i.e. overwrite)
        -->
        <!-- <logarchive>1</logarchive> -->
    </logging>

    <security>
        <chroot>0</chroot>
        <!--
        <changeowner>
            <user>nobody</user>
            <group>nogroup</group>
        </changeowner>
        -->
    </security>
</icecast>
Создаем /etc/icecast2/ezstream.xml

Код:
<ezstream>
<url>http://localhost:8000/play</url>
<sourcepassword>source-password</sourcepassword>
<format>MP3</format>
<!-- Здесь у нас название и путь к плейлисту (просто чистый файлик в любом каталоге) -->
<filename>/srv/ezstream.m3u</filename>
<shuffle>0</shuffle>
<playlist_program>0</playlist_program>
<svrinfoname>Мое название станции</svrinfoname>
<svrinfourl>http://%mysite%/</svrinfourl>
<svrinfogenre>Ofther</svrinfogenre>
<svrinfodescription>Description</svrinfodescription>
<svrinfobitrate>128</svrinfobitrate>
<svrinfochannels>2</svrinfochannels>
<svrinfosamplerate>44100</svrinfosamplerate>
<svrinfopublic>1</svrinfopublic>
</ezstream>
В принципе с настройкой все Заливаем и устанавливаем движок в /var/www/

Создаем там еще и index.html

Код:
<head> 
<script>
<!--
/*Time limit script- Website Abstraction (http://www.wsabstract.com)
Over 200+ free JavaScripts here!*/
//введите здесь ограничение времени. Минуты:секунды. Секунды - не более 59, минуты - не ограничено
var limit="0:01"
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function begintimer(){
if (!document.images)
return
if (parselimit==1)
window.location="http://%mysite%/radio"
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=" осталась "+curmin+" минута "+cursec+" секунд"
else
curtime=" осталось "+cursec+" секунд"
window.status=curtime
setTimeout("begintimer()",1000)
}
}
//-->
</script>
 </head>
 
 <body onLoad="begintimer()"> 
 </body>
Создаем в phpmyadmin базу данных, заходим на %mysite% и устанавливаем панель, используя ваши данные.

После установки добавляем event.php в cron
nano /var/spool/cron/crontabs/root
Код:
# Edit this file to introduce tasks to be run by cron.
# 
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
# 
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').# 
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# 
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
# 
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# 
# For more information see the manual pages of crontab(5) and cron(8)
# 
# m h  dom mon dow   command
*/3 * * * * php /var/www/radio/event.php
Вся установка заняла около получаса.

Спасибо за внимание!

Последний раз редактировалось DragonZX; 02.01.2014 в 16:48.
Ответить с цитированием
  #2  
Непрочитано 14.12.2013, 00:46
djbarhat djbarhat вне форума
Member
 
Регистрация: 04.12.2011
О.С.: freebsd
Версия: 2.2
Сообщений: 87
По умолчанию

на debian wheezy
http://radiocms.ru/forum/showthread.php?t=530
Ответить с цитированием
Ответ


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход


Часовой пояс GMT +3, время: 18:47.