Hendrik Langer
8 years ago
7 changed files with 294 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||||
|
\clearpage |
||||
|
%%%%%%%%%%%%%%%% |
||||
|
%% Back cover |
||||
|
%%%%%%%%%%%%%%%% |
||||
|
|
||||
|
\enlargethispage{3\baselineskip} |
||||
|
\thispagestyle{empty} |
||||
|
|
||||
|
\pagecolor{MediumBlue} |
||||
|
|
||||
|
\begin{center} |
||||
|
\Large\bfseries |
||||
|
% |
||||
|
\end{center} |
||||
|
|
||||
|
%\colorbox{white}{\EANisbn[SC4]} |
@ -0,0 +1,29 @@ |
|||||
|
%%%%%%%%%%%%%%%% |
||||
|
%% Cover page |
||||
|
%%%%%%%%%%%%%%%% |
||||
|
\thispagestyle{empty} |
||||
|
\pagecolor{MediumBlue} |
||||
|
|
||||
|
%\titlehead{Kopf der Titelei} |
||||
|
\subject{\booksubject} |
||||
|
\title{\booktitle} |
||||
|
\subtitle{\booksubtitle} |
||||
|
\author{\bookauthor} |
||||
|
\date{\today} |
||||
|
%\publishers{Betreut und herausgegeben von Prof. Dr. rer. LaTeX} |
||||
|
%\uppertitleback{Obiger Titelrückentitel} |
||||
|
%\lowertitleback{Für dieses Beispiel wird keine Haftung übernommen.} |
||||
|
%\dedication{Dieses Beispiel widme ich\\allen LaTeX Usern} |
||||
|
\maketitle |
||||
|
|
||||
|
%\tikz[remember picture,overlay]% |
||||
|
%\node[fill=MediumBlue,text=white,font=\LARGE\bfseries,text=Cornsilk,% |
||||
|
%minimum width=\paperwidth,minimum height=5em,anchor=north]% |
||||
|
%at (current page.north){Exercises in \LaTeX}; |
||||
|
|
||||
|
%\tikz[remember picture,overlay]% |
||||
|
%\node[fill=MediumBlue,font=\LARGE\bfseries,text=Cornsilk,% |
||||
|
%minimum width=\paperwidth,minimum height=5em,anchor=south]% |
||||
|
% at (current page.south) {Malaysian \LaTeX\ User Group}; |
||||
|
|
||||
|
\pagecolor{white} |
@ -0,0 +1,62 @@ |
|||||
|
\usepackage{xifthen}% provides \isempty test |
||||
|
\usepackage{xstring} |
||||
|
|
||||
|
\newcommand\chapterillustration{} |
||||
|
|
||||
|
\makeatletter |
||||
|
\setkomafont{chapter}{\let\@hangfrom\chapterhang\let\raggedsection\raggedleft\huge} |
||||
|
\makeatother |
||||
|
\newbox\chapternumberbox |
||||
|
\newcommand{\chapterhang}[2]{% |
||||
|
\StrLen{\chapterillustration}[\imgnamelen]\ifthenelse{\imgnamelen > 1}{% |
||||
|
\tikz[remember picture,overlay] \node[opacity=1.0,inner sep=0pt] at (current page.north){\includegraphics[width=\paperwidth,height=.59\paperheight]{\chapterillustration}};% |
||||
|
}{}% |
||||
|
\savebox\chapternumberbox{\fontsize{100}{100}\normalfont\sffamily\bfseries |
||||
|
\thechapter}% |
||||
|
\parbox[t]{\dimexpr\linewidth-\wd\chapternumberbox-1em}{% |
||||
|
\raggedleft |
||||
|
\makebox[1em][l]{\normalfont\normalsize\slshape\chapapp}\\ |
||||
|
#2% |
||||
|
}\quad |
||||
|
\raisebox{-1.75\baselineskip}{\usebox\chapternumberbox}\par |
||||
|
} |
||||
|
|
||||
|
\iffalse |
||||
|
%https://komascript.de/comment/5067#comment-5067 |
||||
|
\setkomafont{chapter}{\huge} |
||||
|
\makeatletter |
||||
|
% Hack: Eigenen, rudimentären Kapitelstil definieren. |
||||
|
\newcommand*{\scr@dsc@def@style@xchapter@command}[1]{% |
||||
|
\scr@dsc@def@style@chapter@command{#1}% |
||||
|
\expandafter\def\csname @@make#1head\endcsname##1{% |
||||
|
\let\orig@raggedchapter\raggedchapter |
||||
|
\let\raggedchapter\raggedleft |
||||
|
\let\orig@hangfrom\@hangfrom |
||||
|
\let\@hangfrom\chapterhang |
||||
|
\scr@@makechapterhead{#1}{##1}% |
||||
|
\let\@hangfrom\orig@saved@hangfrom |
||||
|
\let\raggedchapter\orig@raggedchapter |
||||
|
}% |
||||
|
} |
||||
|
\makeatother |
||||
|
\DeclareSectionCommand[style=xchapter]{chapter} |
||||
|
\newbox\chapternumberbox |
||||
|
\newcommand{\chapterhang}[2]{% |
||||
|
\tikz[remember picture,overlay] \node[opacity=1.0,inner sep=0pt] at (current page.north){\includegraphics[width=\paperwidth,height=.59\paperheight]{\chapterillustration}};% |
||||
|
\savebox\chapternumberbox{\fontsize{100}{100}\normalfont\sffamily\bfseries |
||||
|
\thechapter}% |
||||
|
\parbox[t]{\dimexpr\linewidth-\wd\chapternumberbox-1em}{% |
||||
|
\raggedleft |
||||
|
\makebox[1em][l]{\normalfont\normalsize\slshape\chapapp}\\ |
||||
|
#2% |
||||
|
}\quad |
||||
|
\raisebox{-1.75\baselineskip}{\usebox\chapternumberbox}\par |
||||
|
} |
||||
|
\fi |
||||
|
|
||||
|
%\pagestyle{scrheadings} |
||||
|
%\ihead[]{\headmark} |
||||
|
%\ohead[]{\pagemark} |
||||
|
%%\cfoot[]{Selfhosting} |
||||
|
%\ifoot[]{ } |
||||
|
%\ofoot[]{ } |
@ -0,0 +1,39 @@ |
|||||
|
% Use a nicer-Looking design for the TOC |
||||
|
\usepackage{tocstyle} |
||||
|
\usetocstyle{KOMAlike} |
||||
|
|
||||
|
% Avoid typographical unpleasantries |
||||
|
\clubpenalty = 10000 |
||||
|
\widowpenalty = 10000 |
||||
|
\displaywidowpenalty = 10000 |
||||
|
% Avoids line-overshooting at the cost of "Word-like" spacing |
||||
|
\setlength{\emergencystretch}{0.25em} |
||||
|
|
||||
|
\usepackage{scrhack} |
||||
|
\usepackage{listings} |
||||
|
\lstnewenvironment{shell}[1]{ |
||||
|
\endgraf |
||||
|
% \singlespacing |
||||
|
%\renewcommand\lstlistingname{Example} |
||||
|
\lstset{ |
||||
|
columns=fullflexible, |
||||
|
language=bash, |
||||
|
showstringspaces=false, |
||||
|
basicstyle=\ttfamily, |
||||
|
backgroundcolor=\color{gray!50}, |
||||
|
keywordstyle=\color{black}, |
||||
|
commentstyle=\color{black}, |
||||
|
stringstyle=\color{black}, |
||||
|
captionpos=b, |
||||
|
numbers=none, |
||||
|
tabsize=4, |
||||
|
breaklines=true, |
||||
|
breakatwhitespace=true, |
||||
|
%escapeinside={\%*}{*)}, |
||||
|
escapeinside={(*@}{@*)}, |
||||
|
escapechar='', |
||||
|
frame=float, |
||||
|
%float=h, % don't do page breaks |
||||
|
#1} |
||||
|
}{} |
||||
|
|
@ -0,0 +1,100 @@ |
|||||
|
\documentclass[ |
||||
|
11pt, |
||||
|
twoside, |
||||
|
headsepline, |
||||
|
svgnames |
||||
|
]{scrbook} |
||||
|
\usepackage[utf8]{inputenc} |
||||
|
\usepackage[T1]{fontenc} |
||||
|
\usepackage{lmodern} |
||||
|
\usepackage[ngerman]{babel} |
||||
|
\usepackage[automark]{scrlayer-scrpage} |
||||
|
|
||||
|
\usepackage[raiselinks=true, |
||||
|
bookmarks=true, |
||||
|
bookmarksopenlevel=1, |
||||
|
bookmarksopen=true, |
||||
|
bookmarksnumbered=true, |
||||
|
hyperindex=true, |
||||
|
plainpages=false, |
||||
|
pdfpagelabels=true, |
||||
|
pdfborder={0 0 0.5} |
||||
|
]{hyperref} |
||||
|
\usepackage{tikz} |
||||
|
|
||||
|
\usepackage{book/layout-hen} |
||||
|
\usepackage{book/layout-tweaks} |
||||
|
|
||||
|
\newcommand{\booktitle}{DIY personal web server} |
||||
|
\newcommand{\booksubtitle}{How to run your own webserver and keep control of your data} |
||||
|
\newcommand{\bookauthor}{Hendrik Langer} |
||||
|
\newcommand{\booksubject}{} |
||||
|
\newcommand{\bookkeywords}{Open Source, Free Software, Debian, Hosting, Cloud} |
||||
|
|
||||
|
\hypersetup{ |
||||
|
pdfauthor={\bookauthor}, |
||||
|
pdftitle={\booktitle}, |
||||
|
pdfsubject={\booksubject}, |
||||
|
pdfkeywords={\bookkeywords}, |
||||
|
pdflang=en, |
||||
|
colorlinks, |
||||
|
linkcolor=black, |
||||
|
anchorcolor=black, |
||||
|
filecolor=black, |
||||
|
urlcolor=black, |
||||
|
citecolor=black, |
||||
|
bookmarksnumbered=true, |
||||
|
pdfpagelayout=TwoColumnRight |
||||
|
} |
||||
|
|
||||
|
\begin{document} |
||||
|
|
||||
|
\frontmatter |
||||
|
\input{book/cover-page} |
||||
|
\tableofcontents |
||||
|
|
||||
|
\mainmatter |
||||
|
\part{Introduction and Overview} |
||||
|
% why |
||||
|
% caveats |
||||
|
% system overview |
||||
|
% requirements |
||||
|
% hardware |
||||
|
% network |
||||
|
\part{Basic system setup} |
||||
|
% installation |
||||
|
\include{systemsetup/repositories} |
||||
|
% networking |
||||
|
% dns |
||||
|
% certificates |
||||
|
% backup |
||||
|
% etckeeper |
||||
|
|
||||
|
% user management |
||||
|
% intro |
||||
|
% ldap |
||||
|
% sso |
||||
|
% virtualization |
||||
|
\part{Webserver} |
||||
|
\part{Mail} |
||||
|
\part{Services} |
||||
|
%\input{owncloud} |
||||
|
%\input{gitlab} |
||||
|
%\input{prosody} |
||||
|
%\input{blog} |
||||
|
%\input{openhab} |
||||
|
%\input{telephony} |
||||
|
%\input{vdr} |
||||
|
%\input{fileserver} |
||||
|
%\input{security/fail2ban} |
||||
|
%\input{security/unattended-upgrades} |
||||
|
%\input{monitoring} |
||||
|
%\input{business} |
||||
|
|
||||
|
%\input{book/closingwords} |
||||
|
\input{book/back-cover} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
\end{document} |
@ -0,0 +1,48 @@ |
|||||
|
\renewcommand\chapterillustration{systemsetup/six-computers-chips-circuits} |
||||
|
%\setcounter{chapter}{3} |
||||
|
\chapter{repositories} |
||||
|
|
||||
|
\section*{enable contrib and non-free} |
||||
|
|
||||
|
\begin{shell}{caption=enable all repositories, label=lst:repositories} |
||||
|
~ $ sed -i "/etc/apt/sources.list" -e "s/^\(deb.*\) main$/\1 main contrib non-free/" |
||||
|
\end{shell} |
||||
|
|
||||
|
\section*{enable unstable} |
||||
|
\begin{shell}{} |
||||
|
cat > /etc/apt/sources.list.d/unstable.list <<EOF |
||||
|
deb http://http.debian.net/debian/ unstable main non-free contrib |
||||
|
deb-src http://http.debian.net/debian/ unstable main non-free contrib |
||||
|
EOF |
||||
|
|
||||
|
cat > /etc/apt/preferences.d/unstable <<EOF |
||||
|
Package: * |
||||
|
Pin: release o=Debian,a=unstable |
||||
|
Pin-Priority: 200 |
||||
|
EOF |
||||
|
# APT::Default-Release "testing"; > /etc/apt/apt.conf.d/00local |
||||
|
|
||||
|
apt-get update |
||||
|
\end{shell} |
||||
|
|
||||
|
\section*{enable experimental} |
||||
|
\begin{shell}{} |
||||
|
cat > /etc/apt/sources.list.d/experimental.list <<EOF |
||||
|
deb http://http.debian.net/debian/ experimental main non-free contrib |
||||
|
deb-src http://http.debian.net/debian/ experimental main non-free contrib |
||||
|
EOF |
||||
|
|
||||
|
cat > /etc/apt/preferences.d/experimental <<EOF |
||||
|
Package: * |
||||
|
Pin: release o=Debian,a=experimental |
||||
|
Pin-Priority: 10 |
||||
|
EOF |
||||
|
|
||||
|
apt-get update |
||||
|
\end{shell} |
||||
|
|
||||
|
\section*{install base backages} |
||||
|
\begin{shell}{} |
||||
|
apt-get -y --install-recommends install firmware-linux |
||||
|
\end{shell} |
||||
|
Foo |
After Width: | Height: | Size: 124 KiB |
Loading…
Reference in new issue