Here is a simple telnet trick, so check if a port is open and responding as expected. Be aware that the check described here is a bit simplistic, but it does demonstrate the capabilities of telnet on the shell.
$ smtpserver="smtp"
$ smtpport="25"
$ ( echo open $smtpserver $smtpport ; sleep 1 ; echo quit ) | telnet 2>&1 | grep 220 > /dev/null 2>&1
$ echo $?
This will print "0" when everything is correct, and 1 when the grep did not work.
Imagine the rules of a social network would apply to corporate enterprises, these strange situations would arise:
Wow, that would actually be a very positive thing!
When administering an Apache web server, you will encounter moment when some of your clients, but hopefully you, published something that causes a rush of visitors to your web server. How do you manage that peak? Here are some tricks that you could use:
Apache has many performance related configuration options. When you run a small server, the default configuration of Apache might cause requests to be answered very slowly.
Apache runs on a desktop-comparable machine for my website, so I have altered these settings. The impact of this change was huge! Where the default settings would cause extreme high (100+) loads and extremely slow request, the web server runs healthy now.
StartServers 16
MinSpareServers 8
MaxSpareServers 32
ServerLimit 32
MaxClients 32
MaxRequestsPerChild 4000
Configure Apache to allow you to see the status pages. This will help you identify what is using all the resources.
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
When you are in deep shit, move services like the database, email, domain name resolution, etc to a different machine. This will help you spread the load and will also help you identify where the problem exactly is.
After figuring out what virtual host eats all CPU cycles or available memory, check to see the (php) code. If you are not comfortable with it, let the user (and owner) do this. He/she is responsible for hir/her code.
This is the most difficult step to take and is in a gray area; it's not system administration, but sure comes close.
Drupal users might agree: Drupal does not provide sufficient statistics to get a good overview of what their visitors are doing. Here are some ways to get the most out of your statistics using Drupal.
Enable the Statistics module. It comes with Drupal and the only thing it does is keep counters of what nodes are read. Other information is stored, but so difficult to find, that I consider it useless.
There is a Drupal Google Analytics module that you can install. Besides that, you also need a Google Analytics account.
Installation is simple; enable the module, get yourself a Google Analytics account and copy the code into drupal. That code looks something like this: UA-1234567-1
Write your own code to see what stories are popular. I use this code, but you might need to adapt it a little:
<table>
<tr><td><b>Article</b></td><td><b>Views today</b></td><td><b>Total views</b></td><td><b>Author</b></td></tr>
<?php
$result = mysql_query("SELECT node.nid, node.title, node_counter.daycount, node_counter.totalcount, users.name FROM node, node_counter, users WHERE node.nid=node_counter.nid AND users.uid=node.uid AND (node.type=\"story\" OR node.type=\"book\") ORDER BY node_counter.totalcount DESC LIMIT 3;");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo "<tr><td><a href=\"/node/$row[0]\">$row[1]</a></td><td><a href=\"/node/$row[0]/track\">$row[2]</a></td><td>$row[3]</td><td>$row[4]</td></tr>";
}
?>
</table>
I did a little game development back in the day. Nearly every programmer, at one point or another, has at least thought of producing the next hot game to hit the shelves. The way I started was to work with MUDs (Multi-User Dimensions) by editing the source code of premade game frameworks (code bases). All of the code bases I picked through had a special license called the DIKU license; the reason is that DIKUMUD was the first of this huge family tree of code bases. You could edit and distribute the code all you want, but you couldn't profit off of it commercially, and every time someone added even the most basic set of snippets onto the code, they would make a whole new code base and a special license that goes with the DIKU license. So, by the time you get to a third or fourth generation code base, you've got a novella of licenses to read through before you can even mess with it.
Then I discovered the GNU Public License. GPL is an extremely common license to run across these days, so it's worth a quick read so you know what's up. There's some really nice pluses to using GPL code in your project as well: the license is uniform, the code is free, and you can use it commercially! A common misconception is that GPL licensed software can't possibly be commercial because it's open source, so people will not pay you for the game. Yes, the code will be open for people to see and modify if it's GPL, but you can still turn a very nice buck. First off, the graphics, sound, and everything else that you've created which isn't code will be your property, and you don't have to distribute it. Second, if it's an MMOG (Massive Multiplayer Online Game), you can charge a monthly fee, sell schwag, and all sorts of other options.
One of the engines to come out under the GPL license is the Crystal Space engine, and you can find some very nice screen shots and demos on the website that show the engine off. There have been commercial games, online games, and your general open source free-as-in-beer games to be developed with Crystal Space. There's plenty of other engines out there as well including: Axiom, Daimonin, Delta3D, Entropia Engine and the list goes on and on. The downside is that you won't be able to effectively produce an offline shelf-game and charge an insane rate for it like most game publishers do--people can just download the source code, compile it, and pirate the graphics. However, even if you had proprietary code, they would just go ahead and pirate the binaries anyway, so you'd be up the creek. At least with GPL, you earn cool points for releasing your code for the common good instead of getting ripped off by pirates.
As a public service, Me in IT Consultancy is offering a hosted Proxy Automatic Configuration (PAC) file. That means you can configure your web browser once to use this PAC file, and from then on surf the web anonymously.
This is really simple, the greater picture is that you have to tell your web browser where the PAC file can be found. The browser will get that file, and use the proxies that are listed in there.
Mac OS X sets a proxy at the level of a network configuration, so it's not a specifically Safari configuration item.
http://meinit.nl/proxy.pac
Every now and then the PAC file is regenerated, only using the working proxies, and removing the slow or not working proxies. Your browser gets that PAC file when it starts up, to always uses a fresh copy.
Most troubles are not specifically related to using a PAC file, but relate to using an anonymous proxy in general. Even though, here are the troubles I ran into.
1. Some proxies have restrictions like not being able to post things. Even a simple Google search may be broken then. This is a limitation of this setup, posting can be considered dangerously.
It can be difficult to find yourself a good domain name. Besides that, what is the influence of a domain name on your visitors and search engines? How do you deal with multiple domains and should you have multiple domains? Let's go over these items.
Having multiple domains is not specifically good for your websites internet presence. I am sure you could just as well use a single domain, instead of buying a few. There are a few reasons why you could want to have multiple domains:
Some time ago I was asked to use a service called Moneybookers. At first I was a bit skeptic to use this service.
How do you check if an online service if safe to use?
I have added these few domains to point to this website, meinit.nl:
Looking for our wedding site?
Here are the steps to take when adding a (few) domain(s). These steps make your domain jump through to your 1 and only domain you are using. For your Google Page Rank, it's better to concentrate all (sub-)domains instead of spread your Page Rank over many websites.
That's it. For reference purpose, here are the codes used.
Example part of httpd.conf. The bottom 4 lines were added.
<VirtualHost *:80>
ServerAdmin [email protected]nl
DocumentRoot /var/www/virtualhosts/meinit/html
ServerName meinit.nl
ErrorLog /var/www/virtualhosts/meinit/logs/error_log
CustomLog /var/www/virtualhosts/meinit/logs/access_log common
ServerAlias *.meinit.nl
ServerAlias meinit.eu
ServerAlias *.meinit.eu
ServerAlias meinit.com
ServerAlias *.meinit.com
ServerAlias robertdebock.nl
ServerAlias *.robertdebock.nl
ServerAlias drupal.nl
ServerAlias *.drupal.nl
ServerAlias debock-beck.nl
ServerAlias *.debock-beck.nl
ServerAlias linux-consultant.nl
ServerAlias *.linux-consultant.nl
ServerAlias linux-consultancy.nl
ServerAlias *.linux-consultancy.nl
</VirtualHost>
A part of my .htaccess. Everything is redirected to http://meinit.nl/
RewriteCond %{HTTP_HOST} ^linux-consultant\.nl$ [NC]
RewriteRule ^(.*)$ http://meinit.nl/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^linux-consultancy\.nl$ [NC]
RewriteRule ^(.*)$ http://meinit.nl/$1 [L,R=301]
Yesterday, I spoke to a (mostly Windows) colleague. He told me that system administration with a mouse is ease, "because you just try to change something, if it acts unexpected, you reboot."
I do not agree with that but could not make it clear to him why the command line is a better media to administer a system. Therefore, here is a list of comments you could give when you are asked the same question.
I must be honest, there are some things that just should be used graphically, like an email client. No way mutt or pine are better. A chat client should also be graphical, all those windows...
About | Consultancy | Articles | Contact |
|
|
|
|
References | Red Hat Certified Architect | By Robert de Bock | Robert de Bock |
Curriculum Vitae | By Fred Clausen | +31 6 14 39 58 72 | |
By Nelson Manning | [email protected] |