ubuntu server

mysql does not update

*Sigh*, again, a problem with mysql on my ubuntu eee-box server. This time, I could not update the fix package for mysql-server.

It turned out that there was a user missing – but NOT, as I initially thought, a Linux user, but a mysql user. I found an entry in the ubuntu forums that helped solving the problem.

It seems as if mysql is kind of a…. tricky platform. I seem to run into problems all the time… thank goodness everything still works flawlessly…

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

MySQL stopped working after update

After an upgrade from Ubuntu Server 9.04 to 9.10, mysql stopped working.

In /var/log/messages, I got a lot of these errors:

Nov 10 22:07:50 eee-box kernel: [ 6223.686375] type=1503 audit(1257887270.326:66): operation="open" pid=3345 parent=3344 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"

After google-ing a little bit, I stumbled upon a page that described this error quite in length; bottom line to fix this was the following:

First, I deleted the my.cnf file in /etc/mysql (i. e. I moved it to a backup folder). I also moved away all files in /etc/mysql/conf.d. Now, there was a file in /etc/mysql that was named my.cnf.dpkg-dist or something – I copied it to my.cnf

Now, mysql started again properly. Also, funnily enough, my mediawiki envirnonment works flawlessly – although I was under the impression that I had to tweak my mysql environment quite a bit (see this post).

Anyway – the only thing left to do was setting the bind_address in my.cnf to my server’s ip, because this is the way it used to be configured all the time and a lot of webapps depend on this.

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

Change the boring motd when login to my server

12.07.09, 12:51 | Tags: ,,,, | No comments
SSH-Login to my server

SSH-Login to my server

Whenever I ssh to my server, I get this boring standard Ubuntu message…. and in addition, my prompt is not as colorful as I want it to be….

To get rid of the latter problem, I just changed a line in my ~/.bashrc file:

force_color_prompt=yes;;

(I hade to uncomment it)

To fix the first problem, I first installed fortune and cowsay (this post helped):

apt-get fortunes
apt-get fortunes-off
apt-get cowsay

And then, I added this line at the very top of my .bashrc:

cowsay -f dragon "$(fortune)"

This is more like my style… :)

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

Finishing the eee-box installation

It’s been a while since I blogged about the installation of my eee-box – and my intention to use it as a server.

Of course, I did some basic installation in the meantime – and the box is now running perfectly. :)

So – here’s the final chapter in this two-part series, and a list of everything I did to get the box up and running:

Basic tools

The first thing I missed was my good old vim – easy:

sudo apt-get install vim

did the trick. :)

I then made sure that updates happen automatically – there’s a good page on that in the serverguide, and all I had to make sure was that mailx was installed. Logwatch is also an option – but only after a mailsystem is up and running (see below).

Web-Stuff

MySQL installation was pretty easy: I followed the server guide’s page on this, and then created also /etc/mysql/conf.d/charsets.cnf (Download here) – this helped me get rid of some UTF8-errors on my old gentoo box already…

I then made the mysql server accessible from the outside by adding

bind-address my.ip.addr.ess

into /etc/mysql/my.cnf, then following this excellent website that explains everything on how to remote access a mysql database.

After that, I installed apache2 – again, the server guide’s page on that subject includes everything necessary. The guide’s page on PHP also has a lot of good information – I ended up installing php5, libapache2-mod-php5, php5-cli and php5-mysql. Finally, I created a phpinfo.php and deleted index.html, in /var/www.

For the usage of automatic WordPress updates, I also installed an ftp-server – again, just followed the server guide. In WordPress, when installing a plugin, I then have to enter “localhost” plus my local user name plus the corresponding password, whenever it asks for a connection information.

Finally, I installed mediawiki; the packages to install were mediawiki, mediawiki-math, imagemagick and php5-gd; the installation itself is again covered in the server guide.

After the configuration of mediawiki (make sure you use the old backward-compatible charset!), I enabled TeX and uploads and moved my old mediawiki according to my own blog entry (hey – they start to come in handy!!)

For some reason, I had to change the password of my mediawiki admin user after that – luckily, I found this blog entry… and then, I installed the cite extension – again, I followed my own guide on doing so. :)

Samba

For Samba, the installation was really easy; the corresponding page on the ubuntu server guide explains everything needed. All I had to do was to smbpasswd my working user – and everything worked. While I now have a nice NAS, I still wanted to be able to access my home share from outside – mainly due to filesharing, see below.

Mailserver

The mailserver is always a little tricky; I decided to go with dovecot, postfix, procmail and getmail. I started with dovecot (only use the instructions relating to dovecot, not the ones relating to postfix!), and for a proper postfix installation, I closely (!) followed this doc (also, I had to install procmail in order to get over this flawlessly). I created an alias for root pointing to my working user, as explained here. And finally, I installed getmail, as explained on howtoforge.

It took me three attempts – but following these documents in the given order should do it.

Filesharing

While I obviously know that filesharing involves a lot of illegal (or at least…. grey) activities, I still use it – how to get an ubuntu ISO file faster than via bittorrent? Not to speak of all the great american tv shows that you just can’t watch around here (not even DVD’s are available, sometimes….) – so, I still rely on bittorrent and, sometimes on mldonkey. The basic instructions I noted down a while ago were useful, when it came down to configuring mldonkey (it’s config files are in /var/lib/mldonkey…)

As for bittorrent, I highly recommend to go with devinw’s installer package that installs lighthttpd, rtorrent and wtorrent – it’s in the ubuntu forums and it worked after a couple of problems – read the forum entry in case of troubles!

Backup system

I then installed rsnapshot and configured it, following the work I did a while ago.

Upgrade to 9.04

Final step was to update to 9.04 – there is a good instruction provided by the canonical folks on how to do so.

The box now runs for something over 2 months – no problems, AT ALL! :)

Maybe I’ll go ahead and try some anti-spam solution, once again…. :)

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

OpenSSH on eee box

26.03.09, 21:23 | Tags: ,,,, | No comments

I actually wanted to do another podcast on this one – however, installing OpenSSH was this simple that I decided against it.

In fact – all I had to do was to

apt-get install openssh-server

And then, in /etc/ssh/sshd_config, I had to alter one line to disallow root to login – and that was it…. Nothing to podcast, really…

Also, I realized that I just can press the power button – and the eee box (or rather, Ubuntu server) will shut down….

So – the box is now really ready to have a webserver installed – and of course some fancy e-mail solution – and a bittorrent client….. but more on this next time.

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon