Posts

Showing posts from 2007

Install GNU/Linux without any CD, floppy, USB-key, nor any other removable media

Install GNU/Linux without any CD, floppy, USB-key, nor any other removable media I have a server running CentOS 4 with internet on it. This server is without any CD Drive, floppy Drive, USB-key, nor any other removable media and its Remote server. How do i install CentOS 5 on it? I have searched in various forums, posted in various forums. After a long hour I have came to solution. I am writting here what excataly I have done. Since, I have net connection on current system, 1. I have downloaded ISO image of centos 5 (1 CD only) 2. mkdir /mnt/tmp 3. mount -o loop CentOS-5.0-x86_64-bin-1of7.iso /mnt/tmp 4. cp -a /mnt/tmp/isolinux/vmlinuz /boot/vmlinuzMy 5. cp -a /mnt/tmp/isolinux/initrd.img /boot/initrdMy.img 6. umount /mnt/tmp 7. Add entry to your /etc/grub.conf title Fedora Core 2 Installation root (hd0,0) kernel /boot/vmlinuzMy initrd /boot/initrdMy.img 8. Reboot system 9. Now your is booted and ready for new installation. 10. Select installation method you want (FTP, HTTP or NFS prob

System Security Monitor root access

Security of the server always come first , especially web server which access by the worldwide and hackers always keep eyes on those server's. So, its good if you have system which automatically send a email notification via email whenever someone logs in as root on your system. To configure the automatic email alert notification to a email address on each incident of root log on on the server, use the following guide. Login to the server via SSH using as root ID. Ensure that you’re at home directory of root. The open up the .bash_profile for editing using pico or vi by typing one of the following commands at linux command shell: pico .bash_profilevi .bash_profile Scroll down to the end of the file and add the following line: echo 'ALERT - Root Shell Access on:' `date` `who` mail -s "Alert: Root Access from `who cut -d"(" -f2 cut -d")" -f1`" user@example.com Replace user@email.com with the actual email account address that you want to the root

Trademark Problem

I am Technical guy I am totally unaware of trademark related things. But you must be thinking in admin Linux blog I am talking about trademark what happen to this guy. Believe me I am not crazy. One day I got this comment: " Dear Mr. Kumar,Your "Open Hearts" header presents a bit of a problem for us as we hold the international trademark for "Open hearts. Open minds. Open doors." We ask you, kindly, to please remove this statement from your blog. If you have any questions, please contact us at im@umcom.org . --The United Methodist Church. " "Open Hearts, Open Minds, Open Doors... Open Source" yes this Title Description is trademark to someone. Now just I reshuffled this and made it to “Open Minds, Open Hearts, Open Doors... Open Source" Hope this will not create any problem.

Backup strategy

Backup strategy: In computer world most important thing is DATA. No system can 100% secure or fault tolerance, so we always worry & care about data. Various organization follows different back strategy. Like daily, weekly, monthly or yearly and at different levels. Once my CEO asked me to design the backup system, and then I study various backup system, algorithms and architectures. Then I come up with this backup architecture Level 0 - Hard disk backup using RAID -1 mirroring, its purpose is to use in the case of hardware failure. Level 1 – OS backup using rsnapshot. It is a file system backup utility based on rsyn, using rsnapshot; it is possible to take snapshots of your file systems at different points in time. Its purpose is to use in the case of OS failure. Level 2 – Application data backup on same data center using Rsync. Its purpose is to use in the case of application failure. Level 3 – Application data backup at remote location. Its purpose is to use in the case of data c

Xen : virtualization software

In my previous blog post I was talked about Virtualization. Now I am writting about XEN , It is software that runs on a host operating system and allows one to run several guest operating systems on top of the host on the same computer hardware at the same time. Xen Software which enabling every server to support multiple virtual servers. It is the fastest and most secure virtualization software. In Xen virtualization, a thin software layer known as the Xen hypervisor ( open source technology, developed collaboratively by the world’s best engineers at over 20 of the most innovative data center solution vendors, including Intel, AMD, Cisco, Dell, Egenera, HP, IBM, Mellanox, Network Appliance, Novell, Red Hat, SGI, Sun, Unisys, Veritas, Voltaire, and of course, XenSource ) is inserted between the server’s hardware and the operating system. This provides an abstraction layer that allows each physical server to run one or more “virtual servers,” effectively decoupling the operating system

Virtualization : Basic Concepts

Virtualization is the creation of a virtual (rather than actual) version of something, such as an operating system, a server, a storage device or network resources. e.g. hard drive into different partitions, a partition is the logical division of a hard disk drive to create, in effect, two separate hard drives. Similarly, Operating system virtualization is the use of software to allow a piece of hardware to run multiple operating system images at the same time. There are three areas of IT where virtualization is making head roads a) Network virtualization b) Storage virtualization c) Server virtualization Today, virtualization is in the forefront - helping businesses with scalability, security and management of their global IT infrastructure. Virtualization can host multiple guest operating systems. Each guest operating system runs in its own domain, Virtualization schedules virtual CPUs within the virtual machines to make the best use of the available physical CPUs. Each

Change the default port for SSh user

Default port for SSH user is 22. But we can change the default port to some another port. eg. I want to run ssh service on port 99 instead of 22. Make the following change. open files #emacs /etc/ssh/ssh_config #emacs /etc/ssh/sshd_config search for port ie is default port = 22 make port = 99 or You can run on any port, But make sure other service not running on that port.

web Based administration solution for Linux : webmin

Webmin is an open source web Based administration solution for Linux. The purpose of webmin is to gather the administration of many different tasks and services under a common web interface. The software is perl based and module based which make it adaptable. Most common tasks have a module to administer. how To Install Webmin: # cd /usr/src # wget http://prdownloads.sourceforge.net/webadmin/webmin-1.340-1.noarch.rpm # rpm -ivh webmin-1.340-1.noarch.rpm steps to install virtualmin & configure it: login to webmin: ipaddress:100000 1) webmin -> webmin configuration -> webmin modulesInstall module -> from ftp or http url ->virtual min url is: http://download.webmin.com/download/virtualmin/virtual-server-3.201.gpl.wbm.gz 2) Enable https:yum install mod_sslin virtualmin config enable ssl for websites. Configuring virtualmin:Enabled the subverion and mysql moduledisabled webalizerPostgreSQL setup and configuration enabled? yes. 3) If this server is going to use PGsqlPostfix

Check your memory !

We all are always worry about memory weather it is main memory, secondary, or other swap These are few command which help u to debug your memory. Simple stat. #free #du -h #df -h Some complex stat. #cat /proc/meminfo #dmesg | grep -n kernel This command give you files have more than 100M usages. #find / -size +100M -fprintf /root/big.txt '%-10s %p\n'

find out all failed login attempts via ssh/telnet

how do I find out all failed login attempts via ssh/telnet? # grep "authentication failure" /var/log/messages|awk '{ print $13 }' | cut -b7- | sort | uniq -c

find command with examples

find command all we know but here u find some example, find . -name "rc.conf" -print This command will search in the current directory and all sub directories for a file named rc.conf. find /usr/src -not \( -name "*,v" -o -name ".*,v" \) '{}' \; -print This command will search in the /usr/src directory and all sub directories. All files that are of the form '*,v' and '.*,v' are excluded. Important arguments to note are: * -not means the negation of the expression that follows * \( means the start of a complex expression. * \) means the end of a complex expression. * -o means a logical or of a complex expression. In this case the complex expression is all files like '*,v' or '.*,v' The above example is shows how to select all file that are not part of the RCS system. This is important when you want go through a source tree and modify all the source files... but ... you don't want

Recover Root Password of MYSQL

Step # 1 : Stop mysql service # /etc/init.d/mysql stop Step # 2: Start to MySQL server w/o password: # mysqld_safe --skip-grant-tables & Step # 3: Connect to mysql server using mysql client: # mysql -u root Step # 4: Setup new MySQL root user password mysql> use mysql; mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root'; mysql> flush privileges; mysql> quit Step # 5: Stop MySQL Server: # /etc/init.d/mysql stop Step # 6: Start MySQL server and test it # /etc/init.d/mysql start # mysql -u root -p Enjoy ;-)

Recover Root Password In Liunx Machine

Recover Root Password Probably the simplest way to solve a forgotten root password problem is to boot your system in the single-user mode. If you are using LILO, at the LILO boot prompt (graphical LILO users can press Ctrl-x to exit the graphical screen and go to the boot: prompt), and then enter: Code: linux single This will make you the "root" user without asking for a password. Once the system has booted, you can change the root password using the password command: Code: passwd GRUB users will follow basically the same steps, except that the GRUB boot loader doesn't have a default boot prompt, but you can choose "e'' when the menu displays to edit the boot parameters. Just select the kernel line for the kernel you want to boot. Go to the end of that line and type "single" as a separate word, then press ENTER to exit the edit mode. Once back at the GRUB screen, press "b" to boot into single user mode.

Backup of DataBase from MYSQL

Every database admin job is to take DB backup time to time. there is two method's i am using.. Method 1st : mysqldump client is a backup program used to dump a database or a collection of databases for backup or transfer to another SQL server. The dump typically contains SQL statements to create the table, populate it, or both. However, mysqldump can also be used to generate files in CSV, other delimited text, or XML format. The most common use of mysqldump is probably for making a backup of an entire database: shell> mysqldump db_name > backup-file.sql You can read the dump file back into the server like this: shell> mysql db_name < backup-file.sql Or like this: shell> mysql -e "source /path-to-backup/backup-file.sql" db_name mysqldump is also very useful for populating databases by copying data from one MySQL server to another: shell> mysqldump --opt db_name | mysql --host=remote_host -C db_name It is possible to dump several databases with one comman