Move your svn repo with “switch” and “relocate”
Sometimes repositories move, or they simple change a url and then you are left with a checked out version that no longer can do updated.
Subversion ships with a “switch” tool that accepts a “relocate” input.
The correct usage is:
svn switch - -relocate http://old.url.com/trunk http://new.url.com/trunk/
You have to be really careful and double check the url’s or else you will be left with a broken repository.
August 22, 2008 No Comments
Return home directory in Python
I had previously used something like( which works OK):
commands.getstatusoutput(’echo $HOME/’)
But I think this is much better…
os.environ.get(’HOME’)
August 13, 2008 No Comments
Show content from another server (Apache2)
Somehow, if you have 2 servers or sites and need to include on of them within the other without doing any copying of files or moving stuff around, there is a simple way to do this with the proxy module in Apache.
To enable mod_proxy you can do:
sudo a2enmod proxy
sudo /etc/init.d/apache2 reload
After this, remember that this module will break your inbound connections if you don’t change this part of /etc/apache2/mods-enable/proxy.conf:
Deny from All
To:
Allow from All
Another Apache reload an you should be good to go.
Now get to the Virtual Host file and add this after “ServerName” and before any “<Directory>” or “<Location>”
ProxyPass /newfolder http://other-server.com/
ProxyPassReverse /newfolder http://other-server.com/
Another Apache reload and you will correctly have the content of other-server.com in the non-existent “newfolder”.
July 6, 2008 2 Comments
Install Vmware on Ubuntu Server
This is a problem, since a server doesn’t come with all the libraries Vmware needs to run.
It took me a while to get those since the vmware-config.pl script is not to explicit as to what is missing.
If you get these installed you should be good to go to complete the vmware install:
sudo apt-get install libx11-6 libx11-dev libxtst6 libxrender1 libxt6 zlib1g
July 3, 2008 No Comments
Playing with Fluxbox
I have started to use Fluxbox on my personal laptop. I like it so much that I will soon make the change for my work computer (yes, I am allowed to use Ubuntu at work).
Fluxbox is a extremely light desktop environment for Linux and I found it by chance when using ophcrack live cd at work to solve a problem trying to crack a windows password from an old computer.
You can try it without messing anything on your Gnome or Kde setup. Just do:
sudo apt-get install fluxbox
Then logout and select “Fluxbox” as your session before you login.
This file is my (ongoing) effort to start customizing shortcuts.
Just a note to new users: the menu is found by right clicking on an empty space on your desktop.
June 29, 2008 No Comments
disable system-beep
The easy way to do this with the desktop environment is easy. But this is the way to do it at the command line.
At the end this way is better since you will be able to do it no matter what desktop environment you have. System Beeps are annoing anyways, right?
So open and edit the blacklist file:
sudo vim /etc/modprobe.d/blacklist
Add this line:
blacklist pcspkr
The remove the module:
modprobe -r pcspkr
Nothing of this is permanent though so you can revert back just enabling the module and commenting out the line in the blacklist file.
June 29, 2008 No Comments
Install mod_proxy
Had some issues the other day trying to get mod_proxy to work.
It seems it doesn’t come with the default modules in Apache so I had to go and get it (beware! before installing keep in mind it restarts apache once its done!):
sudo apt-get install libapache2-mod-proxy-html
This is kind of weird naming convention for that module, it took me a while to find it. After placing the correct rules in the VirtualHost I was getting access denied.
This is because mod_proxy has a configuration file in /etc/apache2/mods-enabled called proxy.conf that comes with a security rule of:
“Deny All”
You will have to edit this (I changed it to Allow All since I wanted all traffic available) according to your specific situation.
One final reload of Apache and everything was working again:
sudo /etc/init.d/apache2 reload
June 5, 2008 No Comments
Email ticket support (helpdesk)
I give up with helpdesk solutions out there.
More specifically these solutions:
- OTRS (Open ticket Request Service)
- OsTicket
- eticket
- Ticket-IT
- OpenIT
- RT (Request Tracker)
- Epix Power Support
I could keep the list growing but I seriously give up. This might be the first time ever I have encountered a problem that many have tried to address with their applications but few (or none?) have succeeded.
A support ticketing system, is basically designed to streamline issues requested by users to people who will eventually solve them. Having said that, there has to be 2 ways to accomplish this:
Via email
Via web-form
On the above applications they fail to accomplish this in an easy, straight-forward way. Some of them (like eticket) rely heavily on receiving tickets via webforms but require installation of mail-server packages (which require extra configuration they don’t provide) to enable receiving tickets via email and sending email answers.
You can’t be offering an application that is not complete, that deppends on other applications with different configurations (who knows how many different configurations are needed to get things working!) and with little or no documentation on how to accomplish putting them together to work.
It is not hard to have an application to receive an email and create a ticket, be able to send email answers and be able to receive tickets via a webform.
But why have I spent the last 2 weeks installing (and eventually removing) support ticket applications without finding something that is really worth it?
April 23, 2008 1 Comment
MySql won’t start
I had to move a server from one place to the other (including a different subnet) and when started, the server wasn’t able to start MySql.
First thing to check is the System Log (/var/log/syslog) and here is what I found:
mysqld_safe[438]: started
mysqld Can’t start server: Bind on TCP/IP port: Cannot assign requested address
mysqld[442]: 050714 8:54:57 Do you already have another mysqld server running on port: 3306 ?
mysqld[442]: 050714 8:54:57 Aborting
mysqld[442]:
mysqld[442]: 050714 8:54:57 /usr/sbin/mysqld: Shutdown Complete
Since I confirmed I didn’t have any other instance of MySql running and couldn’t start it at all I went to check the configuration for MySql located at /etc/mysql/my.cnf
The problem is that my.cnf had the old IP from the previous location. Since we moved the server from one subnet to the other, Mysql wasn’t able to start because it had another IP present.
So instead of having an IP in my.cnf I changed it to ‘localhost’ and that did the trick.
March 31, 2008 No Comments
SVN client
I was looking for a good subversion client for Ubuntu.
After a while, I finally found something worthwhile if you need something as close to TortoiseSVN (coming from windows):
sudo apt-get install kdesvn
It is initially intended for KDE but works very well under Ubuntu.
March 20, 2008 No Comments