From 5dad6716eb7044d0439cdf21377219bda1c9b5cc Mon Sep 17 00:00:00 2001 From: Muhammad Daffa <36522826+daffainfo@users.noreply.github.com> Date: Tue, 15 Nov 2022 17:10:50 +0700 Subject: [PATCH] feat: added install.sh --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..9d691e4 --- /dev/null +++ b/install.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +apt-get -y update +apt-get -y upgrade +wget https://packages.openxpki.org/v3/debian/Release.key -O - | apt-key add - +gpg --print-md sha256 Release.key +echo "deb http://packages.openxpki.org/v3/debian/ buster release" > /etc/apt/sources.list.d/openxpki.list +apt-get -y update +apt-get -y install default-mysql-server libdbd-mysql-perl +apt-get -y install apache2 libapache2-mod-fcgid +apt-get -y install libopenxpki-perl openxpki-cgi-session-driver openxpki-i18n +mysql -e "CREATE DATABASE openxpki CHARSET utf8;CREATE USER 'openxpki'@'localhost' IDENTIFIED BY 'openxpki';GRANT ALL ON openxpki.* TO 'openxpki'@'localhost';flush privileges;" +zcat /usr/share/doc/libopenxpki-perl/examples/schema-mariadb.sql.gz | mysql -u root --password --database openxpki +mkdir -p /etc/openxpki/local/keys +bash /usr/share/doc/libopenxpki-perl/examples/sampleconfig.sh +openxpkictl start