#cd /usr/ports/audio/icecast2 #make install clean
#mkdir /var/icecast #pw group add radio # adduser Username:radio Full name: Radio user Uid (Leave empty for default): Login group [radio]: Login group is radio. Invite jru into other groups? []: Login class [default]: Shell (sh csh tcsh zsh nologin) [sh]: nologin Home directory [/home/radio]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: Use an empty password? (yes/no) [no]: Use a random password? (yes/no) [no]: Enter password: Enter password again: Lock out the account after creation? [no]: Username : radio Password : **** Full Name : Radio user Uid : 1001 Class : Groups : radio Home : /home/radio Locked : no OK? (yes/no): yes adduser: INFO: Successfully added (radio) to the user database. Add another user? (yes/no): no Goodbye!
cp /usr/local/share/icecast /var/icecast
mkdir /var/icecast/log
cd /var/icecast/log touch access.log touch error.log
chown -R radio:radio /var/icecast
cd /usr/local/etc cp icecast.xml.sample icecast.xml
<authentication> <!-- Sources log in with username 'source' --> <source-password>123</source-password> <!-- Relays log in username 'relay' --> <relay-password>123</relay-password> <!-- Admin logs in with the username given below --> <admin-user>admin</admin-user> <admin-password>12345678</admin-password> </authentication>
<listen-socket> <port>8000</port> <bind-address>192.168.1.7</bind-address>. <shoutcast-mount>/ices</shoutcast-mount>. </listen-socket>
<relay> <server>91.201.37.42</server> <port>8000</port> <mount>/kiss</mount> <local-mount>/kiss</local-mount> <on-demand>1</on-demand> <relay-shoutcast-metadata>0</relay-shoutcast-metadata> </relay> <relay> <server>91.201.37.42</server> <port>8000</port> <mount>/kissACC</mount> <local-mount>/kissACC</local-mount> <on-demand>1</on-demand> <relay-shoutcast-metadata>0</relay-shoutcast-metadata> </relay> .... <relay>........ <server>195.95.206.12</server> <port>8000</port> <mount>/HitFM</mount> <local-mount>/hitfm</local-mount> <on-demand>1</on-demand> <relay-shoutcast-metadata>0</relay-shoutcast-metadata> </relay> <relay> <server>77.120.104.251</server> <port>8000</port> <mount>/</mount> <local-mount>/luxfm</local-mount> <on-demand>1</on-demand> <relay-shoutcast-metadata>0</relay-shoutcast-metadata> </relay> <relay> <server>212.26.129.222</server> <port>8001</port> <mount>/</mount> <local-mount>/nashe</local-mount> <on-demand>1</on-demand> <relay-shoutcast-metadata>0</relay-shoutcast-metadata> </relay>
<basedir>/var/icecast</basedir> <logdir>/log</logdir> <webroot>/web</webroot> <adminroot>/admin</adminroot> <pidfile>/var/run/icecast.pid</pidfile>
<security> <chroot>1</chroot> <changeowner> <user>radio</user> <group>radio</group> </changeowner> </security>
#/usr/local/bin/icecast -c /usr/local/etc/icecast.xml
#cd /usr/ports/audio/ices #make install clean
mkdir /tmp/radio
find /tmp/radio -name *.mp3 > /tmp/radio/playlist.txt
/tmp/radio/Far East Movement ft. The Cataracs & Dev - Like A G6.mp3 /tmp/radio/The_Prodigy_-_Voodoo_People_(Pendulum_Remix).mp3 /tmp/radio/1.mp3
#chmod -R 777 /tmp/radio
and go to break the file ices.conf cd /usr/local/etc/ cp ices.conf.dist ices.conf
<?xml version="1.0"?> <ices:Configuration xmlns:ices="http://www.icecast.org/projects/ices"> <Playlist> <!-- --> <File>/tmp/radio/playlist.txt</File> <!-- 1. . --> <Randomize>0</Randomize> <!-- , --> <Type>builtin</Type> <!-- Perl pyton, --> <Module>ices0</Module> <!-- . .. 0 <Crossfade>5</Crossfade> --> </Playlist> <Execution> <!-- 1 --> <Background>1</Background> <!-- 1 --> <Verbose>1</Verbose> <!-- pid --> <BaseDirectory>/tmp</BaseDirectory> </Execution> <Stream> <Server> <!-- ip icecast --> <Hostname>192.168.1.7</Hostname> <!-- --> <Port>8000</Port> <!-- icecast server --> <Password>123</Password> <!-- Shoutcast "icy", icecast 1.x "xaudiocast", icecast 2.x "http". --> <Protocol>http</Protocol> </Server> <!-- --> <Mountpoint>/ices</Mountpoint> <!-- The name of the dumpfile on the server for your stream. DO NOT set this unless you know what you're doing. <Dumpfile>ices.dump</Dumpfile> --> <!-- , --> <Name>mp3 stream</Name> <!-- , --> <Genre>it</Genre> <!-- --> <Description>Local streaming</Description> <!-- --> <URL>http://gate.mydomain.com/</URL> <!--0 1 --> <Public>0</Public> <!-- , --> <Bitrate>128</Bitrate> <!-- 1 ices liblame --> <Reencode>0</Reencode> <!-- Number of channels to reencode to, 1 for mono or 2 for stereo --> <!-- Sampe rate to reencode to in Hz. Leave out for LAME's best choice <Samplerate>44100</Samplerate> --> <Channels>2</Channels> </Stream> </ices:Configuration>
icecast_enable="YES" icecast_flags="-c /usr/local/etc/icecast.xml" ices0_enable="YES" ices0_flags="/usr/local/etc/ices.conf"
cd /usr/local/etc/rc.d #./icecast2 start #./ices0 start
Source: https://habr.com/ru/post/267351/
All Articles