Sep
16
2014
by admin
SCP
scp -rp sourcedirectory user@dest:/path
-p Preserves modification times, access times, and modes from the original file.
-r Recursively copy entire directories.
(Note that scp follows symbolic links encountered in the tree traversal.)
RSYNC
rsync -ravz --delete sourcedirectory user@dest:/path
-r recurse into directories
-a archive mode
-z compress file data during the transfer
Include exclude variables
-F
–exclude=PATTERN exclude files matching PATTERN
–exclude-from=FILE read exclude patterns from FILE
–include=PATTERN don’t exclude files matching PATTERN
–include-from=FILE read include patterns from FILE
no comments | posted in Linux
Sep
14
2014
by admin
Installation
Start with installing bind9.
apt-get install bind9
Stop bind and prepare to chroot it.
/etc/init.d/bind9 stop
Edit /etc/default/bind9
# run resolvconf?
RESOLVCONF=no
# startup options for the server
OPTIONS="-u bind -t /var/lib/named"
Create the new directories under /var/lib.
Move the bind-files and creating symbolic-links to them.
mkdir -p /etc/bind/zones
mkdir -p /var/lib/named/etc
mkdir /var/lib/named/dev
mkdir -p /var/lib/named/var/cache/bind
mkdir -p /var/lib/named/var/run/bind/run
mv /etc/bind /var/lib/named/etc
ln -s /var/lib/named/etc/bind /etc/bind
Make null and random devices and set permissions
mknod /var/lib/named/dev/null c 1 3
mknod /var/lib/named/dev/random c 1 8
chmod 666 /var/lib/named/dev/null /var/lib/named/dev/random
chown -R bind:bind /var/lib/named/var/*
chown -R bind:bind /var/lib/named/etc/bind
Make bind able to report to syslog.
Create and edit /etc/rsyslog.d/bind-chroot.conf
$AddUnixListenSocket /var/lib/named/dev/log
Restart syslog
/etc/init.d/rsyslog restart
Start bind
/etc/init.d/bind9 start
no comments | posted in Bind9, Debian, Linux
Sep
13
2014
by admin
Typical use:
backup: tar -clpzvf /dev/st0 /dir1 /dir2 /dir3
compare: tar -dlpzvf /dev/st0 /dir1 /dir2 /dir3
restore: tar -xlpzvf /dev/st0 /dir1 /dir2 /dir3
For multiple tapes just add the -M option:
tar -clpMzvf /dev/st0 /dir1 /dir2 /dir3
tar -dlpMzvf /dev/st0 /dir1 /dir2 /dir3
tar -xlpMzvf /dev/st0 /dir1 /dir2 /dir3
no comments | posted in Linux
Aug
15
2014
by admin
Keep getting mail and error logs thats say:
PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
Solution:
Edit the file /etc/php5/apache2/conf.d/ming.ini
remove the first line: “#” so its only contains: “extension=ming.so” and nothing more.
no comments | posted in Debian, Linux
Jul
29
2014
by admin
## On the local machine
ssh-keygen -t rsa
# hit return three times
ssh-copy-id -i ~/.ssh/id_rsa.pub user@remote_host
# enter your password for user on remote_host
4 comments | posted in Linux
Jul
24
2013
by Zylr
1 comment | posted in Linux
May
31
2013
by Zylr
I was goin to update the server today when i walked up on this problem:
E: Release file expired, ignoring http://debian.lth.se/debian/dists/squeeze-updates/Release (invalid since 3d 1h 22min 1s)
Howto fix:
You can use this command to pass the errors:
apt-get -o Acquire::Check-Valid-Until=false update
or remove the complain source from: /etc/apt/sources.list
1 comment | posted in Debian, Linux
Mar
16
2011
by Zylr
Adobe will publish a panic-patch – which is not a planned release.
The patch is for: Flash Player 10 and Reader version 9/10.
Adobe Reader X is considered as safe, cuz of the built in sandbox function.
And the affected systems are: Windows, Mac, Linux, Solaris and Android
The vulnerability made adobe load secret flashfiles that can be distributed in excelfiles or by mail.
This release got reference number: CVE-2011-0609 in Adobes security database.
no comments | posted in Linux, Windows
Feb
3
2011
by Zylr
After I did a dist-upgrade last-night, I’ve had some big problems with the server.
I solved this problem by : export LC_ALL=en_US.UTF-8
You can read down below how the problems looked:
snorre:~# perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
snorre:~# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
snorre:~# dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
snorre:~# /etc/init.d/proftpd start
Starting ftp server: proftpd – unable to set LC_ALL: No such file or directory
– Fatal: unable to load module ‘mod_lang.c’: Operation not permitted
failed!
no comments | posted in Debian, Linux
Jan
4
2011
by Zylr
Source list for Debian’s Lenny release…
deb http://debian.lth.se/debian/ lenny main contrib non-free
deb-src http://debian.lth.se/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
no comments | posted in Debian, Linux