-
Notifications
You must be signed in to change notification settings - Fork 278
Medusa installation CentOS
The following instructions are for installing Medusa on CentOS. They should also be applicable to RHEL and Fedora 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 be set as medusa:medusa and you will have to modify it if you want it 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 dependencies
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 medusa and user medusa
sudo groupadd medusa sudo useradd -g medusa medusa
-
Clone Medusa git repo
sudo git clone https://github.com/pymedusa/Medusa.git /usr/share/medusa
-
Set correct ownership
chown -R medusa:medusa /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=medusa 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 (optional)
sudo chkconfig medusa on
-
Start medusa service
sudo service medusa start
All done, verify that Medusa is accessible at: http://your_ip:8081