Thursday, March 13, 2014

Create a Repo File, Install through YUM

Here in, as the days passed on, professionally, there are days seeking a new learnings to be a good feather in our hat. As I start incubating into a new civilization called Linux, there are many a time, I search the woods for a possible way out to resolve my needs. After a brief time of getting my ditro installed, I had to start searching for utilities that I need, which didnt have a direct .exe files to install. Rather, there are methods that are quite quaint to my knowledge, as an alien, it thrills to get learning the way the systems work here.

Creating a repo(Repository) file a boon to get the things installed as needed. I wanted to make a note of this, so that learning is hardened. If this can help some more people like me, its really a great deal.

YUM : Yellowdog Updater, Modified
YUM is basically a package management utility that can be used for automatic updates, package and dependency management on RPM based distributions. Read More.

All the repo files are located by default at: /etc/yum.repos.d

A new repo file can be created by a super user by the following command:

[root@dhcppc6 yum.repos.d]# touch google-chrome.repo

Below Repo file creation and yum commands are used to install Google Chrome(64bit) on Linux Fedora 20.

[root@dhcppc6 yum.repos.d]# vi google-chrome.repo

[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1

and save the file(ESC+:+wq!)

##Install Google Chrome Stable Version#
yum install google-chrome-stable


Monday, January 27, 2014

Installing MySQL on Oracle Enterprise Linux

Oracle Enterprise Linux comes with MySQL Binaries, which needs to be 
enabled and installed and started. The process is described below.

# Check if already installed
$ rpm -qa | grep -i mysql

# Configure yum repository on new server
$ su -
$ cd /tmp
$ wget http://public-yum.oracle.com/public-yum-el5.repo
$ sed -e "s/enabled=0/enabled=1/" public-yum-el5.repo > /etc/yum.repos.d/public-yum-el5.repo

# Install MySQL
$ yum install -y mysql-server mysql

# Start and test MySQL Instance
$ /etc/init.d/mysqld start
$ mysql -uroot -e "SELECT VERSION()"

+-----------+
| VERSION() |
+-----------+
| 5.0.77    |
+-----------+



How to check Oracle Enterprise Linux Version

$rpm -qf /etc/redhat-release
enterprise-release-5-0.0.2

There are other methods too:

# cat /proc/version
Linux version 2.6.18-274.7.1.0.1.el5 (...) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-51))
A bit more reliable seems to be /etc/issue or /etc/issue.net
# cat /etc/issue.net | head -1
Oracle Linux Server release 5.7