Category Archives: Linux

Problems with apt-get in ubuntu (NO_PUBKEY 9AA38DCD55BE302B NO_PUBKEY 4D270D06F42584E6)

I got this error:

W: GPG error: http://mirrors.sunsite.dk stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B NO_PUBKEY 4D270D06F42584E6
W: You may want to run apt-get update to correct these problems

This can be resolve but typing:
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B
gpg --armor --export 9AA38DCD55BE302B | apt-key add -

gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 4D270D06F42584E6
gpg --armor --export 4D270D06F42584E6 | apt-key add -

Debian packages cpio failes to be updated

If you have some troubles upgrading cpio, it returns this error:

Preparing to replace cpio 2.6-18 (using …/cpio_2.6-18.1+etch1_i386.deb) …
Unpacking replacement cpio …
Replaced by files in installed package tar …
dpkg: error processing /var/cache/apt/archives/cpio_2.6-18.1+etch1_i386.deb (–u npack):
unable to create `./usr/share/locale/ko/LC_MESSAGES/cpio.mo’: No such file or d irectory
Errors were encountered while processing:
/var/cache/apt/archives/cpio_2.6-18.1+etch1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Try to run this commands:

mkdir -p /usr/share/locale/ko/LC_MESSAGES
mkdir -p /usr/share/locale/gl/LC_MESSAGES
mkdir -p /usr/share/locale/ru/LC_MESSAGES
mkdir -p /usr/share/locale/tr/LC_MESSAGES
mkdir -p /usr/share/locale/sv/LC_MESSAGES
mkdir -p /usr/share/locale/zh_CN/LC_MESSAGES
mkdir -p /usr/share/locale/da/LC_MESSAGES
mkdir -p /usr/share/locale/nl/LC_MESSAGES

And then the update should be working just fine

O3spaces, sharepoint rival

I have install O3spaces, on my servers. I have just installed the free version of the product. And I must say that iam impress about this software. In my work I have use Microsoft Sharepoint, and O3Spaces can satisfy most people. I was looking for a web interface that can control my own documents and in search on Google I found this O3spaces.

Have a look on there own homepage http://www.o3spaces.com

Tweaking mySQL in Debian

This guide is not complete to tweak you mySQL on Debian systems, because a good tweak is depending on what you want to use mySQL to.

Key Buffer:
The key buffer holds the indexes of tables in memory, and of cause a bigger key buffer result in faster row lookups. The bigger this value is the better is it, but preventing swaping. good rule of thumb seems to be to use 1/4 of system memory. key_buffer = 256M

Query Cache:
query_cache_size, as the name say it is the total memory available to query caching. query_cache_limit is the maximum number of kilobytes one query may be in order to be cached. If you set this value to high it will prevent a lot of small query to be cached. Setting it to low will prevent bigger query to be cached.
query_cache_size = 128MB
query_cache_limit = 4MB

Table Cache:
If you application need to open a lot of tables, a important variable is table_cache, it is the number of tables a thread can keep open at the same time.
table_cache = 512

The InnoDB Engine:
Allmost everybody do not use InnoDB engine I mySQL, there are using MyISAM istead. Mysql reserved memory for InnoDB, so you could easy skip this Add skip-innodb to you my.cnf file.

Binary Logging:
If you don’t want to replicate data changes to a second server, and don’t use the binary logging as incredimental backup, you can disable this feature.
Comment out this line:
log_bin = /var/log/mysql/mysql-bin.log

[ad]

Installere 2 ens Debian maskiner op.

Det kan være praktisk at nå man skal installere 2 ens maskiner op, bare at finde frem til hvilket pakker der er installeret på den ene, og så overfører dem til den anden, dette gøres nemt med dpkg og dselect.
Først skal vi på maskine1 havde hentede de pakker ud som er installeret på den.

dpkg --get-selections > installedpackages

Så skal vi have overført filen fra maskine1 til maskine2, dette gøres lettes via SCP.

scp installedpackages [email protected]:/root

hvor XXX.XXX.XXX.XXX selvfølgeligt er IP adressen på maskine2.

Herefter gå vi på maskine 2 og henter denne selection.

cd /root
dpkg --clear-selections
dpkg --set-selections < installedpackages

Herefter kører vi dselect.

dselect install

Apache and multiple SSL virtual host on same IP address

In standard way, apache only supports one SSL virtual host per IP address, if you want to use different SSL Certificates file. But with mod-gnutls it is possible to have multiple Virtual host with different SSL Certificates file.

Install mod-gnutls in Debian:

apt-get install libapache2-mod-gnutls

Then you need to enable mod-gnutls

cd /etc/apache2/mods-enabled
ln -s ../mods-available/gnutls.* .

Then you need to create the gnutls cache files

touch /var/cache/apache2/gnutls_cache
chmod 700 /var/cache/apache2/gnutls_cache
chown 33.33 /var/cache/apache2/gnutls_cache

And then you need to setup the two virtualhost:

<VirtualHost *:443>
ServerAdmin [email protected]
ServerName v1.dalbjerg.nu
DocumentRoot /var/www/v1.dalbjerg.nu
GnuTLSEnable on
GnuTLSPriorities NORMAL
GnuTLSCertificateFile /etc/apache2/v1/ssl.crt
GnuTLSKeyFile /etc/apache2/v1/ssl.key
</VirtualHost>

<VirtualHost *:443>
ServerAdmin [email protected]
ServerName v2.dalbjerg.nu
DocumentRoot /var/www/v2.dalbjerg.nu
GnuTLSEnable on
GnuTLSPriorities NORMAL
GnuTLSCertificateFile /etc/apache2/v2/ssl.crt
GnuTLSKeyFile /etc/apache2/v2/ssl.key
</VirtualHost>

Then you need to restart apache

apache2cl restart

If it don’t work see at /var/log/apache2/error.log to see any error is reporting there.

[ad]

Forward Inline or As Attachment by Default in Thunderbird

To change whether Mozilla Thunderbird inserts the forwarded message as an attachment or inline in the new email:

  • Select Tools | Options… (or Thunderbird | Preferences…) from the menu.
  • Go to the Composition category.
  • Make sure you’re on the General tab.
  • Choose Inline or As Attachment under Forward messages:.
  • Close the preferences window.

Opgraderingen til Apache 2 fra Apache 1.3 og danske bogstaver

Jeg har her til aften opgraderet en webserver fra Apache 1.3 til 2.0, herefter var alle danske bogstaver rettet af alle muligt mærkelige tegn.
Dette kan nemt rettes i apache2.conf filen, som ligger i /etc/apache2/apache2.conf (I hvert fald hvis du kører Debian).

Her skal du finde linien:
# AddDefaultCharset ISO-8859-1
Og så rette den til
AddDefaultCharset ISO-8859-15 (Forskellen på ISO-8859-1 og ISO-8859-15 er at € tegnet er med.)

Herefter skal apache genstartes dette gøres med ”apache2ctl restart”

Problems with apt-get in Debian (NO_PUBKEY A70DAF536070D3A1)

I got this error:

W: GPG error: http://security.debian.org testing/updates Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A70DAF536070D3A1
W: GPG error: ftp://ftp.port80.se testing Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A70DAF536070D3A1
W: You may want to run apt-get update to correct these problems

This can be resolve but typing:
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys A70DAF536070D3A1
gpg --armor --export A70DAF536070D3A1 | apt-key add -