Documentation on installing and setting up Couchpotato on a SmartOS base64 14.3.0 zone. These instructions assume a fresh zone creation of image 62f148f8-6e84-11e4-82c5-efca60348b9f
.
Make sure to copy the following line by line and confirm that each runs successfully. All of the following are run from the root shell.
pkgin -fy up
pkgin -y fug
pkgin -y in py27-sqlite3 py27-lxml py27-OpenSSL git
groupadd -g 500 couch
useradd -m -c "Couchpotato User" -u 500 -g couch couch
passwd -N couch
sed -i.bak 's/^TZ=.*$/TZ=America\/Los_Angeles/' /etc/default/init
su - couch
cd
export TZ=America/Los_Angeles
echo "export TZ=America/Los_Angeles" >> .profile
git clone https://github.com/RuudBurger/CouchPotatoServer.git couchpotato
cd couchpotato
python CouchPotato.py --console_log
At this point Couchpotato should be running in the foreground. Following are instructions for getting the SMF service up and running. Test the server by seeing if the web interface is accessible using the information below. Then press CTRL+c
to exit the process and CTRL+d
to exit the su sub-shell.
Perform the following from the root account to turn couchpotato into a managed service.
curl -sk https://gist.githubusercontent.com/baetheus/d7dc8b01a89ecdd78ef9/raw/couchpotato.xml > $HOME/couchpotato.xml
svccfg import $HOME/couchpotato.xml
svcadm enable couchpotato
The service should now be available at http://<hostname/ip>:5050
Since I run each of my services on their own zone with a static ip and dns configuration, I like to change the port binding to 80 on my internal home network. Thus, the net_privaddr privilege has been added to the service to allow binding to privileged ports. Additionally, if you're like me and are running your media server on smartos or another illumos derivative, you might want to look into using lofs to map your media filesystem to multiple zones. This is the reason for manually picking uid and gid for the couch user and group. Feel free to contact me if you have questions on this process. Or hit up #smartos on the Freenode irc network.
- Added py27-lxml and py27-OpenSSL to package install step.
- Changed
sed -i
tosed -i.bak
to cope with freebsd sed.
- Update linke to point to baetheus github account instead of slashtact.
- Updated various references and cleaned up some commands.
- Added local timezone references.
- Initial Gist
- Added SMF file