Archive | September 2011

About Environment Variables


https://help.ubuntu.com/community/EnvironmentVariables

Advertisements

Installing the Driver and Configuring the CLASSPATH for MySQL Connector/J


Download  “Connector/J” a  mysql-java-connector archive from Mysql download page.

Once you have extracted the distribution archive, you can install the driver by

placing mysql-connector-java-[version]-bin.jar in your classpath, either by adding the full path to it to your CLASSPATH environment variable,If you are going to use the driver with the JDBC DriverManager, you would use com.mysql.jdbc.Driver as the class that implements java.sql.Driver.
You can set the CLASSPATH environment variable under UNIX, Linux or Mac OS X either locally for a user within their .profile,
.login or other login file. You can also set it globally by editing the global /etc/profile file.
For example, under a C shell (csh, tcsh) you would add the Connector/J driver to your CLASSPATH using the following:

shell> setenv CLASSPATH /path/mysql-connector-java-[ver]-bin.jar:$CLASSPATH
Or

with a Bourne-compatible shell (sh, ksh, bash):

shell> export set CLASSPATH=/path/mysql-connector-java-[ver]-bin.jar:$CLASSPATH

Within Windows 2000, Windows XP, Windows Server 2003 and Windows Vista, you must set the environment variable through the System Control Panel

How to fix the “Cannot retrieve repository metadata (repomd.xml)” error in Fedora?


  • You need to edit the following three repository files: 
  • /etc/yum.repos.d/fedora.repo
  • /etc/yum.repos.d/fedora-updates.repo  
  • /etc/yum.repos.d/fedora-updates-testing.repo
  • Now un-comment all the lines that start with  the term baseurl and place a comment before all lines that start with mirrorlist. This should be done for both the above files.
  • Now edit your /etc/hosts file and append(copy & paste) the following to it’s contents:
    80.239.156.215 mirrors.fedoraproject.org 213.129.242.84 mirrors.rpmfusion.org

Now try updating your system or installing any software via Yum. You will see, the error is now resolved and the error message is not shown anymore.

sudo yum -y update

%d bloggers like this: