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