Kategoriarkiv: Knowledge Base

setup local debian + backports + ubuntu mirror

first get debmirror. # apt-get install debmirror second, create the user mirror and su to him # useradd -m mirror # su – mirror # mkdir /home/mirror/debian # mkdir /home/mirror/debian-backports # mkdir /home/mirror/debian-security # mkdir /home/mirror/ubuntu now create the default … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Shared Deb archive (Ubuntu)

Using Samba shares. Add to /etc/fstab //server/folder /opt/archives smbfs uid=root,gid=users,credentials=/path/file 0 0 /* credentials syntax: username = smb_username password = smb_password */ apt-get install smbfs Edit /etc/apt/apt.conf.d/20archive Add to bottom Dir::Cache::Archives “/opt/archives”; NB: Due to limitations in apt, we can … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

reinstall debian development server

ow to reinstall the dev server. *************** Create new vps: *************** Select configuration type: ‘Typical’ Select os version: ‘Linux’ + ‘Other Linux 2.6.x kernel’ Select name: ‘dev*’ Select network configuration: ‘Use bridged networking’ Select Disk size (GB): ’50’ + uncheck … Læs resten

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

postgres psql ssl

set the environment variable PGSSLMODE=require

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

Fix php + postgres + curl segfault on debian

If curl is loaded before postgres in php, there is some errors in the shutdown due to shared libraries being unloaded in the wrong order. A quick and easy fix: cd /etc/php5/conf.d cp pdo_pgsql.ini 0pdo_pgsql.ini cp pgsql.ini 0pgsql.ini chmod 600 … Læs resten

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

Postgres backup and restore

(backup mangler lige pt) pg_restore -i -h localhost -p 5432 -U postgres -d keepit_freds -v “keepit_freds.backup”

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

CVS commit steps

CVS Commit steps —————————————————————————– zephid@dev# cvs upd Check for “C” (Conflicts) if any “C”‘s, poke bt :p else zephid@dev# cvs ci -m “What you have done …”

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar

Fix html danish characters

grep Ã¥ * | wc -l grep æ * | wc -l grep ø * | wc -l sed -i -e ‘s/Ã¥/\å/g’ *.html sed -i -e ‘s/æ/\æ/g’ *.html sed -i -e ‘s/ø/\ø/g’ *.html grep Ã¥ * | wc -l grep … Læs resten

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar

Postgre quickguide

postgres@dev:~$ psql projektstyring Welcome to psql 8.1.9, the PostgreSQL interactive terminal. postgres@dev:~$ createdb projektstyring CREATE DATABASE projektstyring=# create user projektstyring with password ‘kode’; CREATE ROLE projektstyring=# GRANT ALL ON DATABASE projektstyring TO projektstyring; GRANT should be all that you need … Læs resten

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar

Xini file parser v1.0

<? # Xini parser v1.0 by MC Solutions 2007, all righs reserved /* Samlpe file: menu.xini: !Structure=Text,Url [Menu] Item=”Om firmaet”,”about.php” Item=”Kontakt firmaet”,”contact.php” [Menu2] Item=”Bestil”,”order.php” Item=”Log ind”,”login.php”,”nisse”,”fisk” [forside] Titel=”Bla bla bla” BestilLink=”Bla bla bla” EOF !Structure describes the name of the … Læs resten

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar