Archive

Archive for the ‘Article’ Category

Common Linux Server Administration Commands Summary

April 19th, 2010 Frank No comments

One of the most difficult aspects of starting to use Linux– a server distribution in particular — is remembering all of the different command line programs that exist in order to aid your work.

Obviously, man is a great reference but that is actually difficult to use when getting started as it itself is a command line program. I was searching for a command to list all of the users on a system (I found it and will post a brief article on that soon) and I stumbled across this, so I wanted to share it (as well as retain it for future reference.)

http://www.reallylinux.com/docs/admin.shtml

This covers such things as:

  • Networking information / status (arp, ifconfig, netstat, etc)
  • File system information (df)
  • Disk Size / utilization information (du)
  • How to search for files with find
  • Easy-to-use console text editors (nano, joe)
  • Process management / information (ps, top)

In addition to listing the commands, it lists common usage scenarios and command line flags of note.

Mongoose – A web server in C

April 14th, 2010 Frank No comments

A bit ago now, I introduced the tOSU-WebServer which is a web server for educational purposes. As explained in my other writings that web server is simple and is not suitable for production use, though it could be modified and improved for that purpose.

I was flipping though Linux magazines and came across the Linux Journal’s article on Mongoose. Mongoose is an open source, self contained web server written in C and implemented in two files.

It is significantly more difficult to understand than tOSU-WebServer, but it has a lot more features. Also, the fact that it’s written in C (as is Apache 2) might be appealing to some.  I hope to explore it’s API a bit but I’m not sure I’ll do any formal articles on it. If you can follow the implementation details of tOSU-WebServer, you should be able to orientate yourself on Mongoose (assuming you are familiar with C).

The source code repository and project information are located on Google code: http://code.google.com/p/mongoose/

Move a MySQL database – How To

April 13th, 2010 Frank No comments

I had to move one of my databases from the main OS drive to a different partition. Being that I’ve not administered my own mysql database before — nothing beyond SQL level administration — I needed to find some sort of guide. I found the following and was quite pleased; I thought that other might be able to use this.

How to move MySql database to another drive or partition.

While this post is not strictly about the internal workings of an open source software package, it does have to do with the administration of notable open source software and hence, worth this blog’s posting.

The one thing to note is that the instructions seem out of date. The instructions were written using Ubuntu Server 7.10 (Gutsy Gibbon) as a basis. The instructions worked for me except for the apparmor note below. I’m currently using Ubuntu Server 8.04 LTS.

You many need to modify apparmor’s configuration file and then restart the service.  You can see the conversation in the comments (on the article) about it, but the brief version of it is:

  1. Complete the main instructions first (Understand the entire article before starting.)
  2. Open nano /etc/apparmor.d/usr.sbin.mysqld
  3. Modify entries pointing to the old location to point to then new location. This will look like: /var/www/mysql_datadir/ r, /var/www/mysql_datadir/** rwk,
  4. Restart apparmor which can be done via: /etc/init.d/apparmor restart

Again, the full article is: How to move MySql database to another drive or partition.

http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive

Categories: Article, MySQL Tags: , ,

Recommendations for a Low Memory Environment for MySQL and Apache2

April 8th, 2010 Frank No comments

It’s no secret that this site is ran on top of Apache and MySQL. In fact, since I’ve previously advertised that this is a WordPress site, that is really clear.

Given my recent server move, I’ve been reconfiguring certain things. In fact, I have control that I have never had before, and truthfully I’ve learned things I’ve previously masked myself from. Despite possible difficulties and risks, I shouldn’t have done that to myself; I’d recommend to anyone to take responsibility of setting up their own server. It’s wroth while learning.

That said, I ran in to a small issue where the entire site wasn’t always rendering. While I’ve never completely isolated the problem, I did recall coming across the following on ServerFault:

When Apache and MySQL are installed their default configs assume they are working with more RAM available to them which can cause problems.

Along with that, the author posted starting guidelines which one can use to tweak their own install. While I’m not a Sys-Admin expert, I suspect this would be a good starting guideline. I don’t want to republish other peoples work, and hence the links are below:

The Open Source Definition

April 8th, 2010 Frank No comments

I have a lot of respect for Open Source; as you can see, my entire blog is centered around the exploration of open source software for educational purposes.

Despite my following of open source software and my affinity for it, I never knew until rather recently that there was a formal definition for what can be called open source or not.

This is laid out by the Open Source Initiative in a document named The Open Source Definition.

Open Source software is more than just receiving the source code. There is criteria that software or a license should meet to meet the Open Source Initiative ‘s definition.

I bring this up to share the fact that there is a driving definition that open source software generally follows.

http://opensource.org/docs/osd

Language “Succinctness is Power”

March 10th, 2010 Frank No comments

I’ve been keeping an eye out for good computer science articles. I found a reference to “Succinctness is Power” on stack overflow and decided to read it. I’m not an expert on programming languages, and I don’t suspect that I’ll ever become that. My interest and expertise is more in the design of a software program than the exact implementation parameters.

A point of interest for me, is that a good program design is rarely short and succinct. An object orientated design is generally longer than a non-OO Design.  The purpose behind this is to support the inevitable change.

Methodologically aside, in order to achieve what I enjoy doing I must use a programming language. To learn various concepts, I’ve learned several programming languages. To my knowledge, I know more programming languages then most of my (real life) colleagues.

The article’s hypothesis is that Succinctness is power; the article defines a method to calculate the succinctness of a programming language, and then explores different aspects of the idea.

As previously mentioned, I’ve used quite a few programming languages. Most of them for pedagogical purposes. I’ve always seen different advantages and disadvantages in programming languages and of the languages I actually like, I’m not sure which one is more succinct.

I do prefer a language with an extensive set of libraries, but only because the allow me to get to business faster. I don’t think libraries are a consideration in the article, but it likely should be.  C is great and it’s powerful, but you end up programming everything. Most of the time, I don’t see the purpose to this.

Anyway, please read the article… leave a note of what you think of it. I’m interested to know.

http://www.paulgraham.com/power.html