Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Tuesday, April 29, 2014

Notes on installing Archlinux

This blog post is a collection of notes, for installing a modern Archlinux system.

Networking

I had a minor problem with the networking. It simply required restarting the dhcpd service for the given interface:
    systemctl restart dhcpd@enp2s0.service

Partitioning

The system has a 250G drive(Shows as 232G), and is GPT with the following scheme:
SizeTypeMount point
200MEFI System...?
50GLinux/
80GLinux/var
102GLinux/home
Suggestions found at: https://wiki.archlinux.org/index.php/partitioning

Base package installation

    pacstrap -i /mnt base base-devel

Needs to remove reiserfsprogs(maybe also xfsprogs,jfsutils) after installation.
Maybe stupid question but why libldap, libsasl and openssl ? openssl is pretty basic yes, but why in the base system?

Generating /etc/fstab

Should /boot come before /var and /home or does is at all matter to spend time mounting boot when using UEFI? Of course it should be mounted when doing sysupgrades, but otherwise?

More updates to come!

Sunday, December 29, 2013

The toughest job aka creating server/client certificates

The reason why is pretty unimportant, and frankly I don't know what I did to have it working. But suddenly it did.

The task is to have an apache server use SSL with client-certificates for authorization. No problem, you just create your own CA, issue a server certificate, issue a client certificate and convert to PKCS12-format for consumption in your favorite browser, right? Not so fast!

So I made a gist walking through the steps: https://gist.github.com/nwillems/8172932

My starting point was this: https://code.google.com/p/migrid/wiki/ServerInstallNotes#Certificates_-_Manually

And intermediary process has been a lot of googleing seeing all sorts of procedures to accomplish something similar, and then not yet. Some resources has been:

That pretty much sums it up - have fun authenticating with your new certificates. 
Have a happy new years :-)

/Willems

Sunday, October 9, 2011

Restoring your initramfs

So a couple of days ago I ran a system upgrade on my arch-box(also my primary laptop), it told me that I needed to upgrade to 3.0 kernel. Cool I thought and went through. And after fixing some driver problems, I accidentally crashed my initramfs - no booting for me. I guess you know the problem, since your here, so read on and get the answer.

I must say, this article wouldn't have been, if it weren't for the Archlinux wiki and the IRC channel. Thanks to falconindy, Hattara-pilvi, brain0. Andd thanks to d_garbage for finding them in his logs.


Tuesday, January 11, 2011

Step one of my website

This post focuses on the initial step I took to have my new website up and running. The domain part.

What is assumed here is a little understanding of Linux and a some drive towards getting things done.

First I had to find out how my provider(GratisDNS) would like the data - luckily for me it turned out that I only have to provide very few parameters in a URL String and then it would automigaclly read the IP from where I sent it. All set with the information, now on to creating a little script.

Wednesday, September 22, 2010

Its time or what?

So I started working for real. I got offered a full-time job where I was employed as a student-worker. So I've gone full-time working and left the studies for a year. So currently I'm working for Zylinc A/S, danish company in IP-Telephony making switch-boards.

So today while I was working, there was some problems with time formatting in my project. The project is a common data access layer for a bunch of Java portals. And since my main focus is statistics I work with dates and time. All date's and times in this post is in 24hr and date/time format is as following YYYY-MM-DD HH-mm-ss[1]

First things first
I found out that MySQL handles date/time strangely, compared to the SQL standard[2]. According to the standard TIMESTAMP is a type containing date and time information in a format like "2010-09-21 22:21:20". This seems obvious, furthermore two types are definied, DATE which consists and contains only the date part(2010-09-21) of a TIMESTAMP value, and the second being TIME containing only the time component(22:21:20).

All this is fine and looks good. But what about the real world? Thats where MySQL comes in. Imagine you have a stored procedure, let's call it foo it takes two parameters(eg two sets of date and time) and returns the recorded statistics in the interval. So based on our knowledge from before we write a procedure like this:
Delimiter $$
DROP PROCEDURE IF EXISTS `foo`$$

CREATE PROCEDURE `foo`(
    param1 TIMESTAMP,
    param2 TIMESTAMP)
BEGIN
    SELECT BeginTime, EndTime, ... FROM Statistics
    WHERE BeginTime >= param1 AND BegindTime <= param2;
END PROCEDURE$$

This seems like the correct way to do it, but not surprisingly it isn't. See this discussion: http://stackoverflow.com/questions/409286/datetime-vs-timestamp. So this means my procedure definitions should look like this instead:
Delimiter $$
DROP PROCEDURE IF EXISTS `foo`$$

CREATE PROCEDURE `foo`(
    param1 DATETIME,
    param2 DATETIME)
BEGIN
    SELECT BeginTime, EndTime, ... FROM Statistics
    WHERE BeginTime >= param1 AND BegindTime <= param2;
END PROCEDURE$$


All right, so this works for MySQL, does it work for MSSQL to? So it seems(I haven't studied this further, since it isn't something I'm going to use - but soon as I need it, I will write about it).

Enough about types, what does a DATETIME value accept? I've found several ways of interacting with it
For example you can pass in this value:
"2010-09-21" - goes fine, a warning should be raised
"2010-09-21 22:21:20" - expected, all goes well
Theese above values seem logic, but then comes:
NOW()-0(=20100921222120.000000) - Strangest value I ever seen.

What does this mean? Can I use a value like 1285107680(Epoch time for the example date) or would that mean: 1285-10-76 80:00:00 or 0000-12-85 10:76:80 or how? I'm seriously confused about this. Not that I found a real solution to this problem, I'm now just aware of this behavior. As I wish you now are and will take this into consideration when developing with MySQL.

Second comes java
First it is important to know what the Epoch is.What I'm talking about is the UNIX Epoch, better known as seconds since 1970-01-01 00:00:00 UTC. Everybody's talking about it, it is the universal time representation for all sorts of things, even windows developers uses this format. But in the Java world, seconds is not good enough, understandable somehow.

Drawing on the good old examples milliseconds can be quite important doing stock trading but come on, at least make it compatible with the rest of the world, an approach where integer values are treated as UNIX Time and the decimal part(if using a float value) as milliseconds, and if you like, you could have nanoseconds(hows that for your stock trading needs?). I spent half a day figuring this out, looking at output from stupid tests being confused. Documentation should state this more clearly[3].

So thats almost everything from an exciting day at work - unless some extremely interesting stuff comes by, I plan on writing a little jump start tutorial for MyBatis[4] tomorrow, I found some interesting things they didn't put in the manual. Btw: I also did a contribution to Stripes web framework[5], I hope that when getting a little deeper into MyBatis I can make some contributions there to.

Have a great evening - and happy coding out there.

[1] = See this for reference http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html
[2] = ANSI SQL http://en.wikipedia.org/wiki/SQL#Date_and_time
[3] = So now I've done it, hope google catches this.
[4] = http://mybatis.org/
[5] = http://www.stripesframework.org

Wednesday, April 14, 2010

Adventure with LFS

In this post I will explain what I'm doing this time in my vacation. A rather interesting project I think.

So LFS, what that? It's Linux From Scratch, building your own Linux, all from the bottom.
It has been my dream for ages to do this, and right now, I'm doing it. At the moment I'm compiling gcc second pass.

It really feels good, even though it sounds intimidating. A little History:
First I booted up a virtual machine and attached the Arch live ISO, but it didn't have GCC, and after hours of downloading packages I died a little. Then I took my good old laptop(IBM Z60m) and installed a fresh Arch Linux, with everything needed to get online, and everything needed for the LFS build(The host system requirements).

And off I went, until I encountered my first doubt, and thought OH NOES! and I was thinking a hell lot, until I remembered IRC, went online joined the LFS channel on freenode, saw that LFS has its own IRC-Network, connected and asked my question. These people are more helpfull than the ubuntu channel on freenode. So don't worry, theres a lot of help out there.

You can check it out at http://www.linuxfromscratch.org/. I'm planning on setting up me webpage, which have been bad and not really existing for a long time. And then publish a source and a patch list, which I will try to keep up to date. Besides that I'm thinking of a build script, that automates the process. But first I will compile and make my own system, then we'll see how the build script looks.

If you have already started compiling, then theres only one thing to say: Happy compiling fellow LFS'er.

/Nicolai

Saturday, March 6, 2010

My new favorite server

While developing my own application server I've discovered several other wonderful examples of this kind of applications.

Lets not wait anymore, my favorite is so far Apache Tomcat. It has a nice modular architecture that provides you with the ability to develop new interfaces, it already has AJP and HTTP implemented, but you could just implement what ever you wanted, thats nice.

The configuration is straightforward and the community is good(I've tried the IRC, a bit slow, but really good).

I won't go into examples, because I have not yet developed one. But be assured that this is a good product, can't wait till the new version comes out(v7)

Next up, is another geeky post, about my adventure with LFS.

Monday, January 18, 2010

Developing an application server/foundation

An application server you ask? Yeah an application server. Stolen from wikipedia:

"An application server is a software framework... The term was created in the context of web applications. In these, the application server acts as a set of components accessible to the software developer through an API defined by the platform itself." - Wikipedia[1]

So thats an application server. Then why the "/foundation" in the title, well because I will not create something that has been developed like that for years - maybe even centuries. I will strive to make software that is somewhat innovative, Proof Of Concept but still usable in production.

This application foundation - down to business - is what I would call a full build and deploy platform, you build your application with your favorite IDE and deploy it via, say SVN or Git as a normal commit, maybe you have a configuration (web/desktop)interface or its part of the commit.

I did a bit of analysis and found out what is needed to do this, I looked at my previous projects and some structure of current applications. I found out that the following is needed:
  • Data store - normally a (R)DBMS, but flat-files would do
  • A way of communicating with the world - a web interface or a stream
  • A way of managing deployed applications - by desktop or web interface
  • A way of deployment - SVN or Git
And i pictured this in my head as follows:
This is quite a simple structure, but researching for the needed components I found out that it isn't. Since I have chosen to develop in Java[2] and since this is an Object Oriented language, I found it natural to choose an object oriented database management system(ODBMS) and with that in mind I immediately thought of Java Data Objects developed by Apache foundation. That is just not as simple as thought.

So after this brief outline, I can tell you that I'm looking for some smart heads to help design and develop, AND that I'm struggling with maven, JDO and looking into Glassfish[2] and Tomcat[3] -since these look like a solid foundation to start from.

Also I've found a working title to the project OpenApplicationServer - OAS

/Nicolai

[1] Application server. (2010, January 15). In Wikipedia, The Free Encyclopedia. Retrieved 22:45, January 18, 2010, fromhttp://en.wikipedia.org/w/index.php?title=Application_server&oldid=338074250
[2] This is not the final choice, but I have no intention on leaving the OO world

Friday, January 15, 2010

Getting up-to-date(How to upgrade netbeans on ubuntu)

So sitting this evening/night trying to find out how to update your Netbeans on ubuntu, since the ubuntu repositories dosen't provide it yet. Same as with many other products you would like as a developer.

It should be noted that Netbeans can coexist with earlier versions(in my case 6.7.1 and 6.8)

*EDIT* As you can see in the comments this is not the official way of doing this - Perform the following at your own risk, I will gladly try to help in the comments section but no warranty is guaranteed.

So down to business enough talk.

Go to Tools->Plugins

under the tab "settings" you should find different items, they should be named something like: Netbeans, Third-party and Netbeans beta.

You should edit each of these items accordingly to the version you need. In my case I had to change the urls from:
http://updates.netbeans.org/netbeans/updates/6.7.1/uc/final/...
to:
http://updates.netbeans.org/netbeans/updates/6.8/uc/final/...

After editing each entry the plugin manager should check for updates, and as of writing there were 2 updates after this procedure. I updated these and when I restarted Netbeans I checked for updates and had a whole bunch.

I hope this will help somebody out there as lost as I am on the netbeans website.

Sunday, March 8, 2009

CeBIT

Woooo... så er vi lige kommet hjem fra CeBIT!

Her er lige links til højdepunkter, skriver nok lidt om dem når jeg prøver dem lidt mere!

Fra toppen og ned
pardus er en tyrkisk linux distro
just in mind er prototyping værktøj
semantic mediawiki er web3.0 til wiki
chickipedia er en wikipedia der bruger semantic mediawiki
teamdrive er collaboration, syncplicity featuring groove
antme er et edutainment værktøj til VS2008
lecture på facebook
Zarafa er open source exchange! Woooo

Håber i får noget godt ud af det!

Thursday, September 4, 2008

jeg vil også være med - chrome

så for satan, wruun sagde det i morges. Jeg hentede chrome og lige pludselig blev mit liv en smule mere fischer-prise/google. Jeg sidder og leger lidt med google chrome. Det sku en dejlig browser og nu slår det mig, deres logo ligner en pokeball, what.

Lige der, det ligner sku lidt.

Men ellers er jeg godt tilfreds. Da jeg læste om det i forgårs på googlebooks var jeg meget skeptisk da jeg mest af alt syntes det ligner min nuværende browser(opera). MEN(ingen skeptisme uden et MEN) jeg var godt nok overrasket da jeg kom igang med den. Og er stadig glad for den, så jeg sidder faktisk nu og skriver det her blog indlæg i chrome.

For det første er den hurtig, hurtig afhelveds til.
For det andet er der jo næsten intet interface, den overlader til en om man vil bruge musen eller genveje
For det tredje så minder den for mig meget om opera, bare bedre. Lidt ligesom stryhns leverpostej, bacon postej er bare bedre.
for det fjerde og for det femte og for det sjette.. jamen der er så mange ting at jeg kunne gå helt amok.

Dog har jge ikke gjort den til min standard browser endnu, skal jo lige migrære eller noget. Arj, jeg er ikke meget for beta produkter på min computer, udover web-apps.
Som chrome jo er mere eller mindre bygget til at håndtere, så nu jeg glad. OG så gik jeg på office.live.com for at tjecke office live workspaces ud, så var der er silverlight præsentation som den loadede halvt, men den loadede i det mindste noget :O woot woot.

Og så må jeg sige, flash virker upåklageligt, ja du læste rigtigt, flash virker uden problemer. Ikke noget med at geninstallere flash eller andet gøgl, det virker bare.

Som du nok kan læse er jeg MEGET begejstret, men der er stadig et stykke tid til jeg er endeligt overbevist. og så mangler der lige et par features.

Over and out, jeg skal surfe :)
/Nicolai

Choose a month: