IAW: add mediawiki project.
This commit is contained in:
parent
27bf6c9cc9
commit
dc2dc161f3
@ -0,0 +1,3 @@
|
||||
\begin{Verbatim}[commandchars=\\\{\}]
|
||||
apt install nginx php php\PYGZhy{}fpm php\PYGZhy{}xml php\PYGZhy{}mbstring php\PYGZhy{}intl
|
||||
\end{Verbatim}
|
@ -0,0 +1,7 @@
|
||||
\begin{Verbatim}[commandchars=\\\{\}]
|
||||
\PYG{k}{CREATE} \PYG{k}{DATABASE} \PYG{n}{my\PYGZus{}wiki}\PYG{p}{;}
|
||||
\PYG{k}{CREATE} \PYG{k}{USER} \PYG{l+s+s1}{\PYGZsq{}mediawiki\PYGZsq{}}\PYG{n+nv}{@\PYGZsq{}localhost\PYGZsq{}} \PYG{k}{IDENTIFIED} \PYG{k}{BY} \PYG{l+s+s1}{\PYGZsq{}mediawiki\PYGZsq{}}\PYG{p}{;}
|
||||
\PYG{k}{GRANT} \PYG{k}{ALL} \PYG{k}{PRIVILEGES} \PYG{k}{ON} \PYG{n}{mediawiki} \PYG{k}{TO} \PYG{l+s+s1}{\PYGZsq{}mediawiki\PYGZsq{}}\PYG{n+nv}{@\PYGZsq{}localhost\PYGZsq{}}\PYG{p}{;}
|
||||
\PYG{k}{FLUSH} \PYG{k}{PRIVILEGES}\PYG{p}{;}
|
||||
\PYG{n}{QUIT}\PYG{p}{;}
|
||||
\end{Verbatim}
|
@ -0,0 +1,3 @@
|
||||
\begin{Verbatim}[commandchars=\\\{\}]
|
||||
mysql\PYGZus{}secure\PYGZus{}installation
|
||||
\end{Verbatim}
|
@ -0,0 +1,4 @@
|
||||
\begin{Verbatim}[commandchars=\\\{\}]
|
||||
systemctl \PYG{n+nb}{enable} nginx
|
||||
systemctl start nginx
|
||||
\end{Verbatim}
|
@ -0,0 +1,4 @@
|
||||
\begin{Verbatim}[commandchars=\\\{\}]
|
||||
systemctl start mariadb
|
||||
systemctl \PYG{n+nb}{enable} mariadb
|
||||
\end{Verbatim}
|
@ -0,0 +1,3 @@
|
||||
\begin{Verbatim}[commandchars=\\\{\}]
|
||||
apt install mariadb\PYGZhy{}server
|
||||
\end{Verbatim}
|
@ -0,0 +1,29 @@
|
||||
\begin{Verbatim}[commandchars=\\\{\}]
|
||||
\PYGZsh{} Default server configuration
|
||||
server \PYGZob{}
|
||||
listen 80 default\PYGZus{}server;
|
||||
listen [::]:80 default\PYGZus{}server;
|
||||
|
||||
root /var/www/my\PYGZhy{}wiki;
|
||||
|
||||
\PYGZsh{} Add index.php to the list if you are using PHP
|
||||
index index.html index.htm index.nginx\PYGZhy{}debian.html index.php;
|
||||
|
||||
server\PYGZus{}name lotr.wiki;
|
||||
|
||||
location / \PYGZob{}
|
||||
\PYGZsh{} First attempt to serve request as file, then
|
||||
\PYGZsh{} as directory, then fall back to displaying a 404.
|
||||
try\PYGZus{}files \PYGZdl{}uri \PYGZdl{}uri/ =404;
|
||||
\PYGZcb{}
|
||||
|
||||
\PYGZsh{} pass PHP scripts to FastCGI server
|
||||
location \PYGZti{} \PYGZbs{}.php\PYGZdl{} \PYGZob{}
|
||||
include snippets/fastcgi\PYGZhy{}php.conf;
|
||||
|
||||
\PYGZsh{} With php\PYGZhy{}fpm (or other unix sockets):
|
||||
fastcgi\PYGZus{}pass unix:/run/php/php\PYGZhy{}fpm.sock;
|
||||
\PYGZsh{} With php\PYGZhy{}cgi (or other tcp sockets):
|
||||
\PYGZcb{}
|
||||
\PYGZcb{}
|
||||
\end{Verbatim}
|
@ -0,0 +1,101 @@
|
||||
|
||||
\makeatletter
|
||||
\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
|
||||
\let\PYG@ul=\relax \let\PYG@tc=\relax%
|
||||
\let\PYG@bc=\relax \let\PYG@ff=\relax}
|
||||
\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
|
||||
\def\PYG@toks#1+{\ifx\relax#1\empty\else%
|
||||
\PYG@tok{#1}\expandafter\PYG@toks\fi}
|
||||
\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
|
||||
\PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
|
||||
\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
|
||||
|
||||
\expandafter\def\csname PYG@tok@w\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@c\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@cp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.74,0.48,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@k\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@kp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@kt\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@o\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@ow\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@nb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@nf\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@nc\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@nn\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@ne\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.82,0.25,0.23}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@nv\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@no\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@nl\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.63,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@ni\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@na\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.49,0.56,0.16}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@nt\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@nd\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@s\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@sd\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@si\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@se\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.73,0.40,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@sr\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@ss\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@sx\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@m\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@gh\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@gu\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@gd\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@gi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@gr\endcsname{\def\PYG@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@ge\endcsname{\let\PYG@it=\textit}
|
||||
\expandafter\def\csname PYG@tok@gs\endcsname{\let\PYG@bf=\textbf}
|
||||
\expandafter\def\csname PYG@tok@gp\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@go\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.53,0.53,0.53}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@gt\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@err\endcsname{\def\PYG@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}
|
||||
\expandafter\def\csname PYG@tok@kc\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@kd\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@kn\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@kr\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@bp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@fm\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@vc\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@vg\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@vi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@vm\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@sa\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@sb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@sc\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@dl\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@s2\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@sh\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@s1\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@mb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@mf\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@mh\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@mi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@il\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@mo\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@ch\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@cm\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@cpf\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@c1\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYG@tok@cs\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
|
||||
\def\PYGZbs{\char`\\}
|
||||
\def\PYGZus{\char`\_}
|
||||
\def\PYGZob{\char`\{}
|
||||
\def\PYGZcb{\char`\}}
|
||||
\def\PYGZca{\char`\^}
|
||||
\def\PYGZam{\char`\&}
|
||||
\def\PYGZlt{\char`\<}
|
||||
\def\PYGZgt{\char`\>}
|
||||
\def\PYGZsh{\char`\#}
|
||||
\def\PYGZpc{\char`\%}
|
||||
\def\PYGZdl{\char`\$}
|
||||
\def\PYGZhy{\char`\-}
|
||||
\def\PYGZsq{\char`\'}
|
||||
\def\PYGZdq{\char`\"}
|
||||
\def\PYGZti{\char`\~}
|
||||
% for compatibility with earlier versions
|
||||
\def\PYGZat{@}
|
||||
\def\PYGZlb{[}
|
||||
\def\PYGZrb{]}
|
||||
\makeatother
|
||||
|
@ -0,0 +1,101 @@
|
||||
|
||||
\makeatletter
|
||||
\def\PYGdefault@reset{\let\PYGdefault@it=\relax \let\PYGdefault@bf=\relax%
|
||||
\let\PYGdefault@ul=\relax \let\PYGdefault@tc=\relax%
|
||||
\let\PYGdefault@bc=\relax \let\PYGdefault@ff=\relax}
|
||||
\def\PYGdefault@tok#1{\csname PYGdefault@tok@#1\endcsname}
|
||||
\def\PYGdefault@toks#1+{\ifx\relax#1\empty\else%
|
||||
\PYGdefault@tok{#1}\expandafter\PYGdefault@toks\fi}
|
||||
\def\PYGdefault@do#1{\PYGdefault@bc{\PYGdefault@tc{\PYGdefault@ul{%
|
||||
\PYGdefault@it{\PYGdefault@bf{\PYGdefault@ff{#1}}}}}}}
|
||||
\def\PYGdefault#1#2{\PYGdefault@reset\PYGdefault@toks#1+\relax+\PYGdefault@do{#2}}
|
||||
|
||||
\expandafter\def\csname PYGdefault@tok@w\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@c\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@cp\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.74,0.48,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@k\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@kp\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@kt\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@o\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@ow\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@nb\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@nf\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@nc\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@nn\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@ne\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.82,0.25,0.23}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@nv\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@no\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@nl\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.63,0.63,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@ni\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@na\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.49,0.56,0.16}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@nt\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@nd\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@s\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@sd\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@si\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@se\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.40,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@sr\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@ss\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@sx\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@m\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@gh\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@gu\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@gd\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@gi\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@gr\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@ge\endcsname{\let\PYGdefault@it=\textit}
|
||||
\expandafter\def\csname PYGdefault@tok@gs\endcsname{\let\PYGdefault@bf=\textbf}
|
||||
\expandafter\def\csname PYGdefault@tok@gp\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@go\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.53,0.53,0.53}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@gt\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@err\endcsname{\def\PYGdefault@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@kc\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@kd\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@kn\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@kr\endcsname{\let\PYGdefault@bf=\textbf\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@bp\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@fm\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@vc\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@vg\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@vi\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@vm\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@sa\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@sb\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@sc\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@dl\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@s2\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@sh\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@s1\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@mb\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@mf\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@mh\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@mi\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@il\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@mo\endcsname{\def\PYGdefault@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@ch\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@cm\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@cpf\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@c1\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PYGdefault@tok@cs\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
|
||||
\def\PYGdefaultZbs{\char`\\}
|
||||
\def\PYGdefaultZus{\char`\_}
|
||||
\def\PYGdefaultZob{\char`\{}
|
||||
\def\PYGdefaultZcb{\char`\}}
|
||||
\def\PYGdefaultZca{\char`\^}
|
||||
\def\PYGdefaultZam{\char`\&}
|
||||
\def\PYGdefaultZlt{\char`\<}
|
||||
\def\PYGdefaultZgt{\char`\>}
|
||||
\def\PYGdefaultZsh{\char`\#}
|
||||
\def\PYGdefaultZpc{\char`\%}
|
||||
\def\PYGdefaultZdl{\char`\$}
|
||||
\def\PYGdefaultZhy{\char`\-}
|
||||
\def\PYGdefaultZsq{\char`\'}
|
||||
\def\PYGdefaultZdq{\char`\"}
|
||||
\def\PYGdefaultZti{\char`\~}
|
||||
% for compatibility with earlier versions
|
||||
\def\PYGdefaultZat{@}
|
||||
\def\PYGdefaultZlb{[}
|
||||
\def\PYGdefaultZrb{]}
|
||||
\makeatother
|
||||
|
BIN
2/IAW/assignments/t5-ej2-mediawiki/t5-ej2-mediawiki-naortega.pdf
Normal file
BIN
2/IAW/assignments/t5-ej2-mediawiki/t5-ej2-mediawiki-naortega.pdf
Normal file
Binary file not shown.
243
2/IAW/assignments/t5-ej2-mediawiki/t5-ej2-mediawiki-naortega.tex
Normal file
243
2/IAW/assignments/t5-ej2-mediawiki/t5-ej2-mediawiki-naortega.tex
Normal file
@ -0,0 +1,243 @@
|
||||
\documentclass[12pt,a4paper,titlepage]{article}
|
||||
\usepackage[spanish]{babel}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{subcaption}
|
||||
\usepackage{minted}
|
||||
|
||||
\title{Tema V Ejercicio II: MediaWiki}
|
||||
\author{Nicolás A. Ortega Froysa}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\tableofcontents
|
||||
\pagebreak
|
||||
|
||||
\section{Introducción}
|
||||
|
||||
En este trabajo queremos explorar el proceso de instalación y gestión de {\it
|
||||
MediaWiki}, el software de enciclopedias online más utilizado en la web. Quizá
|
||||
su uso más conocido sería en la página de {\it Wikipedia}.
|
||||
|
||||
Queremos saber cómo instalarlo en una máquina GNU/Linux, y cómo se gestionaría.
|
||||
Respecto a esto último, veremos gestión de contenidos y sintáxis del editor de
|
||||
MediaWiki.
|
||||
|
||||
\section{Instalación}
|
||||
|
||||
Para la instalación de MediaWiki, deberemos de seguir varios pasos, y antes
|
||||
incluso de instalarlo en sí, habría que instalar y configurar sus dependencias.
|
||||
|
||||
\subsection{Requisitos}
|
||||
|
||||
MediaWiki no se instala como una aplicación normal, ya que se accede por medio
|
||||
de la web. En su lugar, se basa sobre un servidor web y una base de datos. Para
|
||||
un servidor web, podemos usar casi cualquier opción que permite usar CGIs de
|
||||
PHP. En nuestro caso vamos a usar Nginx para esto. Es necesario también instalar
|
||||
PHP con una versión mayor a 7.2, que tiene problemas con MediaWiki.
|
||||
|
||||
También será necesario tener una base de datos, por lo que también tenemos
|
||||
varias opciones. De acuerdo a la página de instalación de MediaWiki podemos usar
|
||||
SQLite, MariaDB/MySQL, o incluso PostgreSQL. Nosotros usaremos MariaDB.
|
||||
|
||||
\subsubsection{Nginx}
|
||||
|
||||
Para instalar Nginx sólo hemos de instalarlo junto a PHP. Instalamos los
|
||||
paquetes necesarios con el comando siguiente:
|
||||
|
||||
\begin{minted}{bash}
|
||||
apt install nginx php php-fpm php-xml php-mbstring php-intl
|
||||
\end{minted}
|
||||
|
||||
Ahora en el directorio {\tt /etc/nginx/sites-available} creamos un archivo con
|
||||
el nombre {\tt my-wiki.conf} con el contenido siguiente:
|
||||
|
||||
\begin{minted}{text}
|
||||
# Default server configuration
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
root /var/www/my-wiki;
|
||||
|
||||
# Add index.php to the list if you are using PHP
|
||||
index index.html index.htm index.nginx-debian.html index.php;
|
||||
|
||||
server_name lotr.wiki;
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 404.
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# pass PHP scripts to FastCGI server
|
||||
location ~ \.php$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
|
||||
# With php-fpm (or other unix sockets):
|
||||
fastcgi_pass unix:/run/php/php-fpm.sock;
|
||||
# With php-cgi (or other tcp sockets):
|
||||
}
|
||||
}
|
||||
\end{minted}
|
||||
|
||||
Luego se crea un enlace simbólico del mismo en la carpeta de {\tt
|
||||
sites-enabled}. A partir de ahí podemos inicializar el servicio:
|
||||
|
||||
\begin{minted}{bash}
|
||||
systemctl enable nginx
|
||||
systemctl start nginx
|
||||
\end{minted}
|
||||
|
||||
\subsubsection{MariaDB}
|
||||
|
||||
Como en nuestro caso vamos a instalar MariaDB, hemos de correr el comando
|
||||
siguiente para instalarlo:
|
||||
|
||||
\begin{minted}{bash}
|
||||
apt install mariadb-server
|
||||
\end{minted}
|
||||
|
||||
Ahora lo tenemos que configurar utilizando el comando siguiente, siguiendo los
|
||||
pasos. Sólo hemos de fijar la contraseña de root (el administrador) y luego
|
||||
seguir seleccionando las opciones por defecto.
|
||||
|
||||
\begin{minted}{bash}
|
||||
mysql_secure_installation
|
||||
\end{minted}
|
||||
|
||||
Cuando ya lo tenemos configurado empezamos el servicio:
|
||||
|
||||
\begin{minted}{bash}
|
||||
systemctl start mariadb
|
||||
systemctl enable mariadb
|
||||
\end{minted}
|
||||
|
||||
Ahora tenemos que crear la base de datos:
|
||||
|
||||
\begin{minted}{mysql}
|
||||
CREATE DATABASE my_wiki;
|
||||
CREATE USER 'mediawiki'@'localhost' IDENTIFIED BY 'mediawiki';
|
||||
GRANT ALL PRIVILEGES ON mediawiki TO 'mediawiki'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
QUIT;
|
||||
\end{minted}
|
||||
|
||||
\subsection{Descarga}
|
||||
|
||||
Podemos descargar MediaWiki de la página principal (figura \ref{fig:download}).
|
||||
|
||||
\begin{figure}[ht!]
|
||||
\includegraphics[width=0.75\textwidth]{imgs/00-download.png}
|
||||
\caption{Download}
|
||||
\label{fig:download}
|
||||
\end{figure}
|
||||
|
||||
Una vez descargado lo descomprimimos y lo metemos dentro de nuestro directorio
|
||||
de root, que lo hemos configurado como {\tt /var/www/my-wiki}.
|
||||
|
||||
\subsection{Configuración}
|
||||
|
||||
\begin{figure}[ht!]
|
||||
\includegraphics[width=0.75\textwidth]{imgs/01-config-page.png}
|
||||
\caption{Configuration front page.}
|
||||
\label{fig:config-page}
|
||||
\end{figure}
|
||||
|
||||
Para la configuración hemos de entrar por el navegador a la dirección de web
|
||||
{\tt http://lotr.wiki:80/mw-config} (el domonio lo hemos configurado antes en el
|
||||
archivo {\tt /etc/hosts}). Encontraremos una página de configuración (figura
|
||||
\ref{fig:config-page}). Elegimos inglés porque es el idioma más universal y más
|
||||
documentado.
|
||||
|
||||
Al pasar a la página siguiente encontraremos primero una página que encuentre si
|
||||
faltan algunos módulos. Pero como los hemos instalado todos no tendremos
|
||||
problemas.
|
||||
|
||||
En la página siguiente configuramos la base de datos. Para el {\it host}
|
||||
definimos {\tt localhost}, ya que lo tenemos alojado localmente. Luego, para el
|
||||
nombre de la base de datos metemos el nombre que hemos definido enteriormente
|
||||
(i.e.\ {\tt my\_wiki}), y luego como usuario y contraseña lo que definimos
|
||||
anteriormente. Preguntará si queremos usar la misma cuenta para el acceso web
|
||||
(post-instalación). A esto le damos que sí (para ahorrar pasos).
|
||||
|
||||
\begin{figure}[ht!]
|
||||
\includegraphics[width=0.75\textwidth]{imgs/05-wiki-conf.png}
|
||||
\caption{Wiki configuration}
|
||||
\label{fig:wiki-conf}
|
||||
\end{figure}
|
||||
|
||||
Ahora viene la configuración de la Wiki en sí. Definimos el nombre, el {\it
|
||||
namespace} (que lo mantendremos igual), y sobre todo lo que nos importa es
|
||||
configurar el usuario administrador. Nos pedirá si queremos configurar más
|
||||
opciones en cuyo caso nos mostrará varias opciones que podremos modificar luego
|
||||
acerca de licencia de la Wiki, quién tiene acceso para editar páginas, etc.
|
||||
|
||||
\begin{figure}[ht!]
|
||||
\includegraphics[width=0.75\textwidth]{imgs/06-advanced-wiki-settings.png}
|
||||
\caption{Advanced Wiki settings.}
|
||||
\label{fig:advanced-wiki-settings}
|
||||
\end{figure}
|
||||
|
||||
Una vez instalado, debemos de descargar un archivo {\tt LocalSettings.php}. Este
|
||||
archivo lo tenemos que mover el archivo a {\tt /var/www/my-wiki}. Ahora si
|
||||
visitamos a la página principal nos debería de salir la nuestra página principal
|
||||
(figura \ref{fig:front-page-logged}).
|
||||
|
||||
\begin{figure}
|
||||
\includegraphics[width=0.75\textwidth]{imgs/08-front-page-logged.png}
|
||||
\caption{Front page logged in.}
|
||||
\label{fig:front-page-logged}
|
||||
\end{figure}
|
||||
|
||||
\section{Gestión de Contenidos}
|
||||
|
||||
Para gestionar contenidos tenemos dos opciones. La primera y más fácil es
|
||||
utilizar el editor visual. Este usa un modelo WYSIWYG. Parece en ese sentido un
|
||||
procesador de texto como Word o Google Drive (figura \ref{fig:visual-editor}).
|
||||
|
||||
\begin{figure}[ht!]
|
||||
\includegraphics[width=0.75\textwidth]{imgs/09-visual-editor.png}
|
||||
\caption{Visual editor (WYSIWYG).}
|
||||
\label{fig:visual-editor}
|
||||
\end{figure}
|
||||
|
||||
También tenemos la opción de escribir el código con el sintáxis especial de
|
||||
MediaWiki. Se parece en algo al markdown, pero tiene sus diferencias (figura
|
||||
\ref{fig:code-editor}).
|
||||
|
||||
\begin{figure}[ht!]
|
||||
\includegraphics[width=0.75\textwidth]{imgs/10-code-editor.png}
|
||||
\caption{Code editor.}
|
||||
\label{fig:code-editor}
|
||||
\end{figure}
|
||||
|
||||
Todo esto nos permite crear páginas dinámicas y extensas, interlazadas en un
|
||||
sistema complejo. Nos proporciona una página simple e informativa.
|
||||
|
||||
\begin{figure}[ht!]
|
||||
\includegraphics[width=0.75\textwidth]{imgs/11-frodo-page.png}
|
||||
\caption{Frodo page.}
|
||||
\label{fig:frodo-page}
|
||||
\end{figure}
|
||||
|
||||
\section{Conclusión}
|
||||
|
||||
MediaWiki es una herramienta útil y bastante utilizado. Permite crear una
|
||||
enciclopedia virtual robusta y eficaz para guardar información de forma
|
||||
sistemática.
|
||||
|
||||
\pagebreak
|
||||
|
||||
\section{Derechos de Autor y Licencia}
|
||||
|
||||
\noindent
|
||||
Copyright \copyright\ \the\year\ Nicolás A. Ortega Froysa
|
||||
<nicolas@ortegas.org> \\
|
||||
\\
|
||||
Este documento se distribuye bajo los términos y condiciones de la licencia
|
||||
Creative Commons Attribution No Derivatives 4.0 International.
|
||||
|
||||
\end{document}
|
@ -0,0 +1,11 @@
|
||||
\babel@toc {spanish}{}
|
||||
\contentsline {section}{\numberline {1}Introducción}{2}{section.1}%
|
||||
\contentsline {section}{\numberline {2}Instalación}{2}{section.2}%
|
||||
\contentsline {subsection}{\numberline {2.1}Requisitos}{2}{subsection.2.1}%
|
||||
\contentsline {subsubsection}{\numberline {2.1.1}Nginx}{2}{subsubsection.2.1.1}%
|
||||
\contentsline {subsubsection}{\numberline {2.1.2}MariaDB}{3}{subsubsection.2.1.2}%
|
||||
\contentsline {subsection}{\numberline {2.2}Descarga}{4}{subsection.2.2}%
|
||||
\contentsline {subsection}{\numberline {2.3}Configuración}{4}{subsection.2.3}%
|
||||
\contentsline {section}{\numberline {3}Gestión de Contenidos}{5}{section.3}%
|
||||
\contentsline {section}{\numberline {4}Conclusión}{7}{section.4}%
|
||||
\contentsline {section}{\numberline {5}Derechos de Autor y Licencia}{8}{section.5}%
|
Loading…
Reference in New Issue
Block a user