How can I make TeX find tikz's files without moving all of them?

I'm trying to recreate my file system on a cloud server so I can SSH into it from my new tablet. So I have def.tex, my main list of custom macros, which accesses tikz.tex:

``````\input tikz/plain/pgf/frontendlayer/tikz.tex
``````

But then tikz.tex accesses its files as if they were in the same folder:

``````\input pgf.tex
\input pgffor.tex
\input tikz.code.tex
``````

So I'm not sure what to do. I tried to move everything in the same folder, but there were .sty files that I couldn't find anywhere. How did other people solve this problem?

-
`\input tikz` then make sure `tikz//` is in your TEXINPUTS path (either as an environment variable or in texmf.cnf kpathsea setting) so everything below that is searched. –  David Carlisle Apr 5 '14 at 21:42
Ah, yes. Furthermore, tikz is included by default in newer releases. (It may be in 2009, but I upgraded to the newest one.) No need to install manually. –  Douglas Weathers Apr 5 '14 at 22:02
Is `\input{tikz/plain/pgf/frontendlayer/tikz.tex}` working for you? –  Malipivo Apr 6 '14 at 6:05
That's LaTeX syntax; I use plainTeX. But in newer distributions, \input tikz without any manual installation works and it knows where to find everything. @DavidCarlisle would you mind elaborating? I'm sure I'll need to know how to do that some time. –  Douglas Weathers Apr 6 '14 at 14:46