Sonntag, 22. Juli 2012

Trip to Froscon 2012

This year i will travel to Froscon in Bonn/Germany. I currently booked my hotel which is just 17km away from the Univerity.

I will arrive on Friday during the day. So if someone is around and would like to have a beer :-) just tell me. I will hopefully join the social event on friday.

There are several talks that i really want to hear:

Day 1 (Saturday):

Day 2 (Sunday):

And i will be at some (i hope) very exiting booths and i have a lot of question:

  •  openSUSE

  • SkySQL

  • FreeBSD


here will i spent hopefully some hours and have a good time :-)

 

So see you in Bonn

Donnerstag, 19. Juli 2012

Give it a try

Caused a long experience using personal computers for over 16 years there are several operating systems which show up in my mind mostly every year. These are

  • SUSE (now: openSUSE)

  • Solaris  (now: OpenSolaris or OpenIndiana)

  • and FreeBSD


When i remember right, my first SUSE was 6.0 which i got from a friend who buyed a copy. I started with Linux some months ago with an RedHat 5.1 i bought from DataBecker. During the years i switched several times to other distributions and gave them a try. FreeBSD was the second "open source" software i used.  It was quite different, but it was great, later when i got an very old laptop, it was an Siemens Nixdorf 486, it was great to have an OS like FreeBSD which ran great on it. I used Solaris because iw was a fan of SUN. I guess had up to 15 Sparc machines around sometimes (IPX, IPC, Sparcstation, Ultrasparc).

So sometimes these OSes come back to my mind and i give them a try.

Currently i am locked in on an PC-BSD machine. And guys, like the topic says: GIVE IT A TRY

It runs great. Very easy installation. And my PC, which is not that old, runs better than before (switched from opensuse 12.1)
last pid: 44624; load averages: 0.16, 0.50, 0.79 up 2+22:23:04 18:59:09
132 processes: 1 running, 130 sleeping, 1 zombie
CPU: 8.7% user, 0.0% nice, 2.4% system, 0.2% interrupt, 88.8% idle
Mem: 1174M Active, 1382M Inact, 601M Wired, 83M Cache, 353M Buf, 92M Free
Swap: 2000M Total, 3692K Used, 1996M Free

and having Eclipse, Chromium, Pidgin, several xterms, an openvpn gate and  Sylpheed open. Well that doesnt worked on opensuse before.

So if you have the time and resources, go to http://www.pcbsd.org/ download a livecd and try it!

 

Dienstag, 17. Juli 2012

Tell the users

Sometimes i really hate it. You tell the people that you will poweroff a system for maintainance and if you log in some minuits before you see all users are doing something on this system, so what to do?

First of all tell the users to logout, these can be done by a simple wall message. wall will send an message to all logged in users, so create a message file


cat message.txt
''''''''''''''''''''''''''''''''''
System will switch off on 7:30 UTC
''''''''''''''''''''''''''''''''''

and do a

wall message.txt

now all logged in users will see this message on their screen.
After that i will do an

shutdown -h MAINTAINANCE_POWER_OFF

which will shutdown the system autmatically after "some minuits" and will repeat posting the shutdown every minuite during the last 5 minuits.

Thats it

Montag, 16. Juli 2012

[Scripting] IP and reverse

I currently writing a script that does the initial server setup. As we using kerberos it is needed to have the IP and the PTR record setup. So i first did a big ugly host | cut -d something -f 4 which was could easily run into trouble if theres a change in the domain. So i searched for an more easier way, and found dig.


dig x +short ${NAME}.${DOMAIN}

simply returns the IP

jstephan@linux-cyqa:~> dig x +short heise.de
193.99.144.80

and if you want the PTR its easy too

dig -x ${IPADDRESS} +short

which will return

jstephan@linux-cyqa:~> dig -x 193.99.144.80 +short
redirector.heise.de.


After that i do an simple if in my bash script

if [ '$REVIP' == '${NAME}.${DOMAIN}' ]; then
...
fi

Donnerstag, 5. Juli 2012

Running PostgreSQL on openSUSE

Last weekend i started setting up a new project. It will be an normal Apache and PHP webbased project with an PostgreSQL database. So i need to set it up.
First of all how do we get. Maybe i should start with the information that i choosed 12.2 (currently Factory) as the version of openSUSE.
While searching on software.opensuse.org i found that there is a database repo.
http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_Factory/

Which i added via YaST.

zypper in postgresql postgresql-server

should do the rest. And your database is ready to get configured.
Now switch to the new postgres user.
su - postgres

and initialize the database
initdb -D /var/lib/pgsql/data/

To start the database you need to
pg_ctl -D /var/lib/pgsql/data -l pglog.log start

and your database should be running. Now we need to add our first user and database.

postgres@linux-0ryq:~> createuser -P mytestuser
postgres@linux-0ryq:~> psql
postgres=# CREATE DATABASE mytest;
CREATE DATABASE
postgres=# GRANT ALL ON DATABASE mytest TO mytestuser;
GRANTED

So, this setup should work fo any local connection to the database. If you want to connect from another host you need to adjust your data/pg_hba.conf and add a line like

# TYPE DATABASE USER ADDRESS METHOD
host all all all trust

or any host you want. If you want to connect from 10.1.0.1 you fust need to set this at address.
Changing the hba conf should force a restart of the database
pg_ctl -D /var/lib/pgsql/data -l pglog.log restart

will do this.
So thats it, more to follow.