-xen is the basis for virtualization in RHEL 5
-Advantages of virtualization
1-effective resource usage
2-easy management
para virtualization-same arch os support
full virtualization-any arch os support
-para virtualization
packages-
kernel-xen from pub/Server
Virt-Manager from pub/VT
yum install kernel-xen
yum install virt-manager
yum install xen
uname -r
reboot system
application->system tools->Virtual machine manager->new
To automatically run the guest after a system (Dom0) reboot, we have to create the following link:
# ln -s /etc/xen/[guest_name] /etc/xen/auto/
We can manage the Xen Guest with xm commands, virsh commands or virt-manager.
Virt-Manager
# virt-manager
xm commands
List Domains (Xen Guests)
# xm list
Start a Guest
# xm create [guest-config]
Connect to a guest console ( Back: ESC-] (US-keyboard), Ctrl-5 (German keyboard))
# xm console [guest_name]
Shutdown a guest
# xm shutdown [guest_name]
Destroy (Power off) a guest
# xm destroy [guest_name]
Monitor guests
# xm top
virsh commands
# virsh
virsh # help
Commands:
autostart autostart a domain
capabilities capabilities
connect (re)connect to hypervisor
console connect to the guest console
create create a domain from an XML file
start start a (previously defined) inactive domain
destroy destroy a domain
define define (but don't start) a domain from an XML file
domid convert a domain name or UUID to domain id
domuuid convert a domain name or id to domain UUID
dominfo domain information
domname convert a domain id or UUID to domain name
domstate domain state
dumpxml domain information in XML
help print help
list list domains
net-autostart autostart a network
net-create create a network from an XML file
net-define define (but don't start) a network from an XML file
net-destroy destroy a network
net-dumpxml network information in XML
net-list list networks
net-name convert a network UUID to network name
net-start start a (previously defined) inactive network
net-undefine undefine an inactive network
net-uuid convert a network name to network UUID
nodeinfo node information
quit quit this interactive terminal
reboot reboot a domain
restore restore a domain from a saved state in a file
resume resume a domain
save save a domain state to a file
schedinfo show/set scheduler parameters
dump dump the core of a domain to a file for analysis
shutdown gracefully shutdown a domain
setmem change memory allocation
setmaxmem change maximum memory limit
setvcpus change number of virtual CPUs
suspend suspend a domain
undefine undefine an inactive domain
vcpuinfo domain vcpu information
vcpupin control domain vcpu affinity
version show version
vncdisplay vnc display
attach-device attach device from an XML file
detach-device detach device from an XML file
attach-interface attach network interface
detach-interface detach network interface
attach-disk attach disk device
detach-disk detach disk device
Exp.: Start a guest with virsh
# virsh start [guest_name]
Sunday, November 21, 2010
###KickStart [Unattended Installation]###
Kickstart helps to install system unattended. It uses kickstart configuration file and dhcp service for this.
In windows systems kickstart file is known as answer file.
###These are the steps happening.###
Server[dhcp+ks] client
1. asks IP and location of kickstart file
2.gives the info
3. Takes the ks.cfg file and mounts share of OS
###dhcp [nfs/ftp/http] + ks.cfg [nfs]###
The dhcp is using for getting IP for the client machine at first for instation and to get the location of Ks.cfg file. The remote installation image can be of NFS,HTTP or FTP. The kickstar file will be shared using NFS.
###KickStart Configuration###
package = system-config-kickstart
#yum -y install system-config-kickstart
#system-config-kickstart
Basic configuration
Default Language = English USA
Keyboard = U S English
Time Zone = Asia/Culcutta
Root Password = redhat
Confirm Password = redhat
check the encryption box
Target Architecture = x86,AMD64 or Intel EM64T
Check the reboot checkbox
Installation Method
Installaton method = Perform new installation
Choose the Installation Method = NFS //You can use HTTP or FTP if you want
NFS server = IP of the machine which contains NFS image of DVD
NFS directory = Path of NFS share
Boot Loader options
Install New Boot Loader
Use GRUB password if required
Install boot loader on MBR
Partition Information
Do not clear MBR
Remove all exisiting partitions //Removing linux partitions only wont work all time. Windows partitions will be deleted.
click add button and configure as required
Network Configuration
Click Add Network Devices button
Select the network device which is connected to ur machine
network type = DHCP or STATIC [manual]
Authentication
Authentication Configuration
check use shadow passwords
check use MD5
Firewall Configuration
Firewall Configuration
Security level = Disable firewall
SELinux = Disabled
Display Configuration
Check Configure the x-window system
In General Tab
Color Depth Resolution
8 1024*768 //Default 640*480 will give a blurred image
Default Desktop
Check Gnome
Check Start X window system on Boot
package selection
Nothing to do //We will add package lines
Pre-Installation Script
Add if wanted
Post-Installation Script
Add if wanted
Configuration over. Save the file. Open the file for further editing.
#vi ks.cfg
Add these lines - Otherwise it wont work.
key --skip
%packages
And these lines for Graphics
@admin-tools
@base
@base-x
@core
@dialup
@editors
@games
@gnome-desktop
@graphical-internet
@graphics
@java
@office
@printing
@sound-and-video
@text-internet
###Make it as NFS share###
copy the ks.cfg file to some dir and share it via NFS
#mkdir /kick
#cp ks.cfg /kick/
#vi /etc/exports
/kick *()
#exportfs -a
###DHCP Configuration###
Add these lines to DHCP Configuration file
#vi /etc/dhcpd.conf
filename "/kick/ks.cfg";
next-server 192.168.1.101; // [ip of the machine which contains kickstart file(ks.cfg)]
#service dhcpd restart
#service nfs restart
###Installation###
#Boot: linux ks
Have a break. The system will be ready when you get back!
In windows systems kickstart file is known as answer file.
###These are the steps happening.###
Server[dhcp+ks] client
1. asks IP and location of kickstart file
2.gives the info
3. Takes the ks.cfg file and mounts share of OS
###dhcp [nfs/ftp/http] + ks.cfg [nfs]###
The dhcp is using for getting IP for the client machine at first for instation and to get the location of Ks.cfg file. The remote installation image can be of NFS,HTTP or FTP. The kickstar file will be shared using NFS.
###KickStart Configuration###
package = system-config-kickstart
#yum -y install system-config-kickstart
#system-config-kickstart
Basic configuration
Default Language = English USA
Keyboard = U S English
Time Zone = Asia/Culcutta
Root Password = redhat
Confirm Password = redhat
check the encryption box
Target Architecture = x86,AMD64 or Intel EM64T
Check the reboot checkbox
Installation Method
Installaton method = Perform new installation
Choose the Installation Method = NFS //You can use HTTP or FTP if you want
NFS server = IP of the machine which contains NFS image of DVD
NFS directory = Path of NFS share
Boot Loader options
Install New Boot Loader
Use GRUB password if required
Install boot loader on MBR
Partition Information
Do not clear MBR
Remove all exisiting partitions //Removing linux partitions only wont work all time. Windows partitions will be deleted.
click add button and configure as required
Network Configuration
Click Add Network Devices button
Select the network device which is connected to ur machine
network type = DHCP or STATIC [manual]
Authentication
Authentication Configuration
check use shadow passwords
check use MD5
Firewall Configuration
Firewall Configuration
Security level = Disable firewall
SELinux = Disabled
Display Configuration
Check Configure the x-window system
In General Tab
Color Depth Resolution
8 1024*768 //Default 640*480 will give a blurred image
Default Desktop
Check Gnome
Check Start X window system on Boot
package selection
Nothing to do //We will add package lines
Pre-Installation Script
Add if wanted
Post-Installation Script
Add if wanted
Configuration over. Save the file. Open the file for further editing.
#vi ks.cfg
Add these lines - Otherwise it wont work.
key --skip
%packages
And these lines for Graphics
@admin-tools
@base
@base-x
@core
@dialup
@editors
@games
@gnome-desktop
@graphical-internet
@graphics
@java
@office
@printing
@sound-and-video
@text-internet
###Make it as NFS share###
copy the ks.cfg file to some dir and share it via NFS
#mkdir /kick
#cp ks.cfg /kick/
#vi /etc/exports
/kick *()
#exportfs -a
###DHCP Configuration###
Add these lines to DHCP Configuration file
#vi /etc/dhcpd.conf
filename "/kick/ks.cfg";
next-server 192.168.1.101; // [ip of the machine which contains kickstart file(ks.cfg)]
#service dhcpd restart
#service nfs restart
###Installation###
#Boot: linux ks
Have a break. The system will be ready when you get back!
Installing Virtualbox on Fedora 13
Today we are going to see how to install Oracle Virtualbox in Fedora 13 Goddard which is the latest release from the Fedora Community.
- To install virtualbox we should first go to http://www.virtualbox.org.
- In the downloads section we can see Virtualbox for Linux hosts and if we follow that link we can see the Virtualbox for Fedora 13′s link.
- Depending on the architecture of OS installed download either i386 or AMD64 version.
- Now before installing it let us install 2 important packages namely gcc and kernel-devel packages.
#yum install gccNow to install kernels development package first find out the current kernel you are using.
#uname -rSee whether there is anything like “PAE” in the output of the above command. if so install the PAE kernels devel version. else normal version.
#yum install kernel-devel or #yum install kernel-PAE-develNow import the public key of virtualbox package using the command
Now navigate to the folder which contains the virtualbox downloaded package and give the command.wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | rpm --import -
#yum localinstall VirtualBox-3.2-3.2.6_63112_fedora13-1.i686.rpmThe above command will pull out the necessary dependencies if any and will compile the kernel module too
How to install MySQL on Fedora 13
- Install MySQL
yum install mysql-server php-mysql
How to configure MySQL on Fedora 13
- Set the MySQL service to start on boot
chkconfig --levels 235 mysqld on - Start the MySQL service
service mysqld start - Log into MySQL
mysql -u root - Set the root user password for all local domains
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new-password');
SET PASSWORD FOR 'root'@'hostname' = PASSWORD('new-password');
SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('new-password');
- Drop the Any user
DROP USER ''@'localhost';
DROP USER ''@'hostname';
DROP USER ''@'%'; - Drop the test database
DROP DATABASE test; - Exit MySQL
exit - ----------------------------------------------------------------
Install MySQL Database 5.1 (5.1.52) on Fedora 13/14, CentOS 5.5, Red Hat (RHEL) 5.5/6
1. Change root user
su - ## OR ## sudo -i
2. Install Remi repository
Fedora
## Remi Dependency on Fedora 14 rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm ## Remi Dependency on Fedora 13, 12, 11, 10, 9, 8 rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm ## Fedora 14 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm ## Fedora 13 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-13.rpm ## Fedora 12 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-12.rpm ## Fedora 11 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-11.rpm ## Fedora 10 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-10.rpm ## Fedora 9 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-9.rpm ## Fedora 8 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-8.rpm
CentOS and Red Hat (RHEL)
## Remi Dependency on CentOS and Red Hat (RHEL) rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
3. Check Available MySQL versions
Fedora 14
yum list mysql
Fedora 14, (13, 12, 11, 10, 9, 8, 7), CentOS 5.5 and Red Hat (RHEL) 5.5
yum --enablerepo=remi list mysql
Loaded plugins: changelog, fastestmirror, presto, refresh-packagekit ... remi | 3.0 kB 00:00 remi/primary_db | 106 kB 00:00 Available Packages mysql.i686 5.1.52-1.fc14.remi remi mysql-server.i686 5.1.52-1.fc14.remi remi
4. Update or Install MySQL 5.1 (5.1.50)
Fedora 14
yum install mysql mysql-server
Fedora 13 (12, 11, 10, 9, 8, 7), CentOS 5.5 and Red Hat (RHEL) 5.5
yum --enablerepo=remi install mysql mysql-server
... Dependencies Resolved ============================================================================================== Package Arch Version Repository Size ============================================================================================== Installing: mysql i686 5.1.52-1.fc14.remi remi 881 k mysql-server i686 5.1.52-1.fc14.remi remi 8.8 M Installing for dependencies: mysql-libs i686 5.1.52-1.fc14.remi remi 1.2 M perl-DBD-MySQL i686 4.017-1.fc14 fedora 137 k perl-DBI i686 1.613-1.fc14 fedora 775 k Transaction Summary ============================================================================================== Install 5 Package(s) Total download size: 12 M Installed size: 33 M Is this ok [y/N]: y Downloading Packages: Setting up and reading Presto delta metadata Processing delta metadata Package(s) data still to download: 12 M (1/5): mysql-5.1.52-1.fc14.remi.i686.rpm | 881 kB 00:00 (2/5): mysql-libs-5.1.52-1.fc14.remi.i686.rpm | 1.2 MB 00:00 (3/5): mysql-server-5.1.52-1.fc14.remi.i686.rpm | 8.8 MB 00:04 (4/5): perl-DBD-MySQL-4.017-1.fc14.i686.rpm | 137 kB 00:00 (5/5): perl-DBI-1.613-1.fc14.i686.rpm | 775 kB 00:00 ---------------------------------------------------------------------------------------------- Total 1.5 MB/s | 12 MB 00:07 warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY remi/gpgkey | 2.6 kB 00:00 ... Importing GPG key 0x00F97F56: Userid : Remi Collet <RPMS@FamilleCollet.com> Package: remi-release-14-6.fc14.remi.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. Installing : mysql-libs-5.1.52-1.fc14.remi.i686 1/5 WARNING : This MySQL RPM is not an official Fedora/Redhat build and it overrides the official one. Don\'t file bugs on Fedora Project nor Redhat. Use dedicated forums http://forums.famillecollet.com/ Installing : perl-DBI-1.613-1.fc14.i686 2/5 Installing : mysql-5.1.52-1.fc14.remi.i686 3/5 Installing : perl-DBD-MySQL-4.017-1.fc14.i686 4/5 Installing : mysql-server-5.1.52-1.fc14.remi.i686 5/5 Installed: mysql.i686 0:5.1.52-1.fc14.remi mysql-server.i686 0:5.1.52-1.fc14.remi Dependency Installed: mysql-libs.i686 0:5.1.52-1.fc14.remi perl-DBD-MySQL.i686 0:4.017-1.fc14 perl-DBI.i686 0:1.613-1.fc14 Complete!
5. Start MySQL server and autostart MySQL on boot
/etc/init.d/mysqld start ## use restart after update ## OR ## service mysqld start ## use restart after update chkconfig --levels 235 mysqld on
6. MySQL Secure Installation
- Set (Change) root password
- Remove anonymous users
- Disallow root login remotely
- Remove test database and access to it
- Reload privilege tables
Start MySQL Secure Installation with following command
/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. Set 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!
mysqladmin -u root password [your_password_here] ## Example ## mysqladmin -u root password myownsecrectpass
7. Connect to MySQL database (localhost) with password
mysql -u root -p ## OR ## mysql -h localhost -u root -p
8. Create Database, Create MySQL User and Enable Remote Connections to MySQL Database
This example uses following parameters:- DB_NAME = webdb
- USER_NAME = webdb_user
- REMOTE_IP = 10.0.15.25
- PASSWORD = password123
- PERMISSIONS = ALL
## CREATE DATABASE ## mysql> CREATE DATABASE webdb; ## CREATE USER ## mysql> CREATE USER 'webdb_user'@'10.0.15.25' IDENTIFIED BY 'password123'; ## GRANT PERMISSIONS ## mysql> GRANT ALL ON webdb.* TO webdb_user@'10.0.15.25'; ## FLUSH PRIVILEGES, Tell the server to reload the grant tables ## mysql> FLUSH PRIVILEGES;
Enable Remote Connection to MySQL Server –> Open MySQL Port (3306) on Iptables Firewall (as root user again)
1. Edit /etc/sysconfig/iptables file:
nano -w /etc/sysconfig/iptables
2. Add following line before COMMIT:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
3. Restart Iptables Firewall:
service iptables restart ## OR ## /etc/init.d/iptables restart
4. Test remote connection:
mysql -h dbserver_name_or_ip_address -u webdb_user -p webdb
Install Eclipse SDK 3.6.1 (Helios) on Fedora 14/13, CentOS/RHEL 5.5/6
This is guide, howto install latest Eclipse SDK 3.6.1 (Helios) on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 14, Fedora 13, Fedora 12, CentOS 5.5, Red Hat (RHEL) 5.5, Red Hat (RHEL) 6. And even with earlier versions.
Eclipse is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written primarily in Java and can be used to develop applications in Java and, by means of various plug-ins, other languages including C, C++, COBOL, Python, Perl, PHP, Scala and Ruby (including Ruby on Rails framework).
Install Eclipse SDK 3.6.1 (Helios) on Fedora, CentOS, Red Hat (RHEL)
1. Install Sun/Oracle Java JDK 6 on Fedora, CentOS, Red Hat (RHEL)
2. Download Eclipse SDK 3.6.1 (Helios)
Download suitable version from www.eclipse.org/downloads. This guide uses Eclipse Classic 3.6.1 version. Another popular versions are Eclipse IDE for Java EE Developers, Eclipse IDE for Java Developers and Eclipse for PHP Developers. Select also 32-bit or 64-bit version depending on your system.3. Change root user
su - ## OR ## sudo -i
4. Extract Eclipse package (example to /opt directory)
tar -xvzf eclipse-SDK-3.6.1-linux-gtk.tar.gz -C /opt
5. Add read permissions to all files
chmod -R +r /opt/eclipse
6. Create Eclipse executable on /usr/bin path
touch /usr/bin/eclipse chmod 755 /usr/bin/eclipse ## Open eclipse file with your favourite editor ## nano -w /usr/bin/eclipse ## Paste following content to file ## #!/bin/sh export ECLIPSE_HOME="/opt/eclipse" $ECLIPSE_HOME/eclipse $*
7. Create Gnome desktop launcher
## Create following file, with our favourite editor ## /usr/share/applications/eclipse.desktop ## Add following content to file and save ## [Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse SDK 3.6.1 Exec=eclipse Icon=/opt/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development; StartupNotify=true
8. Start Eclipse 3.6.1
From command line use eclipse commandeclipse
9. Eclipse 3.6 screenshots, running (and starting) on Fedora 13 32-bit and CentOS 5.5 64-bit
Eclipse loadingEclipse 3.6 running on Fedora 13 32-bit
Eclipse 3.6 running on CentOS 5.5 64-bit
Troubleshooting
If you get something like following errors:
Failed to load the JNI shared library /usr/java/jdk1.6.0_21/jre/bin/../lib/i386/client/libjvm.soOr
/usr/java/jdk1.6.0_21/jre/bin/../lib/i386/client/libjvm.so: cannot enable executable stack as shared object requires: Permission denied
Then do following:
chcon -t execmem_exec_t '/opt/eclipse/eclipse'
Install Sun/Oracle Java JDK/JRE 6 on Fedora 14/13, CentOS/RHEL 5.5/6
By default, Fedora 14, Fedora 13, Fedora 12, CentOS 5.5 and Red Hat (RHEL) 5.5/6 Linux operating systems use the OpenJDK Java, which is a good choice for normal use and it works with almost all the Java programs normally. OpenJDK is also easy to install and maintain with YUM package management, but some cases, Sun/Oracle Java installation is necessary, for example, if some program have to compile with Sun/Oracle Java or a particular program does not work without Sun/Oracle Java.
Install Sun/Oracle Java JDK (Java Development Kit)/JRE (Java Runtime Environment) 6u22 on Fedora 14, Fedora 13, Fedora 12, CentOS 5.5, Red Hat (RHEL) 5.5 and Red Hat (RHEL) 6
1. Download Sun/Oracle Java JDK or JRE RPMs
Download Sun/Oracle Java JDK or JRE from here (current version is JDK 6 Update 22) http://www.oracle.com/technetwork/java/javase/downloads/index.html.Note: Select rpm.bin package (example jdk-6u22-linux-i586-rpm.bin, jre-6u22-linux-i586-rpm.bin, jdk-6u22-linux-x64-rpm.bin or jre-6u22-linux-x64-rpm.bin).
2. Change to root user.
sudo -i ## OR ## su -
3a. Run Sun/Oracle Java JDK binary
chmod +x /path/to/file/jdk-6u22-linux-*-rpm.bin /path/to/binary/jdk-6u22-linux-*-rpm.bin ## OR ## sh /path/to/binary/jdk-6u22-linux-*-rpm.bin
3b. Run Sun/Oracle Java JRE binary
chmod +x /path/to/file/jre-6u22-linux-*-rpm.bin /path/to/binary/jre-6u22-linux-*-rpm.bin ## OR ## sh /path/to/binary/jre-6u22-linux-*-rpm.bin
4a. Install Sun/Oracle JDK java, javaws, libjavaplugin.so (for Firefox/Mozilla) and javac with alternatives –install command
## java ## alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_22/jre/bin/java 20000 ## javaws (32-bit only) ## alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.6.0_22/jre/bin/javaws 20000 ## Java Browser (Mozilla) Plugin 32-bit ## alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jdk1.6.0_22/jre/lib/i386/libnpjp2.so 20000 ## Java Browser (Mozilla) Plugin 64-bit ## alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jdk1.6.0_22/jre/lib/amd64/libnpjp2.so 20000 ## Install javac only if you installed JDK (Java Development Kit) package ## alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_22/bin/javac 20000
4b. Install Sun/Oracle JRE java, javaws and libjavaplugin.so (for Firefox/Mozilla) with alternatives –install command
## java ## alternatives --install /usr/bin/java java /usr/java/jre1.6.0_22/bin/java 20000 ## javaws (32-bit only) ## alternatives --install /usr/bin/javaws javaws /usr/java/jre1.6.0_22/bin/javaws 20000 ## Java Browser (Mozilla) Plugin 32-bit ## alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jre1.6.0_22/lib/i386/libnpjp2.so 20000 ## Java Browser (Mozilla) Plugin 64-bit ## alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jre1.6.0_22/lib/amd64/libnpjp2.so 20000
5. Check current java, javac, javaws and libjavaplugin.so versions
java -version java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing) javac -version javac 1.6.0_22 javaws Java(TM) Web Start 1.6.0_22 [...]
6. Swap between OpenJDK and Sun/Oracle JDK versions
alternatives --config java # or javac or javaws or libjavaplugin.so There are 4 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java 2 /usr/lib/jvm/jre-1.5.0-gcj/bin/java * 3 /usr/java/jdk1.6.0_18/jre/bin/java + 4 /usr/java/jdk1.6.0_22/jre/bin/java Enter to keep the current selection[+], or type selection number:
Post-Installation Setup
Add JAVA_HOME environment variable to /etc/profile file or $HOME/.bash_profile file## export JAVA_HOME export JAVA_HOME="/usr/java/jdk1.6.0_22"
XAMPP for Linux (Installation)
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
|
Subscribe to:
Posts (Atom)