feat: added install.sh

main
Muhammad Daffa 2022-11-15 17:10:50 +07:00 committed by GitHub
parent 34a010a294
commit 5dad6716eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

16
install.sh Normal file
View File

@ -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