使用Koel搭建在线电台程序
使用Koel搭建在线电台程序 前言 Koel是著名的个人音乐在线播放与电台程序。在英文中,Koel是一种鸟类,它经常发出好听的叫声,该程序也因此得名。Koel完全免费开源,在Github上已经有一万多个Stars, 一千多次Forks. Koel的后端使用Laravel PHP框架,前端使用Vue JS框架 所以我们需要安装Laravel NodeJS 和 Yarn (基础的Nginx php和数据库的安装我就不再赘述了) 安装NodeJS和Yarn Koel目前仅支持10.x版本的NodeJS #安装NodeJS #Debian 和 Ubuntu curl -sL https://deb.nodesource.com/setup_10.x | bash - apt-get install nodejs # CentOS curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash - yum install nodejs -y #安装Yarn npm install -g yarn 安装Composer与Laravel 安装Composer 注意:PHP版本要大于7.3 wget https://getcomposer.org/installer php installer mv composer.phar /usr/local/bin/composer composer global require laravel/installer 如果你是Cyberpanel用户 将php改为/usr/local/lsws/lsphp74/bin/php /usr/local/lsws/lsphp74/bin/php installer 安装Koel 安装 进入到网站文件夹的根目录 下载主程序 进入到网站根目录,使用Git克隆网站程序 git clone --recurse-submodules https://github.com/phanan/koel.git . Cyberpanel用户: wget https://getcomposer.org/download/2.0.8/composer.phar /usr/local/lsws/lsphp74/bin/php composer.phar install 配置 编辑.env文件 DB_DATABASE=koel DB_USERNAME=koel DB_PASSWORD=SoSecureMuchWow 填入数据库信息 ADMIN_NAME="laoxong" [email protected] ADMIN_PASSWORD=Password APP_URL=https://www.moec.top #改为网站域名 保持退出后使用 php artisan koel:init #/usr/local/lsws/lsphp74/bin/php artisan koel:init #Cyberpanel 初始化 经过漫长的等待,FInally Done in 218.67s. 🎆 Success! Koel can now be run from localhost with `php artisan serve`. You can also scan for media with `php artisan koel:sync`. Again, visit 📙 https://docs.koel.dev for the official documentation. Feeling generous and want to support Koel's development? Check out https://github.com/users/phanan/sponsorship 🤗 Thanks for using […]