Show Menu
Cheatography

LAMP 2010 Cheat Sheet (DRAFT) by [deleted]

This is a draft cheat sheet. It is a work in progress and is not finished yet.

basics

sources ändern: vi /etc/a pt/ source­s.list
text zu langsam: /etc/m­odp­rob­e.d­/bl­ack­lis­tfr­ame­buffer. conf ---- zeile "­bla­cklist vga16f­b"hi­nzu­fügen
deb http:/ /old-r­ele­ase­s.u­bun­tu.com /ubuntu/ lucid
main restricted universe multiverse
deb http:/ /old-r­elease s.ubun­tu.com /ubuntu/ lucid- updates main restricted universe multiverse
deb http:/ /old-r­elease s.u buntu.com /ubuntu/ lucid‐ security main restricted universe multiverse
get file from ftp server: wget –user= anonymous
fpt:// 10.1 00.10.20 0/LAMP 2010/…

MySQL

mkdir /usr/s rc/ mysql
cp mysql- VER SIO N.t ar.gz /usr/s rc/ mysql
gunzip < mysql- VER SIO N.t ar.gz | tar -xvf -
groupadd mysql
useradd -g mysql mysql
./conf igure --pref ix= /us r/l oca l/mysql
make -j 4
make install
cp suppor t-f ile s/m y-m edi um.cnf /etc/m y.cnf
cd /usr/l oca l/mysql
bin/my sql _in sta ll_db --user =mysql
chown -R root .
chown -R mysql lib
chown -R mysql var
chgrp -R mysql .
bin/my sql d_safe --user =mysql &
bin/mysql

Apache2

mkdir /usr/s rc/ httpd
cp httpd- VER SIO N.t ar.gz /usr/s rc/ httpd
gunzip < httpd- VER SIO N.t ar.gz | tar -xvf -
./conf igure --pref ix= /us r/l oca l/a pache2 --enab le- mim emagic --enab le- expires --enab le- headers --enab le-ssl -- enab le-http --enab le-info --enab le-dir --enab le- rewrite -- enab le-so
make
make install

Apache2 Config

replace
with
Docume­ntRoot " /usr/l­oca­l/a­pac­he2­/ht­doc­s"
Docume­ntRoot " /var/www/ htdocs "
<Di­rectory " /usr/l­oca­l/a­pache2 /htdoc­s">
<Di­rectory " /var/www/ htdocs ">
AllowO­verride None
AllowO verride All
Direct ory Index index.html index.h tm l.var
Directory Index index.php index.html index.h­tm­l.var
AddHandler type-map varadd­line:
AddHandler type-map varaddline AddHandler php5-s­cri­pt.php
AddType Section - addline :
AddType applic­ation/ x-http­d-p­hp.php

PHP5

mkdir /usr/s rc/php5
cp php-VE­RSION.t ar.bz2 /usr/s rc/php5
tar xjf php-VE­RSI­ON.t­ar.bz2
./conf igure --pref ix= /us r/l oca l/php5 --with -ap ‐ xs2 =/usr/ local/ apache2/b in/apxs --with -my sql =share­d/usr /local /mysql
make
make install
cp php.in­i-d­eve­lopment /usr/l­oca­l/p­hp5/lib