Isar6: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 5: | Zeile 5: | ||
apt-get install nginx | apt-get install nginx | ||
</pre> | </pre> | ||
== Swap-Nachrüsten == | |||
=== Trick bei OpenVZ === | |||
<pre> | |||
SCRIPT=/sbin/CreateSwap | |||
cat <<'EOS' >$SCRIPT | |||
#!/bin/bash | |||
SWAP="${1:-512}" | |||
NEW="$[SWAP*1024]"; TEMP="${NEW//?/ }"; OLD="${TEMP:1}0" | |||
umount /proc/meminfo 2> /dev/null | |||
sed "/^Swap\(Total\|Free\):/s,$OLD,$NEW," /proc/meminfo > /etc/fake_meminfo | |||
mount --bind /etc/fake_meminfo /proc/meminfo | |||
free -m | |||
EOS | |||
chmod u=rx $SCRIPT | |||
echo "$SCRIPT <size_mbyte>" | |||
</pre> | |||
=== Datei (nicht immer möglich) === | |||
<pre> | |||
# swap einrichten: | |||
SWAPFILE=/var/cache/swapfile | |||
dd if=/dev/zero of=/var/cache/swapfile bs=1M count=512 | |||
chmod 600 $SWAPFILE | |||
mkswap $SWAPFILE | |||
swapon $SWAPFILE | |||
echo >>/etc/fstab "$SWAPFILE none swap defaults 0 0" | |||
</pre> | |||
[[Kategorie:ServerApplikation]] | |||
= Konfiguration = | = Konfiguration = | ||
Zeile 13: | Zeile 44: | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Z4tMh9xFVKL5XGx/9KjNt4OGzrk5MmOtUnLexAX3bjQ4yqYaj5zNvjQ1GaTbVG8bOCcstueKkvnCJ/iEYfoCwc9eeYv8QbdIH4BJPLeV0wO5D6wTAkZSqkyCAI7yFWYEr1Yy1vpKo8vZwcXtDGCQfWsG0CIZDzQCGHrSkdgNNIzjjEpsz4iAgYS5n044hDBW4YNaH7UWs/btSCyfWg00wza7FLZY5tz2sA9KB3NprFrJSPr/LyNhFv8LU+E7wi8eBZyx0rpbak27AYL1IHk7kODfhZSJo6eLacHA8RIftuZL8WkQzdNDnrEn09rg593stn/hm0blnUDBCr8AEZIj hm@ant | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Z4tMh9xFVKL5XGx/9KjNt4OGzrk5MmOtUnLexAX3bjQ4yqYaj5zNvjQ1GaTbVG8bOCcstueKkvnCJ/iEYfoCwc9eeYv8QbdIH4BJPLeV0wO5D6wTAkZSqkyCAI7yFWYEr1Yy1vpKo8vZwcXtDGCQfWsG0CIZDzQCGHrSkdgNNIzjjEpsz4iAgYS5n044hDBW4YNaH7UWs/btSCyfWg00wza7FLZY5tz2sA9KB3NprFrJSPr/LyNhFv8LU+E7wi8eBZyx0rpbak27AYL1IHk7kODfhZSJo6eLacHA8RIftuZL8WkQzdNDnrEn09rg593stn/hm0blnUDBCr8AEZIj hm@ant | ||
EOS | EOS | ||
</pre> | </pre> |
Aktuelle Version vom 1. November 2013, 21:26 Uhr
Installation[Bearbeiten]
Ausgangspunkt: debian 7.2 (wheezzy) minimal
apt-get install sudo git etckeeper apt-get install nginx
Swap-Nachrüsten[Bearbeiten]
Trick bei OpenVZ[Bearbeiten]
SCRIPT=/sbin/CreateSwap cat <<'EOS' >$SCRIPT #!/bin/bash SWAP="${1:-512}" NEW="$[SWAP*1024]"; TEMP="${NEW//?/ }"; OLD="${TEMP:1}0" umount /proc/meminfo 2> /dev/null sed "/^Swap\(Total\|Free\):/s,$OLD,$NEW," /proc/meminfo > /etc/fake_meminfo mount --bind /etc/fake_meminfo /proc/meminfo free -m EOS chmod u=rx $SCRIPT echo "$SCRIPT <size_mbyte>"
Datei (nicht immer möglich)[Bearbeiten]
# swap einrichten: SWAPFILE=/var/cache/swapfile dd if=/dev/zero of=/var/cache/swapfile bs=1M count=512 chmod 600 $SWAPFILE mkswap $SWAPFILE swapon $SWAPFILE echo >>/etc/fstab "$SWAPFILE none swap defaults 0 0"
Konfiguration[Bearbeiten]
adduser hm mkdir /home/hm/.ssh cat >/home/hm/.ssh/authorized_keys <<EOS ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Z4tMh9xFVKL5XGx/9KjNt4OGzrk5MmOtUnLexAX3bjQ4yqYaj5zNvjQ1GaTbVG8bOCcstueKkvnCJ/iEYfoCwc9eeYv8QbdIH4BJPLeV0wO5D6wTAkZSqkyCAI7yFWYEr1Yy1vpKo8vZwcXtDGCQfWsG0CIZDzQCGHrSkdgNNIzjjEpsz4iAgYS5n044hDBW4YNaH7UWs/btSCyfWg00wza7FLZY5tz2sA9KB3NprFrJSPr/LyNhFv8LU+E7wi8eBZyx0rpbak27AYL1IHk7kODfhZSJo6eLacHA8RIftuZL8WkQzdNDnrEn09rg593stn/hm0blnUDBCr8AEZIj hm@ant EOS