How to Install AzuraCast on Debian Latest
AzuraCast is a free and open-source web radio station management software designed to simplify the process of creating and managing an internet radio station. In this tutorial, we will guide you through the process of installing and setting up AzuraCast on Debian Latest.
Prerequisites
- Debian server with root access
- At least 1 GB RAM (2 GB recommended)
- MySQL or MariaDB installed on your server
- Port 80 and 443 opened and listening
Step 1: Updating your system
Before we begin, it's essential to update your Debian server to the latest version. You can do this by running the following command:
sudo apt update
sudo apt upgrade
Step 2: Install Required Packages
Next, you need to install some required packages before installing AzuraCast. These packages include Apache, PHP 7.3, and other required PHP modules. Run the following command to install the packages:
sudo apt install apache2 libapache2-mod-php7.3 php7.3-cli php7.3-curl php7.3-gd php7.3-intl php7.3-mbstring php7.3-mysql php7.3-soap php7.3-xml php7.3-zip git unzip curl
Once the packages are installed, restart the Apache service with the following command:
sudo systemctl restart apache2
Step 3: Installing AzuraCast
Now that we have all the required packages installed, we can proceed with installing AzuraCast. Follow the below steps:
- Change to the root user account by running the following command:
sudo su
- Navigate to the
/vardirectory and create a new directory namedwwwby running the following command:
cd /var
sudo mkdir www
- Change the ownership of the
wwwdirectory to the Apache user:
sudo chown -R www-data:www-data www
- Navigate to the
wwwdirectory and clone the AzuraCast repository:
cd www
sudo git clone https://github.com/AzuraCast/AzuraCast.git .
- Change the ownership of the AzuraCast directory to the Apache user again:
sudo chown -R www-data:www-data /var/www
- Install composer by running the following commands:
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
- Install the PHP dependencies by running the following command:
sudo composer install --no-dev --prefer-dist --no-interaction
Step 4: Configuring the Database
At this point, you need to create and configure the database for AzuraCast. Follow the below steps to do so:
- Log in to the MySQL/MariaDB server by running the following command:
mysql -u root -p
- Create a new database for AzuraCast:
CREATE DATABASE azuracast;
- Create a new database user and grant privileges:
CREATE USER 'azuracast'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON azuracast.* TO 'azuracast'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
- Copy the
.env.examplefile to.env:
sudo cp .env.example .env
- Update the
AZURACAST_DB_USER,AZURACAST_DB_PASSWORD, andAZURACAST_DB_DATABASEvariables in the.envfile with the details from the previous step:
AZURACAST_DB_USER=azuracast
AZURACAST_DB_PASSWORD=password
AZURACAST_DB_DATABASE=azuracast
- Back up your
installer.phpfile and then remove it:
sudo cp ../../installer.php .
sudo rm ../../installer.php
Step 5: Completing the Installation
Now you can complete the installation of AzuraCast by running the following commands:
sudo php docker.php setup
sudo php docker.php update-self
sudo php docker.php update
sudo php azuracast_install.php
sudo chown -R www-data:www-data /var/www
Accessing the AzuraCast Web Interface
To access the AzuraCast web interface, open your web browser and go to http://your_server_ip/. You should be redirected to the installation page, where you can set up your station.
Conclusion
This tutorial has guided you through the process of installing AzuraCast on Debian Latest. You can now create and manage your internet radio station using AzuraCast.