-
-
Save cholthi/e8b6bd2e438e44d6340c794b9cb46565 to your computer and use it in GitHub Desktop.
Kannel 1.4.5 with OpenSMPP and SQLBox Installation Script for Ubuntu 18.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
apt-get update | |
apt-get install mysql-server | |
wget --no-check-certificate https://ftp.gnu.org/gnu/bison/bison-1.28.tar.gz | |
tar -xvf bison-1.28.tar.gz | |
rm bison-1.28.tar.gz | |
cd bison-1.28 | |
./configure --prefix=/usr/local/bison --with-libiconv-prefix=/usr/local/libiconv/ | |
make | |
make install | |
ln -s /usr/local/bison/bin/bison /usr/bin/bison | |
ln -s /usr/local/bison/bin/yacc /usr/bin/yacc | |
groupadd kannel | |
useradd -g kannel kannel | |
mkdir /usr/local/src/kannel | |
cd /usr/local/src/kannel | |
wget --no-check-certificate https://www.kannel.org/download/1.4.5/gateway-1.4.5.zip | |
unzip gateway-1.4.5.zip | |
rm gateway-1.4.5.zip | |
mv gateway-1.4.5 gateway | |
cd gateway/ | |
sudo apt-get install cmake build-essential git libmicrohttpd-dev \ | |
libssl-dev libhwloc-dev | |
cd xmr-stak | |
mkdir build | |
cd build | |
# I do not have CUDA and OpenCL-capable hardware, so I disabled them | |
cmake .. -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF | |
make | |
sudo make install | |
apt install ruby-bundler | |
./configure --prefix=/usr/local/kannel --with-mysql --with-mysql-dir=/usr/lib/mysql/ --enable-debug --enable-assertions --with-defaults=speed --disable-localtime --enable-start-stop-daemon --enable-pam | |
touch .depend | |
make depend | |
make | |
chmod 0755 gw-config | |
mkdir /usr/local/kannel | |
make bindir=/usr/local/kannel install | |
cd | |
mkdir /usr/local/src/kannel/sqlbox | |
cd /usr/local/src/kannel/sqlbox | |
cp -r /usr/local/src/kannel/gateway/addons/sqlbox/* ./ | |
./bootstrap | |
./configure --prefix=/usr/local/kannel --with-kannel-dir=/usr/local/kannel | |
make | |
make bindir=/usr/local/kannel/sqlbox install | |
cd | |
mkdir /usr/local/src/kannel/smppbox | |
cd /usr/local/src/kannel/smppbox | |
cp -r /usr/local/src/kannel/gateway/addons/opensmppbox/* ./ | |
./configure --prefix=/usr/local/kannel --with-kannel-dir=/usr/local/src/kannel/gateway | |
make | |
make bindir=/usr/local/kannel/smppbox install | |
cd | |
mkdir /etc/kannel | |
mkdir /var/log/kannel | |
cd /var/log/kannel | |
mkdir gateway smsbox wapbox smsc sqlbox smppbox | |
chmod 755 /var/log/kannel | |
cp /usr/local/src/kannel/gateway/gw/smskannel.conf /etc/kannel/kannel.conf | |
cp /usr/local/src/kannel/gateway/debian/kannel.default /etc/default/kannel | |
cp /usr/local/src/kannel/gateway/debian/kannel.init /etc/init.d/kannel | |
cp /usr/local/src/kannel/sqlbox/example/sqlbox.conf.example /etc/kannel/sqlbox.conf | |
cp /usr/local/src/kannel/smppbox/example/opensmppbox.conf.example /etc/kannel/opensmppbox.conf | |
cp /usr/local/src/kannel/smppbox/example/smpplogins.txt.example /etc/kannel/smpplogins.txt | |
chmod 777 /etc/init.d/kannel | |
update-rc.d kannel defaults | |
du -sh /var/cache/apt/archives | |
apt-get -y clean | |
echo "create database kannel" >> config.sql | |
echo "use kannel;" >> config.sql | |
echo "CREATE USER 'kannel'@'localhost' IDENTIFIED BY 'switch@123';" >> config.sql | |
echo "GRANT ALL PRIVILEGES ON * . * TO 'kannel'@'localhost';" >> config.sql | |
echo "GRANT ALL PRIVILEGES ON kannel.* TO 'kannel'@'localhost';" >> config.sql | |
echo "FLUSH PRIVILEGES;" >> config.sql | |
#mysql | |
#quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment