Old version below
NEW ADDED NOTES (Thanks Charles Orbello) The new version of domoticz requires a new version of cmake and the old version of domotics need a different version of open-zwave flow work with the following release (and I added libusb-devel for my zigate ): wget https://github.com/domoticz/domoticz/archive/3.8153.tar.gz wget https://github.com/OpenZWave/open-zwave/archive/V1.5.tar.gz ย |
ย
ย
We are going to compile domoticz on a new Centos 7 install!
- Install Centos7
- yum -y install epel-release && yum update
yum -y install wget libusb.x86_64 openssl-devel perl '@Development tools' vim mlocate cmake systemd-devel libgudev1-devel libssh.x86_64 python34-devel.x86_64 python34 glibc-static libstdc++-static curl curl-devel bash-completion
- Go to https://www.openssl.org/source/ , we are going to compile openssl!
mkdir -p /root/ssl && cd $_ && wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz && tar xzvf openssl-1.0.2l.tar.gz && cd openssl-1.0.2l && ./config && make && make install
mkdir /opt/boost && cd $_ && wget https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz && tar xzvf boost_1_65_1.tar.gz && cd boost_1_65_1 && ./bootstrap.sh && ./b2 stage threading=multi link=static --with-thread --with-date_time --with-system --with-atomic --with-regex && ./b2 install threading=multi link=static --with-thread --with-date_time --with-system --with-atomic --with-regex
cd /opt/ && git clone https://github.com/OpenZWave/open-zwave open-zwave-read-only && cd open-zwave-read-only/ && git pull && yum install systemd-devel && make -j 3 && make install
cd /opt && git clone https://github.com/domoticz/domoticz.git dev-domoticz && cd dev-domoticz && cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt
- CONF_SWAPFILE=1024 make -j 3
- useradd domoticz && chown -R domoticz. /opt/dev-domoticz/
echo "W1VuaXRdCiAgICAgICBEZXNjcmlwdGlvbj1kb21vdGljel9zZXJ2aWNlCltTZXJ2aWNlXQogICAgICAgVXNlcj1kb21vdGljegogICAgICAgR3JvdXA9ZG9tb3RpY3oKICAgICAgIEV4ZWNTdGFydD0vb3B0L2Rldi1kb21vdGljei9kb21vdGljeiAtd3d3IDgwODAgLXNzbHd3dyA4NDQzCiAgICAgICBXb3JraW5nRGlyZWN0b3J5PS9vcHQvZGV2LWRvbW90aWN6CiAgICAgICBDYXBhYmlsaXR5Qm91bmRpbmdTZXQ9Q0FQX05FVF9CSU5EX1NFUlZJQ0UKICAgICAgIFJlc3RhcnQ9b24tZmFpbHVyZQogICAgICAgUmVzdGFydFNlYz0xbQogICAgICAgI1N0YW5kYXJkT3V0cHV0PW51bGwKW0luc3RhbGxdCiAgICAgICBXYW50ZWRCeT1tdWx0aS11c2VyLnRhcmdldAo="| base64 -d > /etc/systemd/system/domoticz.service
- systemctl daemon-reload
- systemctl enable domoticz.service
- systemctl start domoticz.service
- configure the firewall, etc etc.
- ย
Note: This post was first trying to install domoticz from the packages, then went into compiling.
Type-as-I-do-it post:
( All installed yum in 1 command: yum update && yum install epel-release; yum install wget libusb.x86_64 openssl-devel perl ‘@Development tools’ vim mlocate cmake systemd-devel libgudev1-devel libssh.x86_64 python34-devel.x86_64 python34 glibc-static libstdc++-static)
- Install Centos 7
- yum update
- yum install wget
- mkdir /opt/domoticz
- cd /opt/domoticz
- wget https://releases.domoticz.com/releases/release/domoticz_linux_x86_64.tgz
- tar xzvf dom [tab]
- ./updaterelease
- yum install libusb.x86_64
- yum install -y openssl-devel
- Go to https://www.openssl.org/source/
- mkdir -p /root/ssl; cd $_; wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz
- tar xzvf openssl-1.0.2l.tar.gz
- cd openssl-1.0.2l
- yum install perl
- ./config
- yum install ‘@Development tools’
- make
- make install
- cd /opt/domoticz
- cd /usr/lib64/ && ln -s /usr/lib64/libssl.so.1.0.2k libssl.so.1.0.0
- cd –
- cd /usr/lib64/ && ln -s libcrypto.so.1.0.2k libcrypto.so.1.0.0 && cd –
- mkdir /opt/boost && cd $_ && wget https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz && tar xzvf boost_1_65_1.tar.gz && cd boost_1_65_1 && ./bootstrap.sh && ./b2 stage threading=multi link=static –with-thread –with-date_time –with-system –with-atomic –with-regex && ./b2 install threading=multi link=static –with-thread –with-date_time –with-system –with-atomic –with-regex
- cd /opt/ && git clone https://github.com/OpenZWave/open-zwave open-zwave-read-only && cd open-zwave-read-only/ && git pull && yum install systemd-devel && make -j 3
- sudo yum install epel-release
- yum install curl libcurl libcurl-devel python34-devel.x86_64 python34 glibc-static libstdc++-static
- cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt
- CONF_SWAPFILE=1024
- make -j 3
- wait
- test it, do: ./domoticz
- useradd domoticz && chown -R domoticz. /opt/dev-domoticz/ && usermod -a -G dialout domoticz
- vi /etc/systemd/system/domoticz.service
[Unit]
Description=domoticz_service
[Service]
User=domoticz
Group=domoticz
ExecStart=/opt/dev-domoticz/domoticz -www 8080 -sslwww 8443
WorkingDirectory=/opt/dev-domoticz
# Give the right to open priviliged ports. This allows you to run on a port <1024 without root permissions (user/group setting above)
#
# The next line was previously working, so try this on older systems.
# ExecStartPre=setcap 'cap_net_bind_service=+ep' /home/domoticz/domoticz/domoticz
#
# The below works on ubuntu 16 LTS.
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
Restart=on-failure
RestartSec=1m
#StandardOutput=null
[Install]
WantedBy=multi-user.target
- systemctl start domoticz.service
- configure the firewall, etc etc.