diff options
author | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2012-04-11 01:58:51 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2012-04-11 01:58:51 -0700 |
commit | 5415cc5d59a03bb13faf3247b8c1bfd73651ae5e (patch) | |
tree | 1e9e2542180be06c2a35048910e436372c6666e3 /docs/install_notes.txt | |
parent | e03de4fb94079e52e386c7801d5a8ae220ba4971 (diff) | |
download | piny-code-5415cc5d59a03bb13faf3247b8c1bfd73651ae5e.tar.gz piny-code-5415cc5d59a03bb13faf3247b8c1bfd73651ae5e.zip |
doc: initial install notes
Diffstat (limited to 'docs/install_notes.txt')
-rw-r--r-- | docs/install_notes.txt | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/docs/install_notes.txt b/docs/install_notes.txt new file mode 100644 index 0000000..0b531de --- /dev/null +++ b/docs/install_notes.txt @@ -0,0 +1,101 @@ +List of runtime dependencies: apache2 libconfig-simple-perl libcrypt-blowfish-perl libcrypt-cbc-perl libdigest-hmac-perl libdigest-sha1-perl libemail-valid-loose-perl libgetopt-tabular-perl libjson-perl libmath-gmp-perl libmime-base32-perl libmoose-perl libmoosex-singleton-perl libmoosex-strictconstructor-perl moreutils ssl-cert libapache2-mod-auth-pam libapache2-mod-auth-sys-group git libsearch-xapian-perl libcgi-session-perl libcgi-formbuilder-perl +List of source dependencies: dpkg-dev debhelper devscripts fakeroot texlive-extra-utils libxml-simple-perl wdg-html-validator perlmagick po4a libfile-chdir-perl libtext-markdown-discount-perl cdbs zlib1g-dev libssl-dev libcurl4-openssl-dev + +# wheezy is best-tested at this point + +# ikiwiki +cd ~ +git clone git://git.ikiwiki.info +cd git.ikiwiki.info +sed '/<\/pre>/,/<pre>/ d' < doc/todo/headless_git_branches.mdwn | patch -p1 +dpkg-buildpackage -tc -uc -us +debi + +# if dpkg-buildpackage fails, you can also +# apt-get install ikiwiki +# cd /usr/share/perl5 +# sed '/<\/pre>/,/<pre>/ d' < ~/git.ikiwiki.info/doc/todo/headless_git_branches.mdwn | patch -p1 + +echo ikiwiki hold | dpkg --set-selections + +# piny +cd ~ +git clone git://piny.be/piny-code +cd piny-code +./builddebs +dpkg -i libpiny-perl*.deb pinyadmin*.deb pinyconfigs*.deb pinyweb*.deb + +a2enmod ssl +a2enmod auth_pam +a2enmod auth_sys_group + +url="some.url" + +ikiwikiurl="http://$url/" +ikiwikidestdir="/srv/http/$url/" +ikiwikisrcdir="/srv/ikiwiki" +ikiwikisecurepath="/srv/https/secure.$url/" +ikiwikisecureurl="https://secure.$url/" +adminemail="some.jerk@$url" + +( +echo "[piny]" +echo -e "\tikiwikiurl = $ikiwikiurl" +echo -e "\tikiwikidestdir = $ikiwikidestdir" +echo -e "\tikiwikisrcdir = $ikiwikisrcdir" +echo -e "\tikiwikisecurepath = $ikiwikisecurepath" +echo -e "\tikiwikisecureurl = $ikiwikisecureurl" +echo -e "\tadminemail = $adminemail" +) > /etc/piny-override.conf + +mkdir -p "$ikiwikidestdir" "$ikiwikisrcdir" "$ikiwikisecurepath"/write "$ikiwikisecurepath"/read /etc/ikiwiki/piny /srv/rbin + +# If you want to offer optional SSL: +# ln -s /srv/http/"$url" /srv/https/"$url" + +cat /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key > /etc/ssl/private/secure."$url".pem + +perl -pe s/piny.be/"$url"/g\;s/SSLCertificateChainFile.+//g < /etc/apache2/sites-available/piny > /etc/apache2/sites-available/piny-"$url" + +perl -pe 's/^( Listen 443)$/ NameVirtualHost *:443\n\1/' < /etc/apache2/ports.conf | sponge /etc/apache2/ports.conf + +a2dissite piny +a2ensite piny-"$url" + +# cgit +# available prebuilt for amd64 and i386: http://debian.stbuehler.de/debian/pool/main/binary/ +# normally sort of a pain to build due to the git developers failing to maintain a stable interface +perl -pe s/piny.be/"$url"/g < /etc/cgitrc | sponge /etc/cgitrc + +# pinyshell +perl -pe 's|USERGROUPS=yes|USERGROUPS=no|' < /etc/adduser.conf | sponge /etc/adduser.conf +for i in $(awk -F: '$4 >= 1000 && $4 < 65534 {print $1}' < /etc/passwd); do adduser $i users; done +# or find some other way to fix the /etc/sudoers.d/piny situation; it would be nice if sudo supported gid ranges + +ln -sv /usr/bin/addaccess \ +/usr/bin/appendkeys \ +/usr/bin/lsaccess \ +/usr/bin/lsrepo \ +/usr/bin/pinyconfig \ +/usr/bin/pinyhelp \ +/usr/bin/readkeys \ +/usr/bin/rebuildrepo \ +/usr/bin/rmaccess \ +/usr/bin/rmrepo \ +/usr/bin/writekeys \ +/usr/bin/git \ +/usr/bin/git-receive-pack \ +/usr/bin/git-upload-archive \ +/usr/bin/git-upload-pack \ +/usr/bin/git-shell \ +/usr/bin/passwd \ +/srv/rbin + +ln -sv /usr/bin/newrepo /srv/rbin # enables creation of new repositories from piny shell accounts +ln -sv /usr/bin/newuser /srv/rbin # enables creation of new piny shell accounts from piny shell accounts + +# git-daemon +apt-get install git-daemon-run +perl -pe 's|GIT_DAEMON_ENABLE=false|GIT_DAEMON_ENABLE=true|;s|GIT_DAEMON_DIRECTORY=/var/cache/git|GIT_DAEMON_DIRECTORY=/srv/git|;' < /etc/default/git-daemon | sponge /etc/default/git-daemon +echo 'GIT_DAEMON_BASE_PATH=/srv/git' >> /etc/default/git-daemon +/etc/init.d/git-daemon restart |