Πέμπτη 26 Απριλίου 2012

Arch linux dbwrench2 aur package

####file PKGBUILD

##################################################
# Contributor:  Miguel Useche
# Modified by: Stelios Albanis

arch=(i686 x86_64)
pkgname=dbwrench
pkgver=2.2
pkgrel=1
pkgdesc="Database design & synchronization software"
url="http://www.dbwrench.com/"
license=('freeware')
depends=('java-runtime')

source=(http://www.dbwrench.com/download/files/dbwrench2.zip)
md5sums=('940318be6872647fd86dd616e7ea08a3')


build() {
  mkdir -p $startdir/pkg/usr/share/
  cd $startdir/src/
 
  mv $startdir/src/dbwrench2 $startdir/pkg/usr/share/dbwrench
      
}

###################################################

run

makepkg -si

and (as root)

makepkg -U dbwrench-2.2-1-x86_64.pkg.tar.xz








Παρασκευή 6 Αυγούστου 2010

kapistrano + mercurial me timbers

Ok so you will be bugged once more.

I have decided to use capistrano to upload one of my projects in symfony to cpanel.

The source control i am using is mercurial, oh wes we love mercurial.

So i set my control source to reploy.rb to mercurial with http authentication.

oh god why did i do that.

i searched the internets trying to find for answer 'how to authenticate capistrano with http method'.

my deploy.rb looked like this

####use this for the command prompt to work
default_run_options[:pty] = true

set :repository, "http://my_host/mercurial/my_project"
set :scm, :mercurial
set :scm_prefer_prompt, :true

so i run the cap deploy:cold

http authentication appears, welcome to my mercurial repo blah blah.
username:

my_user

i am hitting the enter and nothing happens, so i say its ok i will search inputs in ruby, internet failed us. so i am thinking what to do what to do
and it hits me instead of the http lets use the ssh method to retrieve from mercurial.


so i enter these options to my deploy.rb.

default_run_options[:pty] = true

#####local
set :repository, "ssh://my_user@my_host//my_path_to_the_repo/my_project"
set :scm, :mercurial
set :scm_prefer_prompt, :true

and voila cap deploy:cold

asks for ssh password and hg asks for another password.
my_user connects through ssh and retrieves the mercurial repo.


and if for some reason you need to set the ssh port this is the command you should put in capistrano config.

ssh_options[:port] = 22000


i hope you haven't been bugged too much.

kapistrano + cpanel me timbers

Ok so you will be bugged once more.

I have decided to use capistrano to upload one of my projects in symfony to cpanel.

So the home of each user in cpanel is of the form

/home/'my_user' for example /home/test if your user is test.

so i set deploy_to in deploy.rb

to

set :deploy_to, "/home/knightmare"

i am entering cap deploy:setup (and the web server goes error 505)

No php script was working in my cpanel public_html and i and i have been wandering what goes wrong and what goes wrong. No help in the logs nothing to be found,
except from public should not be writeable by the group and i can find sys_cpanel.i have fixed the not writeable group for the public but not the sys_cpanel.

And after several hours of debugging in the the air i am entering cap deploy:setup

and i view in the screen chmod g+w /home/knightmare.

And i say what the ......

so that was it my pain my agony with cpanel. capistrano has been doing the deploy path writable to group.

i restored the home with chmod 755 /home/knightmare and everything was fine now, the web server was back to normal.

Κυριακή 1 Αυγούστου 2010

Having fun at Neoi Poroi

Having returned from Neoi Poroi, a very nice resort for tourists 1 hour from 8essalonikh and 20 minutes from Larissa, I have been bugged to write once more for our adventures with our tourist agent. But let's start from another point of view.

For starters, we have decided to go on vacations. Yes its summer but I think you already know that. We searched on the internet and tried to find a nice studio so that we can stay for 1 week. We called several studios, but we seemed to like one a lot. Evi tours seemed to be our missing piece for the puzzle. In the beginning everything was fine. Oh yes she loved us. I had been to neoi poroi once so there was no problem for me to understand everything. The agent has under her manage 3 studio houses (Mpesi – Natali and Niobi). I told her that we will be going by train and she suggested that I should take the expensive one near the station (15-20 minutes from the sea). I said that we didn't need it and that we wanted a room in mpesi. Room closed, payment sent (from 280 euros 100 euros) ok.

After 1 week and 6 hours travel we reached neoi poroi. A magnificent place for tourists. 10 minutes from Platamonas. At 12 o clock we have decided to go and meet with evi at evitours (a handshake meet let's say). She told us that the room wasn't ready and she asked me for the rest of the 280 euros in advance ( oh yes ). I told her I didnt have that much money on me and that we would return when she had the room ready. She told me that the room would be ready on 13:30 and she suggested that we should drink a coffee. On 14:30 we decided to go get the room. She asked us for 180 euros and I asked to see the room (I was paying in advance so I wanted to see what I was paying for) and she told me didn't you see It in the internet?Ehm yes I said but we want to see the room. So she asked one of her employees to show us the room. At a first glance the room seemed ok. We went back, paid (she told us how to use the air condition and asked us not to call if anything goes wrong) and took the key and the controller to the air conditioner and we walked for 10 to 15 minutes to go back to the room. Upon reaching the room for starters it had nothing to do with the photos, photos were nice and the room wasn't. The room has been cleaned very messy. We found water in the bathroom everywhere, a toilet paper inside the toilet, a blanket inside the cabin up side down and no toilet paper. So I go down furious to find a manager forthis studio apartments (I remind to you that the only manager was the evi tours agent 15 minutes walk) . And oh yes there was nobody to be found. The thing is that the office closed for noon and so there was nobody to contact. In the afternoon I called I asked for some other staff, ( soap, towels, my bad ) and the toilet paper. She said there should be one inside the wc. I told her there wasn't and we closed the phone. After that we heard a knock on the door. I asked who it was two times and nothing. So I opened the door and found a toiler paper (used) outside our door. Oh yes you have guessed correctly if anything happened to the room, we were badly doomed there was nobody to help us. Thank god everything went fine. On the last day we said that we would leave on 12 o clock as evi has told us to bring her the key by 12 o clock. And so we packed our staff and went out to the balcony for some watermellon and out of the blue oh yes one of the staff members. She asked me what time are you going to leave (no problem here). We will leave in about 1 hour and 30 minutes ( 11:30 ) and she said to me by 11 o clock you must have left. (oh god what the???? yes we know).so at 11 o clock we hear a knock on the door a woman from the cleaning staff comes in tosses some matresses on the bed and leaves,she asks when are we going to leave and we tell her that we will leave on 5 minutes.so we take our bags and we go to evi tours to speak with evi. Oh yes she heard nothing (you came early, I told you to leave by 11 o clock,you ignored the cleaning girl), she blamed us for everything.Oh yes she has lots of customers and all rooms are full so she didn't really care to apologise to us. To be honest mpesi was in a good position and our room 16 had a nice view. But the agent office was very bad it gets a symbolic 3 / 10. Well if you think that we are trouble makers the only thing that we wanted to hear from evi is that they were sorry but instead she didn't and she insulted us a bit more so I think a three is a good number for such service. The oven on the olympos street had very nice croisants. The train to platamonas was very nice. And do not forget to rent a double – quadriple bicycle in the square you get the train to platamonas (a shop with pools and electronic games) at the left side, very fun experience very good people. Ose was nice too.

I hope I haven't bugged you too much.

Τετάρτη 18 Μαρτίου 2009

Hardware Linux Raid Controller (Fakeraid)

Having searched the whole internet and finding information that were scattered i have decided to write a howto how to setup a hardware raid controller on linux. The most threads that i have read say that when a motherboard implies that it has a raid controller it doesn't and it just uses bios software to controll the raid (Software raid controller). Most users say that the best think to use is the software raid controller (mdadm) and i mostly agree with that.

But if for some reason you need to use the hardware raid controller then follow these steps

So things are really simple,first read your motherboards manual. In my motherboard (Asus) i configured the bridge to use mirroring raid,also told it which drives to use (raid1 and raid3).

Checked the boot sequence (1 boot hard disk you put the array raid)

So after i rebooted, my bios prompted me for f10 to create the array raid.There you just choose which drives you want to combine and what mode you want to use (mirroring and sata1+sata3).

From the bios+hardware point of view you are ready.

After that i downloaded the debian lenny cd and before pressing the install i pressed e added dmraid=true to the parameters.

When prompted to format the hard disk i saw this in the position of the two hard disks ar01_nvidia_raid. You format accordingly to your needs.

Continue accordingly with your debian installation and install the grub to the mbr of your raid hard disks.

Voilla hardware raid controller accomplished. If you need to use remember to use the software raid controller (mdadm) and not the fake bios hardware raid controller.

Good Luck.

Δευτέρα 14 Απριλίου 2008

Cherry Pies

Recently i decided to learn about web python frameworks.A friend of mine suggested that i should use CherryPy.

what is CherryPy though?Taken from its web site:
"CherryPy is a pythonic, object-oriented HTTP framework."

CherryPy can be downloaded from the following link.
http://www.cherrypy.org/wiki/CherryPyDownload

If you have allready messed around with these kind of web frameworks you would know that by default they usually run their own web server.But what happens when you want to associate Cherrypy with apache. There are many methods to associate CherryPy with apache . The one that i wanted to use was the combination of cherrypy + mod_python.Trying the configuration from the tutorial , it gave me a working server with the use of apache mod_python , but i lost my web directory which i didn't want it to happen , so i decided after a bit of searching and failures to mess arround with the virtualhosts of apache and this is the result.


Listen 8888
NameVirtualHost *:8888

< VirtualHost>
DocumentRoot "/"
ServerName localhost
< Location>
Options FollowSymlinks
AllowOverride None
Order deny,allow
Allow from all
SetHandler python-program
PythonHandler cherrypy._cpmodpy::handler
PythonOption cherrypy.setup myapp::setup_server
PythonDebug On
PythonPath "['/home/cherry/'] + sys.path"
< /Location>
ErrorLog "/var/log/httpd/error_cherry.log"
CustomLog "/var/log/httpd/access_cherry.log" common
< /VirtualHost>


After that i was able to link to my cherrypy site through this link.
http://localhost:8888/

While messing with cherrypy , you will see this interesting error in your web browser "Unrecoverable error in the server" , but nothing about the error that caused it.After a little search through the internet i found this interesting patch which brings the error closer to you.


--- _cpmodpy.py
+++ _cpmodpy.py
@@ -202,7 +202,7 @@
except:
tb = format_exc()
cherrypy.log(tb)
- s, h, b = bare_error()
+ s, h, b = bare_error(tb)
send_response(req, s, h, b)
return apache.OK


Also another problem that occured to me was with the PythonPath,tutorial of cherrypy suggested that the PythonPath should be like this

PythonPath "sys.path+['/home/cherry/']"

after a little bit of search,django helped a little , i found out that you should put your python folder first and after that the sys.path.

PythonPath "['/home/cherry/'] + sys.path".

And just because i mentioned django here is a link about it

http://www.djangoproject.com/download/

Τετάρτη 16 Ιανουαρίου 2008

Καλό Βόλι

Ελπίζω να μην σας πρήξω αρκετά με το blog μου.

Υγ:Ο λόγος που φτιάχτηκε είναι για να τοποθετηθεί ένα how to για arch installation.Ένας θεός ξέρει πότε θα ανανεώνετε.