Monday, September 5, 2011

Domain Name Server (DNS)

Features of DNS
1. Standard naming system manager
2. Name to IP resolution
3. IP to Name Resolution
4. Client-utilities are auto-installed 'bind-utils* ' RPM
5. Caching only server
6. Primary server
7. Secondary server
8. Reverse zone
9.IPV6 zone
10.Operates as non previledged user: 'named'
11.Default configuration binds to UDP: 53 on IPV4/ IPV6 loopback ( remote query will fail)
12. Load-balancing is provided in a proper configuration of :2 or more authoritative server

Daemon:  named
Script:     named
Port:       53
Log File: /var/log/messages

Packages
# rpm  -q  bind bind-chroot caching-nameserver---------------------->Server
# rpm  -q  bind-utils


Tasks



Saturday, August 27, 2011

Step by Step Installation of BSD.

OS:FreeBsd 8.2
HDD:15 GB
Memory: 1024
 Installation process………
1.Nepal
2.US
3.Standard
4. Message ---ok
5. Fdisk partition editor…..c…ok…ok…Q
6.Boot Manager-------standard
7. Free BSD Disklabel Editor------c------2048 M--------Swap partition
c------okj—FS-------ok-------/
adosal---1--------press  S
Custom base, [x]man, [x]catman, [x]proflibs,[x]ports, [x]kernel
[x]Generic
[x]src----All-----exit
[x]minimal
8.Cd/dvd Installation
Yes
9.Congress message---ok
Ethernet—emo===IPV6-NO—CONFIGURE DHCP server—yes ---
Host……poudel.net ……………..Domain poudel.net
9.N/w gateway------No
10.Netwosk service---No
11.SSH login--------No
12. FTP---No
13. NFS----No
14. FS Client-------No
15. Console-------Yes------font—swiss
16. Timezone------yes
17.CMOS---NO…ASIA..NEPAL--------NTP
18.Mouse-----No
19. User configure—package  ------No
20.user account----yes—user
Login ID---santosh  Group—whell
Full name---santosh Poudel
Password……….ur password
Root  password-------ur root password
Last Configuration---No……Exit Installation---Ok
21…..reboot
Login………….santosh……password………..ur password
22. check the net….ping yahoo.com
23.  #su –
bsd
cd/usr/ports--------if not found
sysinstall---configure….Distriibution…ports..CD/ROM…exit….Enter
press…..X

Saturday, August 20, 2011

Step by Step Installation of LAMP on CentOS 5.6

1. Minimum Hardware Requirements.
OS:- CentOS 5.6
Memory:- 1 GB
Harddisk:- 15 GB


First change the hostname as server.domain.com
vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server.domain.com
Change IP as
[root@client ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
HWADDR=08:00:27:E2:E4:CB
ONBOOT=yes
IPADDR=192.168.1.13
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.1
NM_CONTROLLED=yes

2.Installing MySQL 5.0
yum install mysql mysql-server mysql-devel

 MySQL starts automatically whenever the system boots
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start

Set passwords for the MySQL root account:
mysql_secure_installation

[root@server ~]# mysql_secure_installation


First time password (leave blank)

Set root password? [Y/n] y

New password: <-- yourrootsqlpassword
Re-enter new password: 
<-- yourrootsqlpassword
Remove anonymous users? [Y/n] <-- ENTER
 ... Success!
Disallow root login remotely? [Y/n] <-- ENTER
 ... Success!
Remove test database and access to it? [Y/n] ßENTER
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
Reload privilege tables now? [Y/n] <-- ENTER
 ... Success!

3 Installing Apache2                                            
yum install httpd
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
 browser  http://192.168.0.100, and we should see the Apache2 placeholder page:
Apache's default document root is /var/www/html
 configuration file is /etc/httpd/conf/httpd.conf.
Additional configurations are stored in the /etc/httpd/conf.d/ directory.

4.Installing PHP5
yum install php
etc/init.d/httpd restart
To confirm/testing PHP5

Document root of the default web site is /var/www/html.

We will now create a small PHP file (info.php) in that directory
[root@server ~]# vi /var/www/html/info.php
<?php
phpinfo();
?>
 we will call that file in a browser (e.g. http://192.168.1.13/info.php):

5Getting MySQL Support In PHP5
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
 http://192.168.0.100/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:

phpMyAdmin

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -Uhv rpmforge-release-0.5.2-2.el5.rf.i386.rpm

yum install phpMyadmin
We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the<Directory "/usr/share/phpmyadmin"> 
vi /etc/httpd/conf.d/phpmyadmin.conf
#
#  Web application to manage MySQL
#

#<Directory "/usr/share/phpmyadmin">
#  Order Deny,Allow
#  Deny from all
#  Allow from 127.0.0.1
#</Directory>

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin


We will  change the authentication in phpMyAdmin from cookie to http:
vi /usr/share/phpmyadmin/config.inc.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]

/etc/init.d/httpd restart---àTo restart apache
In the browser: http://192.168.1.13/phpmyadmin/:


Monday, July 18, 2011

Step by Step Installation of Oracle 10g in CentOS 5.6

Minimum Hardware Requirements.

OS:- CentOS 5.6
Memory:- 1 GB
Harddisk:- 20 GB


Installing rpm packages which are required for Oracle installation
Application:- Graphical Internet
Development:-Development Libraries, Development Tools, GNOME Software Development
Java Development, Legacy Software Development, X Software Development
From X Software Development----go to option and check on---libXp-devel and openmotif
Servers:-Server Configuration Tools,Web Server, Windows File Server
Base System:-Administration Tools,Base, Java,  Legacy Software Support, System Tools,X Window system
From Legacy Software Support---select compat
From System Tools--select sysstat
During the Installation: Disable the firewall and SELinux.


For ORACLE:

1.Verify that following packages are installed. 
binutils.i386
compat-gcc-7.3-2.96.128.i386
compat-gcc-c++-7.3-2.96.128.i386
compat-libstdc++-7.3-2.96.128.i386
compat-libstdc++-devel-7.3-2.96.128.i386
cpp.i386
gcc.i386
gcc-c++.i386
glibc.i386
glibc-common.i386
glibc-devel.i386
glibc-headers.i386
libstdc++.i386
libstdc++-devel.i386
libaio
libaio-devel.i386
libXp.i386
pdksh.i386
setarch.i386
sysstat.i386


rpm -q binutils compat-gcc-7.3-2.96.128 compat-gcc-c++-7.3-2.96.128 
compat-libstdc++-7.3-2.96.128 compat-libstdc++-devel-7.3-2.96.128 
cpp gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libstdc++ 
libstdc++-devel libaio libaio-devel libXp pdksh setarch sysstat 
installing the rpm:- libaio-devel-0.3.106-3.2.i386.rpm
 
2.Edit  /etc/hosts file
Add hostname and ip address eg. 192.168.11.30   oracletest.com.np
 
3. Edit /etc/sysctl.conf
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.sem = 250 32000 100 128
net.ipv4.tcp_rmem = 4096 262144 524288
net.ipv4.tcp_wmem = 4096 262144 524288
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_retries2 = 3
net.ipv4.tcp_keepalive_time = 30
net.ipv4.tcp_keepalive_intvl = 60
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.ip_local_port_range = 1024 65000
 
4. Run the following command to change the kernel parameters
/sbin/sysctl -p

5. Add the following security parameter in /etc/security/limits.con
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


6. Edit /etc/pam.d/login and add following line
session required pam_limits.so
 
7. SElinux and firewall should be turned off modify /etc/selinux/config 
SELINUX=disabled
 
8.Creating following users and Groups
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba oracle
passwd oracle
 
9.Create directory to house oracle and change ownership
#mkdir -p /u01/app/oracle/product/10.2.0/db_1
#chown -R oracle.oinstall /u01

10.edit /etc/redhat-release

OR

runinstaller ignoresysprereqs
 
11.Edit the /home/oracle/.bash_profile
add the following lines

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=testdb; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
fi
 
12.Log into the oracle user. Execute command xterm to verify DISPLAY environmental variable set properly else

 

Tuesday, July 12, 2011

Connect to Internet from Vmware Workstation ACE Edition (Ver. 6)

I have Red Hat Enterprise Linux 5  installed which is guest OS on a Vista host.

1) During new virtual machine, select NAT on Network type














2) In Redhat, type the command:  [root@localhost ~]# service network restart


Creating of  Oracle VM Virtual Box version 6.18

Click on machine---->New------> Type Name eg Window Server 2019-->choose the version  then click next
Memory Size [e.g. 2048]
Hard Disk: Create a hard Disk now...>Virtual box disk 

Installation of Bootable Windows


No bootable Medium found ! system halted
For ISO
solution: setting:bootable optical in 1st order

Saturday, May 14, 2011

Package Managenent

yum is a software package manager that installs, updates, and removes packages on  RPM-based systems. It automatically computes dependencies and figures out what things should occur to install packages. yum makes it easier to maintain groups of machines without having to manually update each one using rpm.
Features include:
  • Support for multiple repositories
  • Simple configuration
  • Dependency calculation
  • Fast operation
  • RPM-consistent behavior
  • Package group support, including multiple-repository groups
  • Simple interface
yum uses an online repository by default, but you can also configure it to use a local repository of packages.

Friday, May 13, 2011

Change the IP address on RedHat.

Temporary Address

1)Open Terminal
2) ifconfig -a  
to list all network interface card on the current PC.
3) Type ifconfig eth0 [IP ADDRESS] netmask 255.255.255.0 up 
to configure IP Address on interface eth0.
4)route add default gw [Gateway Address]
to configure gateway

Permanemt Address

1) Open Terminal
2)# vi/etc/sysconfig/network-scripts/ifcfg-eth0
3)Modify the file by press ‘i’ to enter insert mode. Change BOOTPROTO to static and add IP Address and Net mask
             BOOTPROTO=static
             IPADDR=192.168.1.20
             NETMASK=255.255.255.0
Save the configuration file by press ESC + ‘:’ and type ‘wq’ to write and quit the editor.
4) Restart the network interface card. Type
# service network restart
#chkconfig on
5)Review the configuration. Type
#ifconfig

Assigning Multiple IP Address to a same NIC

Upto 256 IP Addrress can be assigned to the same NIC

# cd /etc/sysconfig/network-scripts
# vi ifcfg-eth0:0
DEVICE:eth0:0
BOOTPROTO=static
IPADDR=192.168.1.1
NETMASK=255.255.255.0
ONBOOT=yes

#service network restart

# ifconfig

Assigning Range of IP Addresses to the same NIC

# vi /etc/sysconfig/network-scripts/ifcfg-eth0-range0

IPADDR_START=192.168.1.2

IPADDR_END=192.168.1.31
CLONENUM_START=2

#service network restart

#ifconfig
#chkconfig network on





Tuesday, May 10, 2011

LAMP on ubutnu 9.10 and above.

L------Linux Operation System.
A------Web Server.
M----- Relational Database Management System.
P------Object-Oriented Scripting Language.

# sudo apt-get install php5 mysql-server apache2
or
# sudo apt-get install lamp-server

Then in browser (check apache)
http://localhost

For Mysql
/var/www$ mysql -u root -P
passwd-----

mysql > exit

For PHP
$ sudo vi /var/www/info.php

add
<?php
phpinfo( );
?>
save and exit
Then restart apache.
# /etc/init.d/apache2 restart.

Then in browser
http://localhost or IP /info.php

To full manage the LAMP Server Database, install phpmyadmin
# sudo apt-get install phpmyadmin

To log in to phpmyadmin, open the browser and type


http://localhost/phpmyadmin or http://ip/phpmyadmin


Wednesday, February 23, 2011

System Shutdown

shutdown  [option] [ time ]

time----now--- immediately
+N------------after N minutes
HH:MM-------At the specified time

-h-----halt
-r-----reboot
-c----to cancel schedule shutdown

example: # shutdown -h now
              # shutdown +30
              # shutdown 08:00

# shutdown -c

  •   # init 0
  •   # shutdown -h now

    init Initialization

    Runlevels

    • 0------Halt
    • 1------Single user mode
    • 2
    • 3
    • 4
    • 5
    • 6-----Reboot


    Saturday, February 5, 2011

    Post Install Configuration

    Some useful command after installation.
    • # system-config-language-----Language selection.
    • # system-config-keyboard----Select the appropriate keyboard for the system.
      • Loading /bin/kbd/keymaps/i386/qwerty/us.map.gz
    • #system-config-network------Network configuration.
    • #system-config-securitylevel--System Level configuration--Firewall option / Selinux
    • #sytem-config-date-----------Date properties
    • #system-config-time----------Time properties
    • #system-config-packages-----Package manager
    • #system-config-display (in runlevel 3)---Display setting--setting / hardware

    To list Partitions in the System

    Partition in the system
    • df - h-------To see linux partition.
    • fdisk -l------To see whole system partition. (Windows and Linux)

    Custom Layout

    Custom Layout (Minimum)
    • /boot-----------100 MB
    • /home----------1024 MB
    • /var-------------4096 MB
    • /usr-------------7000 MB
    • /tmp------------512 MB
    • /----------------4000 MB (/etc, /bin, /dev, /sbin, /lib)

    Default Layout

    To install in default layout
    • /boot---------100MB
    • Swap--------2 * size of RAM
    • /(ROOT)----Remaining free space

    Types of Partitions

    Two Types

    1. Primary Partition
    • Max 4 primary partitions can be created.
    • 1-4
     2. Logical partitions
    • Sub-partitions of Extended partition is called Logical Partitions.
    • 5-63------IDE
    • 5-15------SCSI/SATA/USB

    Wednesday, February 2, 2011

    I/0 controllers

    I/O controllers
     IDE--Integrated Drive Electronics

    • Primary Masters--------/dev/hda
    • Primary Slave----------/dev/hdab
    • Secondary Master-----/dev/hdc
    • Seconday Slave-------/dev/hdd
    SCSI/SATA/USB---Small Computer System Interface/Serial Advanced Technology Attachment/Universal Serial Bus
    • First SCSI Disk-----/dev/sda
    • Second SCSI DISk--/dev/sdb
    USB-Disks and SATA Disks have same convention as SCSI.

    Types of Installation

    Types of Installation.
    1. CD-ROM
    2. Network-based--FTP(File Transfer Protocol), NFS(Network File System),HTTP(Hypertext Transfer Protoco)
    3. Kickstart

    Saturday, January 1, 2011

    Module-II System Administration.


    Chapters
    Estimated Time
    Installation
    5 Hrs
    System Initialization
    4 Hrs
    Package Management
    3 Hrs
    Kernel Services
    1 Hr
    System Services
    5 Hrs
    User Administration
    5 Hrs
    File system Management
    3 Hrs
    Advanced File system Management
    5 Hrs
    Network Configuration
    2 Hrs
    Virtualization with Xen
    1 Hr
    Troubleshooting
    2 Hrs