the permanent TODO

May 24, 2010

Installing a VPN

Filed under: Uncategorized — Tags: , , — {Francisco,François} Varas @ 9:30 am

Here I will explain how i’ve manageed to have a functional VPN with running Debian as server.
I have Linux and Mac OS X clients(Tunnelblick).
What you will need

  • A public IP
  • debian
  • an editor (vi or vim)
  • this howto
  • frustration proof patienece


- to launch the server:
openvpn --config /etc/openvpn/server.conf --script-security 2 --daemon

- to launch a Linux client:
openvpn --config /etc/openvpn/client.conf --script-security 2 --daemon (Debian, Ubuntu)

- to launch a Mac OS X:
Download and install Tunnelblick

- How to generate client certificates:
one installed, to generate a VPN

#cd /etc/openvpn/easy-rsa/2.0/
#./build-key <client_name>
#cd /etc/openvpn/easy-rsa/2.0/keys/
you will find 3 files named:
- <client_name>.crt
- <client_name>.csr
- <client_name>.key (chmod 500 if not )

make a tarball with those files + ca.crt

This post is not complete. By now, you can follow the open VPN howto.

April 26, 2010

squirrelmail with postfix – debian

Filed under: Uncategorized — Tags: , , , — {Francisco,François} Varas @ 9:00 am

apt-get install courier-imap

http://www.debian-administration.org/articles/243

Thing 1:

http://www.squirrelmail.org/docs/admin/admin-3.html

Thing 2:
/usr/share/squirrelmail/config/conf.pl

March 29, 2010

posfix with debian

Filed under: Uncategorized — Tags: , — {Francisco,François} Varas @ 9:00 am

apt-get install postfix

http://wiki.debian.org/Postfix

http://www.debian-administration.org/articles/243

With an edited sample of my /etc/aliases
# /etc/aliases
root: user1@dragon-tortuga.net #all mail sento to root@dragon-tortuga.net will end in my mailbox
mailer-daemon: postmaster #all mail sent to mail-daemon will go to postmaster, wich is root which is user1 (me)
postmaster: root
hostmaster: root
webmaster: root
www: root
ftp: root
abuse: root
user1: user1@dragon-tortuga.net
my.name: user1 #an alias to have more a more formal mail address
user2: user2@sutercnologico.net
user2.realname: user2
user3: user3@dragon-tortuga.net
—————
once you have finished editting this file, run
newaliases
invoke-rc.d postfix reload

This is a very basic set up that uses system accounts with all pros and cons.

March 20, 2010

let’s make things clear

Filed under: Uncategorized — Tags: , , — {Francisco,François} Varas @ 7:03 pm

I publish this blog just for fun, and most of the information you will find comes from my google research and some of the books I have at home. I’m not intending to explain things, only make available the results of things i’ve done and tested for my own personal use.

If this method offends a certain “over qualified” audience, the only effort to assume is to avoid reading this blog.
I’ve not studied anything related to informatics, I’m a self taught Linux user. In my beginnings I had to face unix systems with little or no idea of what I was doing and my only intention with this blog it to make it easier (event a the cost of misleading imprecisions) for people that is discovering this particular and remarkably amazing world of OSes.

Have a nice day.

March 8, 2010

uncommenting a code block with Vim

Filed under: Uncategorized — {Francisco,François} Varas @ 9:30 am

Note: I use the set number option by default.
To uncomment a block beginning with the character “#” from line 9 to line 13

Use:
:9,13s/^//g

March 1, 2010

commenting a code block with Vim

Filed under: Uncategorized — {Francisco,François} Varas @ 9:30 am

Note: I use the set number option by default.
To comment a block with the character “#” from line 9 to line 13

Use:
:9,13s/^/#/g

and so on…

February 25, 2010

indentation with Vim

Filed under: Uncategorized — {Francisco,François} Varas @ 11:50 am

to indent a block, select lines with v or shift+v
and j or down arrow, then use the > command.

Nice one :)

January 11, 2010

building packages from the source with apt-get

Filed under: Uncategorized — {Francisco,François} Varas @ 9:00 am

want to build gkrellm from the source?
if you see something weird in the code below, IT’S A JOKE
If you don’t see anything weird, nevermind…life goes on

c:\>su [troll] not sudo, sudo is for newbies [/troll]
c:\>cd /usr/scr
c:\>apt-get build-dep gkrellm
c:\>apt-get source mplayer --build
you can safely go for an orange juice can now
c:\>dpkg -i gkrellm_2.3.2-5_i386.deb

And, of course this procedure will work for other packages.

Have a nice day!

January 4, 2010

forgot the name of your mysql database?

Filed under: Uncategorized — {Francisco,François} Varas @ 9:00 am

you will search for existent mysql databases:

sweet@home:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2745
Server version: 5.0.51a-24+lenny2 (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| wp-database |
+--------------------+
3 rows in set (0.00 sec)

mysql> Bye

then:

sweet@home:~$ mysql -u root -p wp-database
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2747
Server version: 5.0.51a-24+lenny2 (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show tables;
+-----------------------+
| Tables_in_xxxxxx |
+-----------------------+
| wp_commentmeta |
| wp_comments |
| wp_links |
| wp_options |
| wp_postmeta |
| wp_posts |
| wp_term_relationships |
| wp_term_taxonomy |
| wp_terms |
| wp_usermeta |
| wp_users |
+-----------------------+
11 rows in set (0.00 sec)

mysql> Bye

December 28, 2009

wordpress backup

Filed under: Uncategorized — {Francisco,François} Varas @ 9:00 am

keeping in mind the quick and dirty ethics, no boring explanations, here’s my approach on how to backup wordpress’ mysql database. it’s useful to do it before upgrades, long holidays in southamerica, dull sundays, political p.o.v. modifications and because it is a healthy habit.

this is my script (if you carefully google it, you will find out that it is not an original idea)


#!/bin/sh

DBBDATE=`date +%Y-%m-%d_%H.%M.%S`
DB_USER=user
DB_ACCESS=xxxxxxxx   #password
DB_NAME=wpdatabse    #how you named your wp database
BLOG=TODO

mysqldump --opt -u $DB_USER -p$DB_ACCESS $DB_NAME > database_$BLOG-at-$DBBDATE.sql

#un comment the following line to make a local copy
#cp database_$BLOG-at-$DBBDATE.sql /mnt/backups

#un comment the following line to make a remote copy
#scp -P 1234 database_$BLOG-at-$DBBDATE.sql user@remote.unit.com:/mnt/backups/

Stuff written in red MUST be changed, excepting only wise people that have a FQDN like “remote.unit.com” and a partition called ‘/mnt/backups/’ or so.

Older Posts »

Powered by WordPress