Removing RPMS

You’ve gotten tired of some program and want to get rid of it. or you’ve just installed something you’ve don’t want. So you want to remove an RPM package.

#rpm -e <package_name>

For Example, To remove the tuxpaint package, just label the package

#rpm -ev tuxpaint

If you dont want to check the dependencies

#rpm -ev –nodeps tuxpaint

To uninstall several packages at once, use a space-delimited list

#rom -ev tuxpaint zip rar

Upgrading RPMs

Do you want to upgrade the packages to the newer one, with important bug fixes.

#rpm -U <package_name>

For Example, TO upgrade a package , tuxpaint

#rpm -Uvh tuxpaint.i386.rpm

-U can be used in the place of -i install. It doesn’t matter if you’re upgrading a package or installing a new one , it works in both the cases . -U replaces the old package. If you want to have multiple versions of same package, such as gcc, or install several different kernels, don’t use -U, use -i.

Installing RPMs

Do you want to install additional software packages in your linux operating system ( Red hat, Fedora) ? If it so, This article will very helpful to you,

Use RPM ( Redhat Packet Manager) , the packet Manager. Red hat command installation syntax look lke this

#rpm -i <package_name>

For Example, the following command installs the tuxpaint package

#rpm -ivh tuxpaint-9.13-1.i386.rpm

preparing…###################### [100%]

1.tuxpaint ######################  [100%]

Network card

How to check the network interface card ?

network card

 

Network Card is one of the important component in the host, if you want to check the functionality of the network card open terminal (Linux ) / Command Prompt ( Microsoft Windows )

ping 127.0.0.1

The address 127.x.x.x is called as the loop back address and it is reserved one. If ping replies then the card is working properly else the card contains problem.

LAMP Server

This guide will help you that how to set up a LAMP server on Ubuntu/ Debian Operating System

Apache 2 –  ­ Linux Web server
MySQL 5  – MySQL Database Server
PHP4/5 ­  – PHP Scripting Language
phpMyAdmin – Web­based database admin software.

Note: Linux + Apache + MySQL + PHP/Perl together commonly known as LAMP Server.

First, let us prepare a system that has a minimum requirement of Debian/Ubuntu version of linux with atleast 256MB of RAM available. Anything less than this minimum ram will cause lot of problems since we are running a server along especially mysql and webmin requires lot of RAM to run properly. Mysql will give you this nasty error “cannot connect to mysql.sock” if you dont have enough memory in your server.

Before proceeding to install, update the necessary packages with debian with this command.

apt-get install update


Installing Apache + PHP

Apache is one of the most famous web server which runs on most linux based servers. With just few commands you can configure apache to run with PHP 4 or PHP 5.

If you want to install PHP 4, just apt-­get

apt-get install apache2 php4 libapache2-mod-php4

To install PHP5, just run the following on linux shell. Note that if you dont specify packages with ‘4’, PHP5 will be automatically installed.

apt-get install apache2 php5 libapache2-mod-php5

Apache configuration file is located at: /etc/apache2/apache2.conf and your web folder is /var/www.

To check whether php is installed and running properly, just create a test.php in your /var/www folder with phpinfo() function exactly as shown below

Point your browser to http://ip.address/test.php or http://domain/test.php and this should show, all your php configuration and default settings. You can edit necessary values or setup virtual domains using apache configuration file

Installing MySQL Database Server

Installing mysql database server is always necessary if you are running a database driven ecommerce site. Remember running mysql server to a fair extend requires atleast 256mb of RAM in your server. So unless you are running database driven sites you dont absolutely need mysql. The following commands will install mysql 5 server and mysql 5 client.

apt-get install mysql-server mysql-client php5-mysql

Note: If you have already installed php4, you should make a slight change like this.

apt-get install mysql-server mysql-client php4-mysql

The configuration file of mysql is located at: /etc/mysql/my.cnf


Creating users to use MySQL and Changing Root Password

By default mysql creates user as root and runs with no passport. You might need to change the root password.
To change Root Password

mysql -u root
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD(‘new-password’) WHERE user=’root’;
mysql> FLUSH PRIVILEGES;

You must never use root password, so you might need to create a user to connect to mysql database for a PHP script. Alternatively you can add users to mysql database by using a control panel like webmin or phpMyAdmin to easily create or assign database permission to users. We will install Webmin and phpmyadmin during later once we complete basic installation.

PhpMyAdmin Installation

PhpMyAdmin is a nice web based database management and administration software and easy to install and configure under apache. Managing databases with tables couldnt be much simpler by using phpmyadmin

To install phpMyAdmin

apt-get install phpmyadmin

The phpmyadmin configuration file is located at: /etc/phpmyadmin directory

To set up under Apache all you need to do is include the following line in /etc/apache2/apache2.conf:

Now restart Apache

/etc/init.d/apache2 restart

Point your browser to: http://domain/phpmyadmin