/var/net/sys/admin/blog

I had the chance to work as a systems administrator in an e-commerce company and they have Linux dedicated servers leased/purchase from a hosting provider.
Dedicated servers compared to a shared hosting is you have full control of the box. You can do whatever you want with the box, implement services and of course a full root access with the machine.

With this company, we are hosting about 200+ websites and some of them are hosted in our  boxes run in Redhat Enterprise Linux. As part of administering the box is to have a full and incremental backup of our dynamic website files and database. Scheduled shell scripts are set on this machine and luckily, I was able to find one of the useful backup solution script that can be found in this site:

Step by Step Procedure

Step 1. Add 2 LAN cards to the Linux box. You need to have two(2) NICs, one for your private network and one for the public IP address

Step 2. Check if your networks cards are properly detected and installed. You can use the command “dmesg” to verify if it was recognized during the boot-up process

Sample output:
#dmesg |grep eth

e100: eth0: e100_probe: addr 0xfa061000, irq 177, MAC addr 00:10:DC:5E:A8:BF
e100: eth1: e100_probe: addr 0xfa060000, irq 185, MAC addr 00:10:DC:5E:A8:C0
e100: eth0: e100_watchdog: link up, 100Mbps, half-duplex
e100: eth1: e100_watchdog: link up, 100Mbps, full-duplex

Setup VNC Server in Fedora

“Virtual Network Computing (VNC) is a desktop protocol to remotely control another computer. It transmits the keyboard presses and mouse clicks from one computer to another relaying the screen updates back in the other direction, over a network.” -WikiPedia-
This article describes in brief how to configure VNC server instances for one or multiple users on a remote machine, how to use VNC to start graphical applications on boot and finally how to enhance security by connecting to the server through encrypted SSH tunnels.

The DNS server was deployed in CentOS release 4.4, ,kernel ver. 2.6.9-42.0.3.Elsmp, Intel Xeon 3.2 GHz 2G RAM

Software Requirements
Any Linux/Unix flavors

Packages needed:

a.    Daemontools  (http://cr.yp.to/daemontools.html)
b.    UCSPI-TCP (http://cr.yp.to/ucspi-tcp.html)
c.    Djbdns (http://cr.yp.to/djbdns.html)
d.    Dnscache (http://cr.yp.to/dnscache.html)
e.    Tinydns (http://tinydns.org)
f.    Vegadns ( for web interface of tinydns, optional) (http://www.vegadns.org/)
g.    MySQL server (optional)
h.    Php, gcc, apache web server, perl, patch

Before installing djbdns , install daemontools and ucspi-tcp

1.DAEMONTOOLS

a. Create a /package directory:
mkdir -p /package
chmod 1755 /package
cd /package
b. Download the package daemontools-0.76.tar.gz into /package. Unpack the daemontools package:
tar zxvf daemontools-0.76.tar.gz

I.    Introduction

This document will discuss installation and configurations how-to on setting up POP3 using Dovecot (www.dovecot.org), SMTP using Sendmail (www.sendmail.org), Email Security System using MailScanner (www.mailscanner.info)  and a Web-based front-end to MailScanner using Mailwatch (mailwatch.sourceforge.net)

II.    Planning the Installation

System Requirements:

a.    Linux Operating System (Kernel 2.2 and later)
b.    Apache Web Server
c.    Perl and perl modules
d.    GCC
e.    MySQL
f.    Vi editor
g.    PHP (w/ MySQL & GD Support)
h.    DBD
i.    DBD-MySQL
j.    wget
k.    unzip/unrar
l.    Dovecot
m.    Sendmail
n.    MailScanner/ClamAV/SpamAssassin
o.    Mailwatch

In this tutorial, we will be cloning PC desktop machines using an opensource tool called “G4U”.

g4u (“ghosting for unix”) is a NetBSD-based bootfloppy/CD-ROM that allows easy cloning of PC harddisks to deploy a common setup on a number of PCs using FTP. The floppy/CD offers two functions. more details on –>   http://www.feyrer.de/g4u/

The procedure below was tested successfully on CentOS.  The same thing was also implemented on my BSD box and works as well.

Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator. It runs on Unix and Windows and is licensed under the GNU GPL.

MailWatch for MailScanner is a web-based front-end to MailScanner and features include displays of inbound/outbound mail queue size, load Average and today’s totals for messages, spam, viruses and blocked content on each page header, Quarantine management allows you to release, delete or run sa-learn across any quarantined messages etc.

Tested on CentOS 4.4, MailScanner ver. 4.57.6, Sendmail-8.13

Requirements:

a.    Working MailScanner setup
b.    MySQL
c.    Apache
d.    PHP (w/ MySQL and GD Support)
e.    Perl
f.    DBD
g.    DBD-MySQL

For those who uses java server pages via Tomcat server on Linux, providing secure transaction on your website thru SSL protocol is a must.  By this of course  we need to install a CA assigned certificate on the server.

The procedure below is a sample installation of  SSL certificate which tested working on my site .

Prerequisites:

Linux (tested on CentOS 4.3 x64 and later)
OpenSSL
JDK 1.5 ( J2SE 1.5.09 at the time of this writing)
Tomcat server (Apache Tomcat 5.5.20 binary version for linux)

SETUP

1.    Linux
It is assumed that CentOS is ready and updated before installation of other packages.

Here’s one trick to do that:
Step 1. Install  FreeTDS

FreeTDS Website: http://www.freetds.org/ choose FreeTDS source distribution

Compile parameter: –prefix=/usr/local/freetds –enable-msdblib

Then, copy /etc/ld.so.conf, to /usr/local/freetds/lib; and then run ldconfig

Step 2. Change /usr/local/freetds/etc/freetds.conf

[sql2k]

host = your.mssql.server.ip
port = 1433
client charset = cp950
tds version = 8.0

b. tds version: 4.2 (for MS SQL Server 6.x); 7.0 (for 7.x); 8.0 (for 2000)

Step 3. Test FreeTDS connect to MS SQL Server

#cd /usr/local/freetds/bin
#./tsql -S sql2k -U sa
1> use mydatabase
2> select * from mytable
3> go

 

About FLT

This site is dedicated to everyone who likes to learn and explore the beautiful world of Linux. If you have comments and suggestions, please feel free to email at comments@freelinuxtutorials.com. I am happy to serve and share things esp. that is free and enjoyable as Linux.