Showing posts with label Linux/ Ubuntu. Show all posts
Showing posts with label Linux/ Ubuntu. Show all posts

Monday, 3 June 2013

OpenFiler as NAS(CIFS, NFS) & SAN(iSCSI, FC)

Link: http://www.openfiler.com/learn/how-to/graphical-installation/
Creating a partition and volume.
[root@open ~]# parted /dev/sda
GNU Parted 1.8.8
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit cyl
(parted) mkpart
Partition type? primary/extended? primary
File system type? [ext2]? ext3
Start? 1214
End? 8924
(parted) print
Model: IBM-ESXS ST373207LW FN (scsi)
Disk /dev/sda: 8924cyl
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 8924,255,63. Each cylinder is 8225kB.
Partition Table: msdos
Number Start End Size Type File system Flags
1 0cyl 37cyl 37cyl primary ext3 boot
2 38cyl 1081cyl 1044cyl primary ext3
3 1082cyl 1212cyl 131cyl primary linux-swap
4 1214cyl 8923cyl 7710cyl primary
(parted) set 4 LVM
New state? [on]/off?
(parted) q
[root@open ~]#pvcreate /dev/sda4
Physical volume "/dev/sda4" successfully created

Monday, 1 April 2013

Cant connect to esxi 4 box using vsphere client

Cant connect to esxi 4 box using vsphere client
1. Ping the console with the IP
2. connect to the ESXi from web browser using the ip
3. restart your network devices
4. In the console F2 to Customize the system. Disable and then enable the Management Network if you get this error.

Wednesday, 6 March 2013

Create a Virtual Machine of your Existing Computer

Microsoft’s Sysinternals team has released a simple application called Disk2vhd, that lets you easily migrate an existing computer to a virtualized hard drive (VHD). It’s a tiny utility doesn’t even require instillation.
Create Virtual Hard Disks with Disk2VHD
When you run Disk2vhd, it will immediately show you all the drives and partitions on your computer that it can migrate to a VHD. Simply select a drive that you wish to create a VHD file from and click “Create.” Disk2vhd will convert the hard drive into a VHD file even if the computer /drive is currently in use.
When the Virtual Machine VHD file is created, you can run it in any desktop virtualization program including the free Windows Virtual PC, Virtual Box, or VMware Player. You can also mount the virtual machine as a standard hard drive in Windows 7, and can even boot from it if your computer is running Windows 7 Ultimate.

Saturday, 15 September 2012

How to copy files to ESXi server through SSH

Copying ISO images or files to ESXi is much easier through SSH. It can be done by enabling SSH and then transferring files through WinSCP.
To enable SSH on ESXi 5.1 follow the screen shot



Once the SSH is enabled download the WinSCP and the connect to the server, then you can access the ESXi server datastore through WinSCP.

The data store path is /vmfs/volumes/DATASTORE

Wednesday, 5 September 2012

Router RIP

IP Routing

Vyatta Virtual Router on ESXi 4.0

To install Vyatta Virtual router on ESXi 4.0
Downloading ISO image from Vyatta’s website
http://www.vyatta.com/downloads/index.php
Create a new Virtual Machine in ESXi
Attach the ISO downloaded to the new Vyatta Virtual Machine so it can boot from the ISO.
Configure the Vyatta Virtual Machine
Installing Vyatta
You can boot from the ISO you downloaded. because it’s also a “Live CD”
You’ll first need to login to Vyatta once it’s booted up. The default logins are (user: root pass: Vyatta) To install to the drive you will issue the command:
install-system
Configuring Ethernet Interfaces
Log on the system.
Configure the first NIC (eth0) which is going to be used for Internet access.
vyatta@vyatta> configure 
[edit] 
vyatta@vyatta# set interfaces ethernet eth0 address 192.168.2.3/24 
[edit] 
vyatta@vyatta# commit 
[edit] 
vyatta@vyatta# exit 
exit 
vyatta@vyatta>
Configure eth1 now
vyatta@vyatta> configure 
[edit] 
vyatta@vyatta# set interfaces ethernet eth1 address 192.168.3.3/24 
[edit] 
vyatta@vyatta# commit 
[edit] 
vyatta@vyatta# exit 
exit 
vyatta@vyatta>
Check interfaces configuration:
vyatta@vyatta:~$ configure 
[edit] 
vyatta@vyatta# show interfaces ethernet 
eth0 { 
address 192.168.2.3/24 
description Internet 
hw-id 00:15:5d:00:01:22 

eth1 { 
address 192.168.3.3/24 
description "subnet1:MOM 2005" 
hw-id 00:15:5d:00:01:23 
Save Configuration 
vyatta@vyatta# save 
Saving configuration to 
'/opt/vyatta/etc/config/config.boot'... 
Done 
[edit]
How to enable the Vyatta web-based GUI
vyatta@vyatta$
vyatta@vyatta# set service https
[edit]
vyatta@vyatta# commit
[edit]
OK
vyatta@vyatta#

Installing eyeOS on Ubuntu

Introduction
eyeOS is free Cloud Computing Operating System software which let you access all your necessary files, folders, office, calendar, contacts and much more anywhere in the world. eyeOS is released under the AGPLv3 license and only needs Apache 2 server, PHP5 and MySQL database server to run. With eyeOS you can build your own private Cloud Desktop today.
ApacheMySQLPHP
The Ubuntu base system includes Tasksel.
sudo apt-get install tasksel
You can either install LAMP using tasksel or install the LAMP packages as detailed above.
sudo tasksel install lamp-server
Installing Apache 2
To only install the apache2 webserver, use any method to install
apache2
Checking Apache 2 installation
With your web browser, go to the URI http://localhost : if you read "It works!", which is the content of the file /var/www/index.html , this proves Apache works.
Installing & Configuring Pre-requisites
Step 1: Install MySQL Database Server Package
To install MySQL database server, issue the following command:
$ sudo apt-get install mysql-server libmysql-java
Finally, issue the ldconfig command
$ sudo ldconfig
You can now login to your MySQL server, to test if it’s working from the terminal window, issue the command: "mysql -u root -p ", and the password when prompted.
Now let’s login and create "eyeos" database
mysql -u root -p

> CREATE DATABASE eyeos DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
> FLUSH PRIVILEGES;
> QUIT
Configure the mod-rewrite on Apache
Execute
a2enmod rewrite
Edit
nano /etc/apache2/sites-available/default
Change, at:
the variable AllowOverride to All
strong>/etc/init.d/apache2 restart
Increase the PHP memory limit
#vi /etc/php5/apache2/php.ini
memory_limit = 128M
display_errors = Off
post_max_size = 200M
upload_max_filesize = 100M
Install Other Pre-requisite Packages
There are couples of packages/software that are required for eyeOS to run smoothly; these are listed in the table below with link where to obtain them.
Python stomp.py (Needed in collaborative features)
Curl (Needed to transfer files with URL syntax)
recoll (Needed for document indexation)
exiftool (Needed to extract MP3 metadata)
OpenOffice Daemon (Needed to convert office documents)
Kaazing gateway: (Needed for real time notifications)
ActiveMQ Daemon (Needed for real time notifications)
Install Stomp.py Package
If stomp.py is needed, then you can grab the latest version from http://code.google.com/p/stomppy/ and install as follows:
1.
For Ubuntu download "_all.deb" version and then run the following command
dpkg -i stomp.py_3.0.2_all.deb
Install Curl Package
If Curl is not installed, then you can run the following command:
apt-get install php5-curl
Install Recoll
To download the package, issue this command:
sudo apt-get install recoll
Install ExifTool
To download the package, issue this command:
apt-get install libimage-exiftool-perl
Download & Install OpenOffice Daemon
Download and install Open Office if its not already installed:
apt-get install openoffice.org
From a terminal window, run Open Office in headless Modus with this command (in one line):
'sudo 'soffice "-accept=socket,host=localhost,port=2002;urp;" -headless'
Check if its running by typing: netstat -anp tcp
scroll down and you should find a line:
TCP 127.0.0.1:2002 0.0.0.0:0 LISTENING
Install Kaazing Gateway
http://www.kaazing.com/
Download and extract "kaazing-gateway-8.12_2-bin.tar.gz".
Change to the extracted directory and locate and run the server as follows:
cd /path/to/kaazing-gateway-8.12_2/bin
./gateway.start
Or
./path/to/kaazing-gateway-8.12_2/bin/gateway.start
Install Apache ActiveMQ Daemon
Download and extract ActiveMQ Daemon from here: "apache-activemq-5.3.2-bin.tar.gz".
Change to the extracted directory and locate and run the server as follows:
cd /path/to/apache-activemq-5.3.2/bin
./activemq-admin start

Or
./path/to/apache-activemq-5.3.2/bin/bin/activemq-admin start
Download and Installation eyeOS
Uncompress the downloaded package to your web directory you should see a folder named "eyeos-2.2.0.0" with 4 to 6 files and folders (depending on eyeOS version) by performing the following procedure:
mkdir eyeOS
tar –zxvf eyeos-2.2.0.0.tar.gz –C eyeOS/
sudo mv eyeOS/ /var/www/
After we do that If we are on a Linux/Unix machine we need to chmod 777 our eyeOS folder
chmod –R 777 /var/www/eyeOS/
Install eyeOS
Open your browser
On local Computer from home setup: http://localhost/eyeOS/install
On your hosting site or server: http://your-domain/eyeOS/install,
Ensure that all the required packages and pre-requisite are met. Scroll down and click the forward arrow icon.
The errors you may get
curl extension
if you get the error follow this
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
GD Extension
sudo apt-get install php5-gd
Restart Apache
# /etc/init.d/apache2 restart
Mcrypt Extension
sudo apt-get install php5-mcrypt phpmyadmin
SQLite Extension
sudo apt-get install sqlite php5-sqlite

Open the browser http://localhost/eyeOS/install and finish the installation

Enable and Disable Ubuntu Root Password

If you want to enable root account enter the following command.
$sudo passwd root
This will prompt for a new root password and once you confirm it, you can start using the root account to login.
If you want to disable root account in ubuntu you need to lock the root account by using the following command
$sudo passwd -l root
If you want to work on a root console you’d better use the following command
$sudo -i

Install a Printer in Ubuntu and share it for windows users


Install samba first.
In Ububtu, go to System -> Administration -> Printing.






Install the printer locally.(click New and connect to the locally connected printer).
After the printer installation, install the printer again from New. This time select Network Printer, Windows Printer via SAMBA. Enter the ipaddress of the ubuntu print server ipaddress:631/printer/printername.



In windows go to Control Panel, Printers. Add a network printer, connect a printer on the internet. Under the URL box enterhttp://ipaddress:631/printers/printername.

 

Monday, 6 August 2012

Resetting MySQL Root Password: CentOS

If you have forgotten the MySQL root password on CentOS you can reset by following the steps
Stop MySQL:
root# service mysqld stop
Start MySQL in safe mode:
root# mysqld_safe --skip-grant-tables &
Log into MySQL as root:
root# mysql -u root
Reset the password:
mysql> update mysql.user set password=PASSWORD("YourNewPassW0RD") where User='root';
mysql> flush privileges; exit;
Log out of MySQL and stop the Safe Mode:
root# service mysqld stop
Start MySQL in the normal mode:
root# service mysqld start
Log into MySQL with your new password:
root# mysql -u root -p
Enter password:
mysql> exit;

Saturday, 21 July 2012

Change IP address on Ubuntu Server

If Your Ubuntu System has set to use DHCP, you will want to change it to a static IP address
sudo vi /etc/network/interfaces
If you are using DHCP for your primary network card which is usually eth0, you will see the following lines
auto eth0
iface eth0 inet dhcp
To change to static address change the dhcp to static as shown below
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
Restart the neworking service using the following command
sudo /etc/init.d/networking restart

Thursday, 15 September 2011

Howto Install MySQL on Linux


Most of the Linux distro comes with MySQL. If you want use MySQL, my recommendation is that you download the latest version of MySQL and install it yourself. Later you can upgrade it to the latest version when it becomes available. In this article, I will explain how to install the latest free community edition of MySQL on Linux platform.
1. Download the latest stable relase of MySQL
Download mySQL from mysql.com . Please download the community edition of MySQL for your appropriate Linux platform. I downloaded the “Red Hat Enterprise Linux 5 RPM (x86)”. Make sure to download MySQL Server, Client and “Headers and libraries” from the download page.
• MySQL-client-community-5.1.25-0.rhel5.i386.rpm
• MySQL-server-community-5.1.25-0.rhel5.i386.rpm
• MySQL-devel-community-5.1.25-0.rhel5.i386.rpm
2. Remove the existing default MySQL that came with the Linux distro
Do not perform this on an system where the MySQL database is getting used by some application.
[local-host]# rpm -qa | grep -i mysql
mysql-5.0.22-2.1.0.1
mysqlclient10-3.23.58-4.RHEL4.1
[local-host]# rpm -e mysql –nodeps
warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave
[local-host]# rpm -e mysqlclient10
3. Install the downloaded MySQL package
Install the MySQL Server and Client packages as shown below.
[local-host]# rpm -ivh MySQL-server-community-5.1.25-0.rhel5.i386.rpm MySQL-client-community-5.1.25-0.rhel5.i386.rpm
Preparing… ########################################### [100%]
1:MySQL-client-community ########################################### [ 50%]
2:MySQL-server-community ########################################### [100%]
This will also display the following output and start the MySQL daemon automatically.
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h medica2 password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/
Starting MySQL.[ OK ]
Giving mysqld 2 seconds to start
Install the “Header and Libraries” that are part of the MySQL-devel packages.
[local-host]# rpm -ivh MySQL-devel-community-5.1.25-0.rhel5.i386.rpm
Preparing… ########################################### [100%]
1:MySQL-devel-community ########################################### [100%]
Note: When I was compiling PHP with MySQL option from source on the Linux system, it failed with the following error. Installing the MySQL-devel-community package fixed this problem in installing PHP from source.
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
4. Perform post-install security activities on MySQL.
At a bare minimum you should set a password for the root user as shown below:
[local-user]# /usr/bin/mysqladmin -u root password ‘My2Secure$Password’
The best option is to run the mysql_secure_installation script that will take care of all the typical security related items on the MySQL as shown below. On a high level this does the following items:
• Change the root password
• Remove the anonymous user
• Disallow root login from remote machines
• Remove the default sample test database
[local-host]# /usr/bin/mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we’ll need the current
password for the root user. If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on…
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
You already have a root password set, so you can safely answer ‘n’.
Change the root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
… Success!
Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
… Success!
By default, MySQL comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database…
… Success!
- Removing privileges on test database…
… Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
… Success!
Cleaning up…
All done! If you’ve completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
5. Verify the MySQL installation:
You can check the MySQL installed version by performing mysql -V as shown below:
[local-host]# mysql -V
mysql Ver 14.14 Distrib 5.1.25-rc, for redhat-linux-gnu (i686) using readline 5.1
Connect to the MySQL database using the root user and make sure the connection is successfull.
[local-host]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.1.25-rc-community MySQL Community Server (GPL)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
Follows the steps below to stop and start MySQL
[local-host]# service mysql status
MySQL running (12588) [ OK ]
[local-host]# service mysql stop
Shutting down MySQL. [ OK ]
[local-host]# service mysql start
Starting MySQL. [ OK ]

Installation - PhpAdmin

First things first, we need to get the latest version of phpMyAdmin, at the time this tutorial was written the latest stable version was 2.5.5-pl1, and you can get it at;
The phpMyAdmin Home Page
Grab the download, then grab a terminal window and do the following;
Change to the directory where you saved the downloaded file , such as;
$cd mydownloads


Cool, now we need to move the file to the root directory of your Apache webserver, which is usually/usr/local/apache/htdocs, also, root usually owns the Apache directory structure so you'll need to do the rest as root, so; 

$su 

$password 

Now, lets move the file to where we need it; 

#mv phpMyAdmin-2.5.5-pl1.tar.gz /usr/local/apache/htdocs 

Done, now make the Apache root directory your working directory; 

#cd /usr/local/apache/htdocs 

Cool, now lets unpack the file; 


#tar -zxf phpMyAdmin-2.5.5-pl1.tar.gz 

That will take a second, then, when the machine returns the prompt, do a directory listing; 

#ls 

You should see a new directory which has been created called phpMyAdmin-2.5.5-pl1, assuming you do go ahead and get rid of the original file; 

#rm phpMyAdmin-2.5.5-pl1.tar.gz 

Now, the new directory name is a bit long, and definatley not something you want to type in all the time, so lets make it easier; 

#mv phpMyAdmin-2.5.5-pl1 phpmyadmin 

Cool, now you've renamed the directory to something a little easier to remember, now make that your working directory; 

#cd phpmyadmin 

Configuration -

Now, what we need to do is edit the config.inc.php file so it works with your setup. So using vi, or whatever your favorite editor happens to be, open config.inc.php, find the following lines, and edit them as appropriate for your setup; 

$cfg['PmaAbsoluteUri'] = ''; (Default) 
$cfg['PmaAbsoluteUri'] = 'http://www.yoursite.com/phpmyadmin/'; (Edited) 

$cfg['Servers'][$i]['user'] = 'root'; (Default) 
$cfg['Servers'][$i]['user'] = 'your_MySQL_root_user'; (Edited) 

$cfg['Servers'][$i]['password'] = ''; (Default) 
$cfg['Servers'][$i]['password'] = 'your_password'; (Edited) 

Thats it, save the file and close it. 

Now, lets see if it works, open a browser and point it to phpMyAdmin by using your site info such aswww.yoursite.com/phpmyadmin, or, localhost/phpmyadmin if you are only working locally. If all is well you should see the welcome screen for phpMyAdmin !, if you don't, then check your logs and remember, Google is your friend. If you see a page full of PHP errors, make sure you used the correct username and password when you edited the lines mentioned above. 

Now, knowing what this cool program is capable of, its probably not something you want just anyone to be able to access, luckily we can take care of that very easily using Apache 's authentication process, so lets do it ! 

Still as root make a directory to store the password file we will be creating; 

#mkdir /usr/local/apache/passwd 

Now, lets create the file and add an allowed user; 

#/usr/local/apache/bin/htpasswd -c /usr/local/apache/passwd/authpass myphp 

htpasswd will prompt you for the password you would like to assign to this user, once entered, it will create the file authpass and populate it with the information for the user called myphp. You can use whatever names you like, this is only an example. 

Now the final step, change to your Apache configuration directory; 

#cd /usr/local/apache/conf 

And again using your favorite editor, open the file named httpd.conf and find the following section; 

Options FollowSymLinks AllowOverride None 

Directly under this section add the following (assuming you used the names from the example above); 

AuthType Basic AuthName "myphp" AuthUserFile /usr/local/apache/passwd/authpass Require user myphp 

Thats it, save the file and close it, then restart Apache by issuing the following command; 

#/usr/local/apache/bin/apachectl restart 

Perfect, now fire up your browser again and point it back to your phpMyAdmin site, this time you should be prompted for a username and password before being allowed access to the site. Enter the required information, and you are in business !.

Install Joomla!

Link: http://help.joomla.org/content/view/1944/302/

Instruction Guide to Install PHP5 from Source on Linux

All Linux distributions comes with PHP. However, it is recommended to download latest PHP source code, compile and install on Linux. This will make it easier to upgrade PHP on an ongoing basis immediately after a new patch or release is available for download from PHP. This article explains how to install PHP5 from source on Linux.
1. Prerequisites
Apache web server should already be installed. Refer to my previous post on How to install Apache 2 on Linux. If you are planning to use PHP with MySQL, you should have My SQL already installed. I wrote about How to install MySQL on Linux.
2. Download PHP
Download the latest source code from PHP Download page. Current stable release is 5.2.6. Move the source to /usr/local/src and extract is as shown below.
# bzip2 -d php-5.2.6.tar.bz2
# tar xvf php-5.2.6.tar
3. Install PHP
View all configuration options available for PHP using ./configure –-help (two hyphen in front of help). The most commonly used option is –-prefix={install-dir-name} to install PHP on a user defined directory.
# cd php-5.2.6
# ./configure --help
In the following example, PHP will be compiled and installed under the default location /usr/local/lib with Apache configuration and MySQL support.
# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
# make
# make install
# cp php.ini-dist /usr/local/lib/php.ini
4. Configure httpd.conf for PHP
Modify the /usr/local/apache2/conf/httpd.conf to add the following:
SetHandler application/x-httpd-php 
Make sure the httpd.conf has the following line that will get automatically inserted during the PHP installation process.
LoadModule php5_module modules/libphp5.so
Restart the apache as shown below:
# /usr/local/apache2/bin/apachectl restart
5. Verify PHP Installation
Create a test.php under /usr/local/apache2/htdocs with the following content
# vi test.php

Go to http://local-host/test.php , which will show a detailed information about all the PHP configuration options and PHP modules installed on the system.
6. Trouble shooting during installation
Error 1: configure: error: xml2-config not found:
While performing the ./configure during PHP installation, you may get the following error:
# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
Install thelibxml2-devel and zlib-devel as shown below to the fix this issue.
# rpm -ivh /home/downloads/linux-iso/libxml2-devel-2.6.26-2.1.2.0.1.i386.rpm /home/downloads/linux-iso/zlib-devel-1.2.3-3.i386.rpm
Preparing... ########################################### [100%]
1:zlib-devel ########################################### [ 50%]
2:libxml2-devel ########################################### [100%]
Error 2: configure: error: Cannot find MySQL header files.
While performing the ./configure during PHP installation, you may get the following error:
# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
Install the MySQL-devel-community package as shown below to fix this issue.
# rpm -ivh /home/downloads/MySQL-devel-community-5.1.25-0.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-devel-community ########################################### [100%]

Web browsing in linux terminal

To browse internet from the linux terminal you can use the application "elinks"
Install elinks if not installed using the command
#yum install elinks
To browse type elinks on the terminal.

Monday, 5 September 2011

Vyatta Virtual Router on ESXi 4.0

To install Vyatta Virtual router on ESXi 4.0
Downloading ISO image from Vyatta’s website
http://www.vyatta.com/downloads/index.php
Create a new Virtual Machine in ESXi
Attach the ISO downloaded to the new Vyatta Virtual Machine so it can boot from the ISO.
Configure the Vyatta Virtual Machine
Installing Vyatta
You can boot from the ISO you downloaded. because it’s also a “Live CD”
You’ll first need to login to Vyatta once it’s booted up. The default logins are (user: root pass: Vyatta) To install to the drive you will issue the command:
install-system
Configuring Ethernet Interfaces
Log on the system.
Configure the first NIC (eth0) which is going to be used for Internet access.
vyatta@vyatta> configure 
[edit] 
vyatta@vyatta# set interfaces ethernet eth0 address 192.168.2.3/24 
[edit] 
vyatta@vyatta# commit 
[edit] 
vyatta@vyatta# exit 
exit 
vyatta@vyatta>
Configure eth1 now
vyatta@vyatta> configure 
[edit] 
vyatta@vyatta# set interfaces ethernet eth1 address 192.168.3.3/24 
[edit] 
vyatta@vyatta# commit 
[edit] 
vyatta@vyatta# exit 
exit 
vyatta@vyatta>
Check interfaces configuration:
vyatta@vyatta:~$ configure 
[edit] 
vyatta@vyatta# show interfaces ethernet 
eth0 { 
address 192.168.2.3/24 
description Internet 
hw-id 00:15:5d:00:01:22 

eth1 { 
address 192.168.3.3/24 
description "subnet1:MOM 2005" 
hw-id 00:15:5d:00:01:23 
Save Configuration 
vyatta@vyatta# save 
Saving configuration to 
'/opt/vyatta/etc/config/config.boot'... 
Done 
[edit]
How to enable the Vyatta web-based GUI
vyatta@vyatta$
vyatta@vyatta# set service https
[edit]
vyatta@vyatta# commit
[edit]
OK
vyatta@vyatta#

How to Reset Watchguard Firebox Edge to Factory Default

To set the Firebox X Edge e-Series to the factory default settings:
Disconnect the power supply.
Hold down the Reset button on the rear side of the Edge.
Connect the power supply while you continue to hold down the Reset button.
Continue to hold down the button until the yellow Attn light stays on. This shows you that the Edge was successfully restored to the factory default settings.
This process can take 45 seconds or more.
Do not try to connect to the Edge at this time. You must start the Edge one more time, as the subsequent steps show. If you do not start the Edge one more time, when you try to connect to the Edge you will see a web page that shows the message, “Your WatchGuard Firebox X Edge is running from a backup copy of firmware.” You could also see this message if the Reset button is stuck in the depressed position. If you continue to see this page, check the Reset button, and start the Edge again.
Disconnect the power supply.
Connect the power supply again.
The Power Indicator is on and your Edge is reset.
Once it's reset, you can use 192.168.111.1 to access the firebox.
By default the read password is readonly and configuration password is readwrite

Install Apache

Remove RPM Versions of the Applications
Before we start with our source code install, we need to remove all the existing RPM files for these products. To find out what RPMs are already installed, use the RPM query command:
rpm -qa
in conjunction with grep to filter your results:
rpm -qa | grep -i apache
rpm -qa | grep -i httpd
rpm -qa | grep -i php
rpm -qa | grep -i mysql
The 'httpd' search is in case you have Apache2 installed via RPM.
To remove the RPMs generated by these commands, do
rpm -e filename
for each RPM you found in the query. If you have any content in your MySQL database already, the RPM removal step should not delete the database files. When you reinstall MySQL, you should be able to move all those files to your new MySQL data directory and have access to them all again.
1. Download Apache
Download the latest version from Apache HTTP Server Project . Current stable release of Apache is 2.2.9. Move the source to /usr/local/src and extract it as shown below.
# cd /usr/local/src
# gzip -d httpd-2.2.9.tar.gz
# tar xvf httpd-2.2.9.tar
2. Install Apache
View all configuration options available for Apache using ./configure –help (two hyphen in front of help). The most commonly used option is –prefix={install-dir-name} to install Apache on a user defined directory.
# cd httpd-2.2.9
# ./configure --help
In the following example, Apache will be compiled and installed to the default location /usr/local/apache2 with the DSO capability. Using the –enable-so option, you can load modules to Apache at runtime via the Dynamic Shared Object (DSO) mechanism, rather than requiring a recompilation.
# ./configure --enable-so
# make
# make install
Note: During the ./configure, you may get the following error message.
# ./configure --enable-so
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
configure failed for srclib/apr
Install the gcc and the dependent modules as shown below and try ./configure again to fix the above issue.
# rpm -ivh gcc-4.1.2-14.el5.i386.rpm glibc-devel-2.5-18.i386.rpm glibc-headers-2.5-18.i38
6.rpm kernel-headers-2.6.18-53.el5.i386.rpm
Preparing... ########################################### [100%]
1:kernel-headers ########################################### [ 25%]
2:glibc-headers ########################################### [ 50%]
3:glibc-devel ########################################### [ 75%]
4:gcc ########################################### [100%]
3. Start Apache and verify installation
# cd /usr/local/apache2/bin
# ./apachectl start
Go to http://local-host, which should display the default message “It Works!”
[root@localhost RPMS]# rpm -ivh gcc-3.4.4-2.i386.rpm glibc-devel-2.3.4-2.13.i386.rpm glibc-headers-2.3.4-2.13.i386.rpm
warning: gcc-3.4.4-2.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
kernel-headers is needed by glibc-headers-2.3.4-2.13.i386
kernel-headers >= 2.2.1 is needed by glibc-headers-2.3.4-2.13.i386
Suggested resolutions:
glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
[root@localhost RPMS]# rpm -ivh gcc-3.4.4-2.i386.rpm glibc-devel-2.3.4-2.13.i386.rpm glibc-headers-2.3.4-2.13.i386.rpm glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
warning: gcc-3.4.4-2.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:glibc-kernheaders ########################################### [ 25%]
2:glibc-headers ########################################### [ 50%]
3:glibc-devel ########################################### [ 75%]
4:gcc ########################################### [100%]
4. Start Apache automatically during system startup
Modify the /etc/rc.d/init.d/httpd script and change apachectl and httpd variable to point to the appropriate new location as shown below. Please note that this httpd script was originally installed as part of the default Apache from the Linux distribution.
apachectl=/usr/local/apache2/bin/apachectl
httpd=${HTTPD-/usr/local/apache2/bin/httpd}
Now, you can perform the following to stop and start the Apache
# service httpd stop
# service httpd start
Setup the Apache to automatically startup during reboot as shown below.
# chkconfig --list httpd
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
# chkconfig --level 2345 httpd on
# chkconfig --list httpd
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off