Beta Version:: http://catur.web.id

Password Protect Directory Your Webserver Pages PDF Print E-mail
User Rating: / 1
PoorBest 
Tuesday, 12 August 2008 16:26

Managing user access to a Linux Intranet server is extremely easy and quick. Yet, I find some new administrators get frustrated by the lack of complete information. In some HOWTO guides, details regarding .htaccess are given, without mentioning that the Apache must be configured. My hope is that this brief article gives a complete look at managing access with the use of Apache overrides and .htaccess. Since the goal is to make it as easy as pie, I will cut the techno talk and get to the point.

First, although this article applies to just about any Apache/Linux web server, it is most beneficial in the context of Intranet servers or when a website needs to control or secure certain web pages within directories for a set of specific users.

Second, you do not have to be a Linux administrator or expert to do these steps. You only need rudimentary knowledge of Linux, have root or super user access to the server, and be familiar with a text editor like vi, emacs, or something like kwrite.

Step 1. Configure Apache to Allow Access Authorization
You need to find the httpd.conf file on your Linux server.

Read more...  [Password Protect Directory Your Webserver Pages]
 
How to sync data between 2 servers automatically PDF Print E-mail
Monday, 11 August 2008 22:14

Have you ever wanted to know how to easily synchronize the data between multiple servers automatically?
In this article I’ll explain how to setup 2 Linux servers to automatically synchronize data between a specific directory on each server. To do this we will use rsync, ssh key authentication, and a cron job.

Let’s call the 2 servers ‘SOURCESERVER’ and ‘DESTSERVER’ for
SOURCESERVER = Source server (the server we’re connecting from to upload the data)
DESTSERVER = Destination server (the server we’re connecting to receive the data)


Part 1 - Setting up SSH key authentication

First, we need to make sure the DESTSERVER has the ability to use key authentication enabled. Find your sshd configuration file (usually ‘/etc/ssh/sshd_config’) and enable the following options if they are not already set.

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

Read more...  [How to sync data between 2 servers automatically]
 
How to do crontab every 30 seconds? PDF Print E-mail
User Rating: / 5
PoorBest 
Monday, 11 August 2008 16:17
How to do cronjob every 30 seconds? There is no way. But you can use sleep every x second.
# crontab -e
Put this code into crontab. 
* * * * * sleep 30; /var/www/html/catur/syncron.php > /dev/null 2>&1
30 means 30 seconds. By default is in second. If you want to do in minute or hour just put 30m or 30h.
 > /dev/null 2>&1 means no mail when doing this job. Hope usefull.
 
Shell Programming Techniques PDF Print E-mail
User Rating: / 2
PoorBest 
Monday, 11 August 2008 08:12

The command shell is the layer that interacts with the user and communicates with the operating system. When using MS-DOS, most people use the command.com shell; however a different shell can be specified via the COMSPEC environment variable.

Similarly, each UNIX? user must select a command shell to use to communicate to UNIX. When a UNIX account is established, the system administrator selects the user's default shell. Normal options are Bourne Shell (/bin/sh), C-Shell (/bin/csh), Korn Shell (/bin/ksh) and Bourne-Again Shell (/bin/bash). While many developers use C-Shell because of its C-like syntax, this is a subjective choice and this article uses the Korn shell exclusively. The syntax will not necessarily work under any other shell.

When you execute a shell script from the command line, your default shell is used. If your default shell is Korn, then the scripts in the article execute without syntax errors. But what if you want others to execute your script? You can't rely on the user's default shell to ensure that your scripts are always run using the Korn shell. The solution is to use a UNIX feature whereby the first line of a shell script indicates under which shell the script is to be executed. The syntax in Code Example 1 forces a script to be run using the Korn shell regardless of what shell the current user is executing.

#!/bin/ksh

# your script goes here. All lines starting with #
# are treated as comments

Code Example 1 - Force a script to be executed by the Korn shell

Read more...  [Shell Programming Techniques]
 

Usefull Site

Banner

Category

Member Login






Search Product

Manufacturers



Random Products

KY 714
KY 714
Rp1.197.427.823,26


KY 712
KY 712
Rp125.000,00


Main Menu