-
Notifications
You must be signed in to change notification settings - Fork 93
Install on Centos 7
Last time tested on 2021-10-21 using CentOS-7-x86_64-Minimal-2009.iso with yum -y update && reboot
yum -y install epel-release
yum -y install gcc-c++ libevent libevent-devel openssl openssl-devel curl libcurl-devel git perl
yum -y install python-devel python3-devel hiredis-devel curl-devel gsm-devel speex-devel opus-devel
yum -y install spandsp spandsp-devel
yum -y install http://repo.mysql.com/mysql-community-release-el7.rpm
yum --enablerepo=mysql-connectors-community install -y mysql-connector-c++-devel
ln -s /usr/include/mysql-cppconn-8/jdbc /usr/include/mysql++
git clone https://github.com/sems-server/sems.git /usr/src/sems
sed -i "s|/usr/include/mysql\+|/usr/include/mysql++|g" /usr/src/sems/apps/early_announce/Makefile
sed -i "s|#USE_SPANDSP\+|USE_SPANDSP|g" /usr/src/sems/Makefile.defs
ln -s /usr/lib64/libpython3.so /usr/lib64/libpython3.6.so
sed -i "s|#exclude_app_modules = py_sems ivr mailbox pin_collect conf_auth mp3 examples\+|exclude_app_modules = ivr pin_collect conf_auth examples|g" /usr/src/sems/Makefile.defs
cd /usr/src/sems
make
make install
ln -s /usr/local/etc/sems /etc/sems
sed -i "s|# syslog_facility=LOCAL0\+|syslog_facility=LOCAL0|g" /etc/sems/sems.conf
echo "local0.* -/var/log/sems/sems.log" >> /etc/rsyslog.conf
mkdir -p /var/log/sems
touch /var/log/sems/sems.log
perl -pi.bak -e 's#(\s+)\/var\/log\/messages#;local0.none/var/log/messages#' /etc/rsyslog.conf
systemctl restart rsyslog
useradd sems
groupadd sems
usermod -a -G sems sems
mkdir -p /var/run/sems
cp -fr /usr/src/sems/pkg/rpm/sems.systemd.service /etc/systemd/system/sems.service
sed -i "s|/usr/sbin/sems\+|/usr/local/sbin/sems|g" /etc/systemd/system/sems.service
systemctl enable sems.service
systemctl start sems
systemctl status sems