-
Notifications
You must be signed in to change notification settings - Fork 278
Medusa installation CentOS
The following instructions are for installing Medusa on CentOS.
The installation should also be applicable to RHEL 6 and Fedora (12, 13, or 14) with minimal changes.
The installation assumes that you're not using the root user to install/run medusa - the entries for user:group throughout the document will have to be modified to match your user configuration.
-
Install IUS Community Project repository The repository is needed for recent Python versions
For CentOS 6:
sudo yum install https://centos6.iuscommunity.org/ius-release.rpm
For Centos 7:
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm
-
Install prerequisites
sudo yum install python36u wget git
Install unrar:
64bit
wget https://www.rarlab.com/rar/rarlinux-x64-5.7.0.tar.gz tar -zxvf rarlinux-x64-5.7.0.tar.gz sudo cp -v rar/rar rar/unrar /usr/local/bin/
32bit
wget https://www.rarlab.com/rar/rarlinux-5.7.0.tar.gz tar -zxvf rarlinux-5.7.0.tar.gz sudo cp -v rar/rar rar/unrar /usr/local/bin/
-
Add new group and user
sudo groupadd media sudo useradd -g media medusa
-
Clone medusa git repo
sudo git clone https://github.com/pymedusa/Medusa.git /usr/share/medusa
-
Set correct ownership
chown -R medusa:media /usr/share/medusa
For systemd (CentOS 7)
-
Copy systemd service
sudo cp -v /usr/share/medusa/runscripts/init.systemd /etc/systemd/system/medusa.service
Make sure your new service has correct permissions
sudo chown root:root /etc/systemd/system/medusa.service sudo chmod 644 /etc/systemd/system/medusa.service
-
Enable, start, and then check the status of your new service
sudo systemctl enable medusa sudo systemctl start medusa sudo systemctl status medusa
-
Add Medusa to startup (optional)
sudo systemctl enable medusa.service
For Init Systems
-
Copy init file to system init
sudo cp /usr/share/medusa/runscripts/init.fedora /etc/init.d/medusa
-
Make init file executable
sudo chmod +x /etc/init.d/medusa
-
Modify init file
sudo sed 's|/etc/sysconfig/sickbeard|/etc/sysconfig/medusa|' -i /etc/init.d/medusa
-
Create configuration file /etc/sysconfig/medusa with the following content
# Medusa service configuration #run Medusa as SR_USER=media SR_HOME=/usr/share/medusa SR_DATA=/usr/share/medusa SR_PIDFILE=/usr/share/medusa/medusa.pid #gui address, eg: \${protocol}://\${host}:\${port}/home/ protocol=http host='<<< hostname or IP >>>' #example host=mymachine port='<<<Desired Port>>>' #example port=8081 #leave blank if no username/password is required to access the gui username= password= #use nice, ionice, taskset to start Medusa nicecmd= # example: nicecmd="nice -n 19 ionice -c3"
-
Add the medusa service to system services
sudo chkconfig --add medusa
-
Configure medusa service to start on system startup
sudo chkconfig medusa on
-
Start medusa service
sudo service medusa start
All done, verify that Medusa is accessible at gui address, eg: http://your_ip:8081