Page not found – ShopingServer Wiki http://wiki.shopingserver.com Tutorials and Articles About Technology and Gadgets Wed, 02 Sep 2020 02:22:12 +0000 en-US hourly 1 https://wordpress.org/?v=5.5.14 http://wiki.shopingserver.com/wp-content/uploads/2018/07/cropped-favicon-150x150.png Page not found – ShopingServer Wiki http://wiki.shopingserver.com 32 32 Debian 7 Wheezy: Install Flash Player http://wiki.shopingserver.com/debian-7-wheezy-install-flash-player/ http://wiki.shopingserver.com/debian-7-wheezy-install-flash-player/#respond Sat, 06 Jan 2018 10:21:22 +0000 http://wiki.shopingserver.com/?p=18597 I am a new Debian Linux version 7 user. I found out that Pandora player is not working due to Adobe flash player. How do I install and use flash player on Debian 7 with Firefox browser?

 

Adobe Flash Player is a multimedia plugin used to play video, games, streaming, and interactivity to Web pages. This how-to describes how to install the Adobe Flash Player (also known as the Macromedia Flash Player), on Debian 7 desktop or laptop systems.

Say, hello to flashplugin-nonfree package

This package acts as a wrapper packages and will download the Flash Player from Adobe. It is a Netscape/Mozilla type plugin. Any browser based on Netscape or Mozilla can use the Flash Player such as

Mozilla-Firefox

Iceweasel

Iceape

Galeon

Epiphany

Konqueror if konqueror-nsplugins is installed.

Installation

Open a terminal and edit the file /etc/apt/sources.list using a text editor and make sure following line exists:

deb ftp://ftp.debian.org/debian stable main contrib non-free

 

Save and close the file. Type the following command:

$ sudo apt-get update

 

Next, type the following apt-get command to install flash player plugin:

$ sudo apt-get install flashplugin-nonfree

 

OR

# apt-get install flashplugin-nonfree

 

Sample outputs:

Reading package lists… Done

Building dependency tree

Reading state information… Done

Suggested packages:

konqueror-nsplugins ttf-xfree86-nonfree hal

The following NEW packages will be installed:

flashplugin-nonfree

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 20.1 kB of archives.

After this operation, 181 kB of additional disk space will be used.

Get:1 http://mirrors.kernel.org/debian/ wheezy/contrib flashplugin-nonfree amd64 1:3.2 [20.1 kB]

Fetched 20.1 kB in 2s (8982 B/s)

Can t set locale; make sure $LC_* and $LANG are correct!

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE =  en_IN:en ,

LC_ALL = (unset),

LC_CTYPE =  UTF-8 ,

LANG =  en_IN

are supported and installed on your system.

perl: warning: Falling back to the standard locale ( C ).

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

Selecting previously unselected package flashplugin-nonfree.

(Reading database … 193647 files and directories currently installed.)

Unpacking flashplugin-nonfree (from …/flashplugin-nonfree_1%3a3.2_amd64.deb) …

Processing triggers for man-db …

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

Processing triggers for hicolor-icon-theme …

Processing triggers for desktop-file-utils …

The Processing triggers for gnome-menus …

Setting up flashplugin-nonfree (1:3.2) …

–2013-06-05 15:55:53–  http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.285/install_flash_player_11_linux.x86_64.tar.gz

Resolving fpdownload.macromedia.com (fpdownload.macromedia.com)… 173.222.18.70

Connecting to fpdownload.macromedia.com (fpdownload.macromedia.com)|173.222.18.70|:80… connected.

HTTP request sent, awaiting response… 200 OK

Length: 7234643 (6.9M) [application/x-gzip]

Saving to: `/tmp/flashplugin-nonfree.i7GZyK1Oxl/install_flash_player_11_linux.x86_64.tar.gz

 

0K ………. ………. ………. ………. ……….  0%  529K 13s

50K ………. ………. ………. ………. ……….  1%  527K 13s

100K ………. ………. ………. ………. ……….  2%  544K 13s

150K ………. ………. ………. ………. ……….  2%  517K 13s

200K ………. ………. ………. ………. ……….  3%  523K 13s

250K ………. ………. ………. ………. ……….  4%  547K 13s

300K ………. ………. ………. ………. ……….  4%  521K 13s

350K ………. ………. ………. ………. ……….  5%  131K 17s

400K ………. ………. ………. ………. ……….  6%  857K 16s

450K ………. ………. ………. ………. ……….  7% 7.09M 15s

500K ………. ………. ………. ………. ……….  7% 7.93M 13s

550K ………. ………. ………. ………. ……….  8% 1.91M 12s

600K ………. ………. ………. ………. ……….  9%  510K 12s

650K ………. ………. ………. ………. ……….  9%  554K 12s

700K ………. ………. ………. ………. ………. 10%  523K 12s

750K ………. ………. ………. ………. ………. 11%  524K 12s

800K ………. ………. ………. ………. ………. 12%  538K 12s

850K ………. ………. ………. ………. ………. 12%  524K 12s

900K ………. ………. ………. ………. ………. 13%  540K 12s

950K ………. ………. ………. ………. ………. 14%  524K 11s

1000K ………. ………. ………. ………. ………. 14%  538K 11s

1050K ………. ………. ………. ………. ………. 15%  524K 11s

1100K ………. ………. ………. ………. ………. 16%  539K 11s

1150K ………. ………. ………. ………. ………. 16%  507K 11s

1200K ………. ………. ………. ………. ………. 17%  542K 11s

1250K ………. ………. ………. ………. ………. 18%  538K 11s

1300K ………. ………. ………. ………. ………. 19%  525K 11s

1350K ………. ………. ………. ………. ………. 19%  538K 11s

1400K ………. ………. ………. ………. ………. 20%  525K 11s

1450K ………. ………. ………. ………. ………. 21%  538K 11s

1500K ………. ………. ………. ………. ………. 21%  523K 10s

1550K ………. ………. ………. ………. ………. 22%  540K 10s

1600K ………. ………. ………. ………. ………. 23%  523K 10s

1650K ………. ………. ………. ………. ………. 24%  512K 10s

1700K ………. ………. ………. ………. ………. 24%  552K 10s

1750K ………. ………. ………. ………. ………. 25%  526K 10s

1800K ………. ………. ………. ………. ………. 26%  538K 10s

1850K ………. ………. ………. ………. ………. 26%  525K 10s

1900K ………. ………. ………. ………. ………. 27%  539K 10s

1950K ………. ………. ………. ………. ………. 28%  524K 10s

2000K ………. ………. ………. ………. ………. 29%  539K 9s

2050K ………. ………. ………. ………. ………. 29%  522K 9s

2100K ………. ………. ………. ………. ………. 30%  525K 9s

2150K ………. ………. ………. ………. ………. 31%  526K 9s

2200K ………. ………. ………. ………. ………. 31%  538K 9s

2250K ………. ………. ………. ………. ………. 32%  509K 9s

2300K ………. ………. ………. ………. ………. 33%  556K 9s

2350K ………. ………. ………. ………. ………. 33%  537K 9s

2400K ………. ………. ………. ………. ………. 34%  525K 9s

2450K ………. ………. ………. ………. ………. 35%  539K 9s

2500K ………. ………. ………. ………. ………. 36%  521K 9s

2550K ………. ………. ………. ………. ………. 36%  526K 8s

2600K ………. ………. ………. ………. ………. 37%  540K 8s

2650K ………. ………. ………. ………. ………. 38%  522K 8s

2700K ………. ………. ………. ………. ………. 38%  536K 8s

2750K ………. ………. ………. ………. ………. 39%  527K 8s

2800K ………. ………. ………. ………. ………. 40%  539K 8s

2850K ………. ………. ………. ………. ………. 41%  524K 8s

2900K ………. ………. ………. ………. ………. 41%  538K 8s

2950K ………. ………. ………. ………. ………. 42%  525K 8s

3000K ………. ………. ………. ………. ………. 43%  523K 8s

3050K ………. ………. ………. ………. ………. 43%  539K 7s

3100K ………. ………. ………. ………. ………. 44%  519K 7s

3150K ………. ………. ………. ………. ………. 45%  173K 8s

3200K ………. ………. ………. ………. ………. 46% 1.39M 7s

3250K ………. ………. ………. ………. ………. 46% 1.08M 7s

3300K ………. ………. ………. ………. ………. 47% 6.68M 7s

3350K ………. ………. ………. ………. ………. 48%  541K 7s

3400K ………. ………. ………. ………. ………. 48%  523K 7s

3450K ………. ………. ………. ………. ………. 49%  523K 7s

3500K ………. ………. ………. ………. ………. 50%  541K 7s

3550K ………. ………. ………. ………. ………. 50%  524K 7s

3600K ………. ………. ………. ………. ………. 51%  521K 6s

3650K ………. ………. ………. ………. ………. 52%  257K 6s

3700K ………. ………. ………. ………. ………. 53% 1.33M 6s

3750K ………. ………. ………. ………. ………. 53% 1018K 6s

3800K ………. ………. ………. ………. ………. 54%  539K 6s

3850K ………. ………. ………. ………. ………. 55%  524K 6s

3900K ………. ………. ………. ………. ………. 55%  315K 6s

3950K ………. ………. ………. ………. ………. 56% 1.67M 6s

4000K ………. ………. ………. ………. ………. 57%  523K 6s

4050K ………. ………. ………. ………. ………. 58%  423K 6s

4100K ………. ………. ………. ………. ………. 58%  532K 6s

4150K ………. ………. ………. ………. ………. 59%  458K 5s

4200K ………. ………. ………. ………. ………. 60%  505K 5s

4250K ………. ………. ………. ………. ………. 60%  444K 5s

4300K ………. ………. ………. ………. ………. 61%  472K 5s

4350K ………. ………. ………. ………. ………. 62%  412K 5s

4400K ………. ………. ………. ………. ………. 62%  490K 5s

4450K ………. ………. ………. ………. ………. 63%  508K 5s

4500K ………. ………. ………. ………. ………. 64%  539K 5s

4550K ………. ………. ………. ………. ………. 65%  411K 5s

4600K ………. ………. ………. ………. ………. 65%  548K 5s

4650K ………. ………. ………. ………. ………. 66%  451K 5s

4700K ………. ………. ………. ………. ………. 67%  512K 4s

4750K ………. ………. ………. ………. ………. 67%  478K 4s

4800K ………. ………. ………. ………. ………. 68%  401K 4s

4850K ………. ………. ………. ………. ………. 69%  418K 4s

4900K ………. ………. ………. ………. ………. 70%  470K 4s

4950K ………. ………. ………. ………. ………. 70%  530K 4s

5000K ………. ………. ………. ………. ………. 71%  524K 4s

5050K ………. ………. ………. ………. ………. 72%  539K 4s

5100K ………. ………. ………. ………. ………. 72%  493K 4s

5150K ………. ………. ………. ………. ………. 73%  441K 4s

5200K ………. ………. ………. ………. ………. 74%  486K 4s

5250K ………. ………. ………. ………. ………. 75%  516K 3s

5300K ………. ………. ………. ………. ………. 75%  440K 3s

5350K ………. ………. ………. ………. ………. 76%  396K 3s

5400K ………. ………. ………. ………. ………. 77%  402K 3s

5450K ………. ………. ………. ………. ………. 77%  497K 3s

5500K ………. ………. ………. ………. ………. 78%  541K 3s

5550K ………. ………. ………. ………. ………. 79%  523K 3s

5600K ………. ………. ………. ………. ………. 79%  533K 3s

5650K ………. ………. ………. ………. ………. 80%  466K 3s

5700K ………. ………. ………. ………. ………. 81%  435K 3s

5750K ………. ………. ………. ………. ………. 82%  476K 2s

5800K ………. ………. ………. ………. ………. 82%  507K 2s

5850K ………. ………. ………. ………. ………. 83%  421K 2s

5900K ………. ………. ………. ………. ………. 84%  484K 2s

5950K ………. ………. ………. ………. ………. 84%  418K 2s

6000K ………. ………. ………. ………. ………. 85%  446K 2s

6050K ………. ………. ………. ………. ………. 86%  529K 2s

6100K ………. ………. ………. ………. ………. 87%  523K 2s

6150K ………. ………. ………. ………. ………. 87%  523K 2s

6200K ………. ………. ………. ………. ………. 88%  437K 2s

6250K ………. ………. ………. ………. ………. 89%  502K 2s

6300K ………. ………. ………. ………. ………. 89%  454K 1s

6350K ………. ………. ………. ………. ………. 90%  514K 1s

6400K ………. ………. ………. ………. ………. 91%  403K 1s

6450K ………. ………. ………. ………. ………. 92%  565K 1s

6500K ………. ………. ………. ………. ………. 92%  400K 1s

6550K ………. ………. ………. ………. ………. 93%  463K 1s

6600K ………. ………. ………. ………. ………. 94%  514K 1s

6650K ………. ………. ………. ………. ………. 94%  540K 1s

6700K ………. ………. ………. ………. ………. 95%  402K 1s

6750K ………. ………. ………. ………. ………. 96%  633K 1s

6800K ………. ………. ………. ………. ………. 96%  407K 0s

6850K ………. ………. ………. ………. ………. 97%  521K 0s

6900K ………. ………. ………. ………. ………. 98%  514K 0s

6950K ………. ………. ………. ………. ………. 99%  460K 0s

7000K ………. ………. ………. ………. ………. 99%  397K 0s

7050K ………. …..                                      100%  442K=14s

 

2013-06-05 15:56:12 (504 KB/s) – `/tmp/flashplugin-nonfree.i7GZyK1Oxl/install_flash_player_11_linux.x86_64.tar.gz  saved [7234643/7234643]

How do I verify installation?

Close the browser. Open Firefox/Iceweasel and click on the Tools menu > choose Add-ons

Fig.01: Firefox/Iceweasel tools menu

 

Choose Plugins tab. You should see flasy player as follows in the list:

Fig.02: Verification for Flash player on Debian 7

 

Open a webrowser and visit the following youtube video for testing purpose:

And there you have it a working flash player for Firefox/Iceweasel on Debian Linux version 7.

 

 

]]>
http://wiki.shopingserver.com/debian-7-wheezy-install-flash-player/feed/ 0
Mac OS X: Install GCC Compiler with Xcode http://wiki.shopingserver.com/mac-os-x-install-gcc-compiler-xcode/ http://wiki.shopingserver.com/mac-os-x-install-gcc-compiler-xcode/#respond Sat, 06 Jan 2018 10:18:13 +0000 http://wiki.shopingserver.com/?p=18595 I have Mac OS X Mountain Lion. I need to compile a few apps and Perl modules. Then I already installed Xcode from app store but I’m unable to find gcc compiler or make command. How do I install gcc on Mac OS X 10.8.x?

 

Xcode includes command line development tools such as gcc and friends.

Step #1: Install Xcode on a Apple Mac OS X

First, make sure Xcode is installed. If it is not installed on OS X, visit app store and install Xcode.

Fig.01: Make sure Xcode developer tools are install OS X

Step #2: Install gcc/LLVM compiler on OS X

Once installed, open Xcode and visit:

Xcode menu > Preferences > Downloads > choose  Command line tools  > Click  Install  button:

Fig.02: Installing gcc compiler on Mac OS X

 

Xcode will download package and install copies of the core command line tools and system headers into system folders, including the LLVM compiler, linker, and build tools.

Step #3: Verification

Open a terminal app and type the following commands:

$ gcc –version

$ whereis gcc

$ whereis make

 

Sample outputs:

Fig.03: Verify gcc compiler installation on Mountain Lion OS X

Testing sample “Hello world” C program

Create a text file called a.c as follows using a text editor such as vi or cat command:

/* a.c – demo for os x */

#include<stdio.h>

int main(void){

printf( Hello world\n );

return 0;

}

To compile, enter:

$ make a

 

Run it as follows:

$ ./a

 

Sample outputs:

Fig.04: Compiling and running sample “Hello world” C program on Mountain Lion 10.8.4

See also

And, there you have it, the gcc version 4.2.1 installed and working correctly on the latest version of Mac OS X 10.8.4. In Apple’s version of GCC, both cc and gcc are actually symbolic links to the llvm-gcc compiler. Similarly, c++ and g++ are links to llvm-g++. For more information and examples see the following man pages:

$ gcc(1)

$ make(1)

 

This entry is 5 of 13 in the Linux GNU/GCC Compilers Tutorial series. Keep reading the rest of the series:

Ubuntu Linux Install GNU GCC Compiler and Development Environment

Debian Linux Install GNU GCC Compiler and Development Environment

CentOS / RHEL 7: Install GCC (C and C++ Compiler) and Development Tools

Download and Install C, C++ Compiler on Red Hat Enterprise Linux 5 (RHEL)

Mac OS X: Install GCC Compiler with Xcode

Where is My Linux GNU C or GCC Compilers Are Installed?

HowTo: Compile And Run a C/C++ Code In Linux

RHEL / CentOS Linux Install Core Development Tools Automake, Gcc (C/C++), Perl, Python & Debuggers

HowTo Compiling C Program And Creating Executable File Under a Linux / UNIX / *BSD

How To Install ncurses Library on a Linux

Linux Find Out What Compilers Are Installed or Available On The System

Linux Find Out GNU gcc Compiler Version Used To Compile Running Kernel

Howto see output of C program in Linux or UNIX

 

 

]]>
http://wiki.shopingserver.com/mac-os-x-install-gcc-compiler-xcode/feed/ 0
Debian / Ubuntu: apt-get Force Reinstall Package http://wiki.shopingserver.com/debian-ubuntu-apt-get-force-reinstall-package/ http://wiki.shopingserver.com/debian-ubuntu-apt-get-force-reinstall-package/#respond Sat, 06 Jan 2018 10:02:32 +0000 http://wiki.shopingserver.com/?p=18573 I am a new Debian Linux v.7.x / Ubuntu Linux LTS user. How do I reinstall a package using apt-get command line?

 

The Advanced Packaging Tool (APT) works on both Debian / Ubuntu and it can handle the installation and removal of software. You need use apt-get command as follows to forcefully reinstall package. The syntax is:

apt-get –reinstall install PackageNameHere

OR

apt-get –reinstall install Package1 Package2

The –reinstall option re-install packages that are already installed and at the newest version.

Pro tip: Backup configuration files before you reinstall packages. For example, if you are reinstalling nginx web server package, backup /etc/nginx/ with cp command i.e. mkdir /root/nginx.mmddyyyy/; cp -avr /etc/nginx/* /root/nginx.mmddyyy/

Examples

The following command will reinstall rsync package. Open a terminal and then type:

$ sudo apt-get –reinstall install rsync

 

OR

# apt-get –reinstall install rsync

 

Sample outputs:

Fig.01: Debian / Ubuntu Linux reinstall a package using apt-get command

If above method failed for you, try the following syntax. Make sure you backup config file before typing the following commands. Please note that the –purge option is identical to remove except that packages are removed and purged including any configuration files are deleted too.

sudo apt-get –purge remove package1

sudo apt-get install package1

See also

See man pages for more info – apt-get(8),dpkg(1),cp(1)

 

 

]]>
http://wiki.shopingserver.com/debian-ubuntu-apt-get-force-reinstall-package/feed/ 0
W: TMPDIR is Mounted noexec, Will Not Cache Run Scripts Error and Solution http://wiki.shopingserver.com/w-tmpdir-mounted-noexec-will-not-cache-run-scripts-error-solution/ http://wiki.shopingserver.com/w-tmpdir-mounted-noexec-will-not-cache-run-scripts-error-solution/#respond Sat, 06 Jan 2018 10:01:17 +0000 http://wiki.shopingserver.com/?p=18571 I mount /tmp with nodev, nosuid, and noexec options to increase the security of my Linux based web server. And, whenever I ran apt-get install or apt-get upgrade command, I am getting the following error:

apt-get install linux-generic linux-headers-generic linux-image-generic

…..

….

..

Generating grub.cfg …

Found linux image: /boot/vmlinuz-3.2.0-43-generic

Found initrd image: /boot/initrd.img-3.2.0-43-generic

….

ldconfig deferred processing now taking place

Processing triggers for initramfs-tools …

update-initramfs: Generating /boot/initrd.img-3.2.0-43-generic

W: TMPDIR is mounted noexec, will not cache run scripts.

….

How do I fix this problem without compromising security of the data or web-server?

 

You can make /tmp non-executable by setting the following two flags in /etc/fstab file:

noexec – Do not allow direct execution of any binaries or scripts on the mounted filesystem at /tmp.

nosuid – Do not allow SUID or SGID bits to take effect.

nodev – Do not interpret character or block special devices on the file system.

This will safeguard your server against various attacks. But, apt-get upgrade command may fail with the following message:

W: TMPDIR is mounted noexec, will not cache run scripts.

 

apt-get command use /tmp to place scripts and scripts can not execute due to noexec flag on /tmp. To fix your problem edit or create the file /etc/apt/apt.conf (, enter:

# vi /etc/apt/apt.conf

 

OR

$ sudo vi /etc/apt/apt.conf

 

Sample outputs:

DPkg::Pre-Invoke{ mount -o remount,exec /tmp ;};

DPkg::Post-Invoke { mount -o remount,rw,noexec,nosuid,nodev /tmp ;};

Save and close the file. The apt.conf is the main configuration file for the APT suite of tools. The commands are invoked in order using /bin/sh, should any fail APT will abort. Where,

DPkg::Pre-Invoke{ mount -o remount,exec /tmp ;}; – This is a list of shell commands to run before dpkg command. In this example, remove noexec flag from /tmp, so that script can get executed.

DPkg::Post-Invoke { mount -o remount,rw,noexec,nosuid,nodev /tmp ;}; – This is a list of shell commands to run after dpkg. In this example, set noexec and other security flag on /tmp

How do I reinstall and rexecute packages again?

Once you applied the solution as describe above, you can just reinstall the package as follows to run the scripts:

$ sudo apt-get –reinstall install linux-generic linux-headers-generic linux-image-generic

 

In this example,

First, mount -o remount,exec /tmp command will run by apt-get as defined in apt.conf to relax permission on /tmp.

Next, your actual apt-get/dpkg command will get executed to reinstall kernel packages.

Finally mount -o remount,rw,noexec,nosuid,nodev /tmp command will run by apt-get to secure your /tmp.

See also

Man pages – apt.conf(5),apt-get(8),dpkg(1)

 

 

]]>
http://wiki.shopingserver.com/w-tmpdir-mounted-noexec-will-not-cache-run-scripts-error-solution/feed/ 0
Ubuntu Linux LTS: Force Kernel Package Updates Which Have Been Kept Back http://wiki.shopingserver.com/ubuntu-linux-lts-force-kernel-package-updates-kept-back/ http://wiki.shopingserver.com/ubuntu-linux-lts-force-kernel-package-updates-kept-back/#respond Sat, 06 Jan 2018 09:44:18 +0000 http://wiki.shopingserver.com/?p=18549 I am using Ubuntu 12.04.2 LTS (“precise”). I am trying to upgrade all packages using kernel via apt-get upgrade method. But, I am getting the following message:

apt-get upgrade

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following packages have been kept back:

linux-headers-virtual linux-image-virtual mysql-client-5.5 mysql-server-5.5

mysql-server-core-5.5

The following packages will be upgraded:

base-files dosfstools linux-libc-dev linux-libc-dev:i386

4 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

Need to get 1,847 kB of archives.

After this operation, 2,048 B of additional disk space will be used.

Do you want to continue [Y/n]?

 

How do I fix this issue and install linux-headers-virtual linux-image-virtual packages which have been kept back in Ubuntu Linux LTS version 12.04.2?

 

If you are running virtual or cloud images, there is no need to get newer enablement stacks and are thus recommended to remain on the original Precise stack. You only need the newer kernel when

You need to support a wider variety of hardware on an existing LTS release, the 12.04.2 and newer point releases will ship with an updated kernel and X stack by default.

These newer hardware enablement stacks will be comprised of the newer kernel and X stacks from 12.10 (Quantal), 13.04 (Raring), 13.10 (Saucy), and 14.04 (T name TBD).

These enablement stacks are only intended for use on x86 hardware at this time.

If you really want to upgrade virtual/cloud images, try:

$ sudo apt-get dist-upgrade

 

Sample outputs:

Reading package lists… Done

Building dependency tree

Reading state information… Done

Calculating upgrade… Done

The following NEW packages will be installed:

libterm-readkey-perl linux-headers-3.2.0-52 linux-headers-3.2.0-52-virtual

linux-image-3.2.0-52-virtual

The following packages will be upgraded:

base-files dosfstools linux-headers-virtual linux-image-virtual

linux-libc-dev linux-libc-dev:i386 mysql-client-5.5 mysql-server-5.5

mysql-server-core-5.5

9 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.

Need to get 50.2 MB of archives.

After this operation, 102 MB of additional disk space will be used.

Do you want to continue [Y/n]? y

….

….

..

Searching for GRUB installation directory … found: /boot/grub

Searching for default file … found: /boot/grub/default

Testing for an existing GRUB menu.lst file … found: /boot/grub/menu.lst

Searching for splash image … none found, skipping …

Found kernel: /vmlinuz-3.2.0-52-virtual

Found kernel: /vmlinuz-3.2.0-31-virtual

Found kernel: /memtest86+.bin

Replacing config file /run/grub/menu.lst with new version

Updating /boot/grub/menu.lst … done

 

Setting up libterm-readkey-perl (2.30-4build3) …

Setting up mysql-client-5.5 (5.5.32-0ubuntu0.12.04.1) …

Setting up mysql-server-core-5.5 (5.5.32-0ubuntu0.12.04.1) …

Setting up mysql-server-5.5 (5.5.32-0ubuntu0.12.04.1) …

Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld …

mysql start/running, process 1013

Setting up dosfstools (3.0.12-1ubuntu1.1) …

Setting up linux-headers-3.2.0-52 (3.2.0-52.78) …

Setting up linux-headers-3.2.0-52-virtual (3.2.0-52.78) …

Setting up linux-headers-virtual (3.2.0.52.62) …

Setting up linux-image-virtual (3.2.0.52.62) …

You need to reboot the Ubuntu based system, enter:

# reboot

See See LTS 12.04 support and upgrade policy for more information.

 

 

]]>
http://wiki.shopingserver.com/ubuntu-linux-lts-force-kernel-package-updates-kept-back/feed/ 0
RHEL / CentOS 6.x KVM Virtualization Installation and Configuration Guide http://wiki.shopingserver.com/rhel-centos-6-x-kvm-virtualization-installation-configuration-guide/ http://wiki.shopingserver.com/rhel-centos-6-x-kvm-virtualization-installation-configuration-guide/#respond Sat, 06 Jan 2018 09:08:49 +0000 http://wiki.shopingserver.com/?p=18507 H

ow do I setup and manage a virtualized environment with Kernel based Virtual Machine (KVM) in CentOS or Red Hat Enterpise Linux version 6 server on IBM server? Can you provide step-by-step commands of how to install and manage Virtual Machines (VMs) on a physical server using KVM for RHEL/CentOS version 6.4?

 

KVM is part of RHEL and CentOS Linux. You can easily install the same using the following commands. Please note that only the package names have changed in RHEL/CentOS 6.x. If you are using RHEL / CentOS 5.x, read our previous CentOS / Redhat (RHEL) v.5.x KVM Virtulization guide for more information.

Install required KVM RPMs/packages

Type the following yum command

# yum groupinstall  Virtualisation Tools   Virtualization Platform

# yum install python-virtinst

 

OR

# yum install kvm qemu-kvm python-virtinst libvirt libvirt-python virt-manager libguestfs-tools

 

Sample outputs:

Loaded plugins: product-id, protectbase, rhnplugin

This system is receiving updates from RHN Classic or RHN Satellite.

0 packages excluded due to repository protections

Setting up Install Process

Package libvirt-0.10.2-18.el6_4.15.x86_64 already installed and latest version

Resolving Dependencies

–> Running transaction check

—> Package libguestfs-tools.x86_64 1:1.16.34-2.el6 will be installed

–> Processing Dependency: libguestfs-tools-c = 1:1.16.34-2.el6 for package: 1:libguestfs-tools-1.16.34-2.el6.x86_64

….

..

..

spice-glib.x86_64 0:0.14-7.el6_4.3

spice-gtk.x86_64 0:0.14-7.el6_4.3

spice-gtk-python.x86_64 0:0.14-7.el6_4.3

spice-server.x86_64 0:0.12.0-12.el6_4.5

vgabios.noarch 0:0.6b-3.7.el6

vte.x86_64 0:0.25.1-8.el6_4

 

Complete!

Turn on libvirtd service

The libvirtd program is the server side daemon component of the libvirt virtualization management system. Type the following chkconfig command to turn it on:

# chkconfig libvirtd on

 

Start the libvirtd service by typing the following service command:

# service libvirtd start

 

Sample outputs:

Starting libvirtd daemon:                                  [  OK  ]

You can verify the libvirtd service by tying the following commands:

# service libvirtd status

libvirtd (pid  31128) is running…

 

# virsh -c qemu:///system list

Id    Name                           State


Sample setup

+————-+

| CentOS/RHEL |             |—–|

–>ISP router—+ Box Host w/ +— eth0 –>-+ br0 +  Private IP

| KVM         |             |     |

+————-+— eth1 –>-+ br1 | Public IP

|—–|

|

vm1-+—vm2—-vm3—vm4

 

*** NOTE: each VMs will have two interface i.e. Private and Public *****

Where,

eth0 – KVM servers’ LAN interface.

eth1 – KVM servers’ WAN/Internet interface.

br0 – KVM servers’ bridge interface to give VM direct access to all the resources on the LAN.

br1 – KVM servers’ bridge interface to give VM direct access to all the resources on the WAN/Internet. Users can ssh into VMs or you can host HTTPD/SMTPD using this interface.

obsd-vm1 (vm1) – OpenBSD VM name.

rhel-vm1 (vm2) – RHEL VM name.

Install and configure a network bridge

All VMs will only have network access to host and other VMs on same physical server via private network. You need to crate a network bridge so that the VMs can access your LAN and possible the Internet/WAN from outside. Type the following yum command to install bridge-utils package:

# yum install bridge-utils

Setup a default gateway

Edit /etc/sysconfig/network as follows

# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=kvm-42.cyberciti.biz

I am routing internet traffic via br1 ##

GATEWAYDEV=br1

Configure bridging

Update /etc/sysconfig/network-scripts/ifcfg-eth0 (private) as follows:

# cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

ONBOOT=yes

HWADDR=00:30:48:C6:0A:D8

BRIDGE=br0

 

Update /etc/sysconfig/network-scripts/ifcfg-eth1 (public) as follows:

# cat /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1

ONBOOT=yes

HWADDR=00:30:48:C6:0A:D9

BRIDGE=br1

 

Create/edit the /etc/sysconfig/network-scripts/ifcfg-br0 file to setup private/lan ip address for br0:

# cat /etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0

TYPE=Bridge

BOOTPROTO=static

ONBOOT=yes

setup LAN/VLAN ips as per your needs ##

IPADDR=10.10.29.66

NETMASK=255.255.255.192

DELAY=0

 

Create/edit the /etc/sysconfig/network-scripts/ifcfg-br1 file to setup public/wan/internet ip address for br1:

# cat /etc/sysconfig/network-scripts/ifcfg-br1

DEVICE=br1

TYPE=Bridge

BOOTPROTO=static

ONBOOT=yes

setup INTERNET ips as per your needs ##

IPADDR=74.ww.xx.yy

NETMASK=255.255.255.248

GATEWAY=74.ww.xx.yy

DELAY=0

 

I need to route all lan traffic (subnet 10.0.0.0/8) via 10.10.29.65 gateway. Create/edit file /etc/sysconfig/network-scripts/route-br0 as follows:

# cat /etc/sysconfig/network-scripts/route-br0

10.0.0.0/8 via 10.10.29.65

Warning: Restarting network service over the ssh session may result into total loss of the connectivity to the server. So make sure br0 and br1 configuration including routing set correctly.

A note about SELinux

I have not disabled SELinux on CentOS / RHEL. I do not recommend disabling SELinux. So make sure the config file has correct SELinux permissions:

# ls -Z /etc/sysconfig/network-scripts/{route-br0,ifcfg-eth?,ifcfg-br?}

 

Sample outputs:

-rw-r–r–. root root system_u:object_r:net_conf_t:s0  /etc/sysconfig/network-scripts/ifcfg-br0

-rw-r–r–. root root system_u:object_r:net_conf_t:s0  /etc/sysconfig/network-scripts/ifcfg-br1

-rw-r–r–. root root system_u:object_r:net_conf_t:s0  /etc/sysconfig/network-scripts/ifcfg-eth0

-rw-r–r–. root root system_u:object_r:net_conf_t:s0  /etc/sysconfig/network-scripts/ifcfg-eth1

-rw-r–r–. root root system_u:object_r:net_conf_t:s0  /etc/sysconfig/network-scripts/route-br0

Use restorecon command to set or restore file(s) default SELinux security contexts:

# restorecon -Rv /etc/sysconfig/

 

If you are going to reboot the SELinux enabled server, make sure you type the following command:

# touch /.autorelabel

# reboot

Restart the networking service

Type the following command to restart networking on RHEL/CentOS/SL:

# service network restart

Verify br0/br1 settings

Type the following commands:

# brctl show

# ip addr show br0

# ip addr show br1

# ip route

# ping cyberciti.biz

Creating VMs

You need to use virt-install command.

Example: Create OpenBSD VM

Grab, installation media:

# cd /var/lib/libvirt/boot/

# wget http://ftp.openbsd.org/pub/OpenBSD/5.4/amd64/install54.iso

 

In this example, I am using virt-install to create a OpenBSD 5.4_amd64 VM named obsd-vm1 with one virtual CPU, 1 GB memory and 10 GB of disk space:

# virt-install \

-n obsd-vm1 \

–description  cyberciti.biz OpenBSD 5.4 64 bit VM1  \

–ram=1024 \

–vcpus=1 \

–cpu host \

–os-variant=openbsd4 \

–accelerate \

–hvm \

–cdrom /var/lib/libvirt/boot/install54.iso \

–network bridge:br0,model=virtio –network bridge:br1,model=virtio \

–graphics vnc \

–disk path=/var/lib/libvirt/images/openbsd-vm1-cyberciti.biz.img,bus=virtio,size=10

VIRT-INSTALL OPTIONS

-n obsd-vm1 : The name of the VM.

–description  cyberciti.biz OpenBSD 5.4 64 bit VM1  : The long description of the VM.

–ram=1024 : 1024MB is the amount of memory allocated to the VM.

–vcpus=1 : The number of virtual CPU(s) for the VM.

–cpu host : Optimize CPU properties for the VM.

–os-variant=openbsd4 : This is the VM OS type.

–accelerate : Prefer KVM or KQEMU (in that order) if installing a QEMU guest. This option is no longer required.

–hvm : Request the use of full virtualization.

–cdrom /var/lib/libvirt/boot/install54.iso : Install OpeBSD v5.4 from an iso the location parameter.

–network bridge:br0,model=virtio –network bridge:br1,model=virtio : Create a network bridge using br0 and br1 i.e. the VM will have two network interface for LAN and Internet.

–graphics vnc : Use VNC to access installation using vnc server/viewer from your local Linux/OSX/Unix/Windows desktop.

–disk path=/var/lib/libvirt/images/openbsd-vm1-cyberciti.biz.img,bus=virtio,size=10 : This is is the image file for the VM, the size is specified in GBs and I am forcing vio driver. The virtio driver provides support service for paravirtualized devices using the VirtIO protocol.

How do I connect to OpenBSD installer from my local desktop?

Type the following command on your local desktop:

# ssh -L 5900:127.0.0.1:5900 root@KVM-Server-IP-Here

 

OR

# ssh -L 5900:127.0.0.1:5900 -N -f -l root kvm-42.cyberciti.biz

 

Use VNC client to connect to 127.0.0.1:5900. Now, just follow on-screen instructions:

Fig.01: OpenBSD installation started over the VNC session

Before rebooting the installer make sure you setup com0 console for the VM. For example, for a OpenBSD VM, append the following parameters to the file /etc/boot.conf and then reboot the VM:

stty com0 115200

set tty com0

See how to stup SSH to tunnel VNC traffic though the Internets for more information.

How do I start my VM after OpenBSD install is finished?

The virt-install will create a config file for VM at /etc/libvirt/qemu/obsd-vm1.xml. To start VM called obsd-vm1, enter:

# virsh start obsd-vm1

How do I access a VMs console?

Login to KVM host and type the following command:

# virsh console obsd-vm1

 

Sample outputs:

Fig.02: Getting access to a OpenBSD VM console when networking is down

Final example: Create RHEL VM using DVD

Type the following command:

# virt-install \

–name RHEL-vm1 \

–description  cyberciti.biz RHEL 6.4 64 bit VM1  \

–ram=2048 \

–vcpus=2 \

–disk path=/var/lib/libvirt/images/rhel-vm1-cyberciti.biz.img,size=20 \

–cdrom /var/lib/libvirt/boot/RHEL.6.4.Server-DVD1.iso \

–network bridge:br0 –network bridge:br1 \

–graphics vnc

Before rebooting the installer make sure you setup com0 console for the VM. For example, for a RHEL/CentOS VM, append the following parameters to the kernel boot line in /boot/grub.conf file and then reboot the VM:

console=tty0 console=ttyS1,19200n8

Stay tuned for the following advanced topics in  RHEL/CentOS v6.x KVM  (rss) series:

Firewall, kVM & VMs security configuration.

Attaching storage device to a VM.

Changing VM parameters such as RAM, CPU, Disk and more.

Managing and cloning VMs and more.

 

 

]]>
http://wiki.shopingserver.com/rhel-centos-6-x-kvm-virtualization-installation-configuration-guide/feed/ 0
HowTo: Upgrade CentOS Linux 6.4/6.3/6.2/6.1/6.0 to v6.5 http://wiki.shopingserver.com/howto-upgrade-centos-linux-6-4-6-3-6-2-6-1-6-0-v6-5/ http://wiki.shopingserver.com/howto-upgrade-centos-linux-6-4-6-3-6-2-6-1-6-0-v6-5/#respond Sat, 06 Jan 2018 09:06:03 +0000 http://wiki.shopingserver.com/?p=18505 C

entOS Linux v6.5 has been released and available via repos for immediate update. The new version includes several hundred bug fixes for, and enhancements to the Linux kernel. How do I upgrade from CentOS Linux version 6.0 / 6.1 / 6.2 / 6.3 or 6.4 to the latest version 6.5?

 

You can only upgrade from minor release as CentOS does not support in-place upgrades between any major versions of CentOS Linux. However, a minor upgrade can be done easily and recommended for all users.

Back up any important data on the server/workstation

Make a backup – it cannot be stressed enough how important it is to make a backup of your system before you do this. You need to backup config files, user data stored in $HOME, pgsql/msyql/oracle and co databases, and web apps files. In short, backup all the data. Most of the actions listed in this post are written with the assumption that they will be executed by the root user running the bash or any other modern shell.

See your current CentOS release information

Type the following commands to see current version:

$ uname -mrs

$ cat /etc/redhat-release

 

Sample outputs:

CentOS release 6.4 (Final)

Show list of available updates

To list all packages with updates available with new release, enter:

# yum clean all

# yum check-update

 

OR

# yum clean all

# yum list updates

 

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security

Loading mirror speeds from cached hostfile

* base: centos.mirrors.tds.net

* extras: lug.mtu.edu

* updates: yum.singlehop.com

Updated Packages

abrt.x86_64                            2.0.8-21.el6.centos               base

abrt-addon-ccpp.x86_64                 2.0.8-21.el6.centos               base

abrt-addon-kerneloops.x86_64           2.0.8-21.el6.centos               base

abrt-addon-python.x86_64               2.0.8-21.el6.centos               base

abrt-cli.x86_64                        2.0.8-21.el6.centos               base

….

..

sysvinit-tools.x86_64                  2.87-5.dsf.el6                    base

udev.x86_64                            147-2.51.el6                      base

util-linux-ng.x86_64                   2.17.2-12.14.el6                  base

xmlrpc-c.x86_64                        1.16.24-1210.1840.el6             base

xmlrpc-c-client.x86_64                 1.16.24-1210.1840.el6             base

xorg-x11-drv-ati-firmware.noarch       7.1.0-3.el6                       base

Note: Upgrade speed depends upon various factors such as the current system load, upstream rpm fetch server bandwidth and your Internet connection speed.

CentOS Linux: Upgrading your current system

Type the following yum command to upgrade:

# yum clean all

 

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security

Cleaning repos: base extras updates

Cleaning up Everything

Cleaning up list of fastest mirrors

To update, enter:

# yum update

 

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security

Determining fastest mirrors

* base: mirrors.einstein.yu.edu

* extras: mirrors.loosefoot.com

* updates: yum.singlehop.com

base                                                     | 3.7 kB     00:00

base/primary_db                                          | 4.4 MB     00:01

extras                                                   | 3.4 kB     00:00

extras/primary_db                                        |  18 kB     00:00

updates                                                  | 3.4 kB     00:00

updates/primary_db                                       |  26 kB     00:00

Setting up Update Process

Resolving Dependencies

–> Running transaction check

—> Package abrt.x86_64 0:2.0.8-16.el6.centos.1 will be updated

—> Package abrt.x86_64 0:2.0.8-21.el6.centos will be an update

—> Package abrt-addon-ccpp.x86_64 0:2.0.8-16.el6.centos.1 will be updated

—> Package abrt-addon-ccpp.x86_64 0:2.0.8-21.el6.centos will be an updateInstalling for dependencies:

….

..

lzo                             x86_64 2.03-3.1.el6              base     55 k

make                            x86_64 1:3.81-20.el6             base    389 k

p11-kit                         x86_64 0.18.5-2.el6              base     94 k

p11-kit-trust                   x86_64 0.18.5-2.el6              base     71 k

shared-mime-info                x86_64 0.70-4.el6                base    209 k

snappy                          x86_64 1.1.0-1.el6               base     39 k

 

Transaction Summary

================================================================================

Install       7 Package(s)

Upgrade     128 Package(s)

 

Total download size: 122 M

Is this ok [y/N]:  y

Downloading Packages:

(1/135): abrt-2.0.8-21.el6.centos.x86_64.rpm             | 208 kB     00:00

(2/135): abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64.rpm  | 116 kB     00:00

(3/135): abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_6 |  65 kB     00:00

(4/135): abrt-addon-python-2.0.8-21.el6.centos.x86_64.rp |  65 kB     00:00

(5/135): abrt-cli-2.0.8-21.el6.centos.x86_64.rpm         |  54 kB     00:00

….

..

Updating   : openssh-clients-5.3p1-94.el6.x86_64                      107/263

Updating   : openssh-server-5.3p1-94.el6.x86_64                       108/263

warning: /etc/ssh/sshd_config created as /etc/ssh/sshd_config.rpmnew

Updating   : parted-2.1-21.el6.x86_64                                 109/263

Updating   : biosdevname-0.5.0-2.el6.x86_64                           110/263

Updating   : libdrm-2.4.45-2.el6.x86_64                               111/263

..

Verifying  : lvm2-2.02.98-9.el6_4.3.x86_64                            262/263

Verifying  : efibootmgr-0.5.4-10.el6.x86_64                           263/263

 

Installed:

kernel.x86_64 0:2.6.32-431.el6

 

Dependency Installed:

lzo.x86_64 0:2.03-3.1.el6               make.x86_64 1:3.81-20.el6

p11-kit.x86_64 0:0.18.5-2.el6           p11-kit-trust.x86_64 0:0.18.5-2.el6

shared-mime-info.x86_64 0:0.70-4.el6    snappy.x86_64 0:1.1.0-1.el6

 

Updated:

abrt.x86_64 0:2.0.8-21.el6.centos

abrt-addon-ccpp.x86_64 0:2.0.8-21.el6.centos

….

..

systemtap-runtime.x86_64 0:2.3-3.el6

sysvinit-tools.x86_64 0:2.87-5.dsf.el6

udev.x86_64 0:147-2.51.el6

util-linux-ng.x86_64 0:2.17.2-12.14.el6

xmlrpc-c.x86_64 0:1.16.24-1210.1840.el6

xmlrpc-c-client.x86_64 0:1.16.24-1210.1840.el6

xorg-x11-drv-ati-firmware.noarch 0:7.1.0-3.el6

 

Complete!

(Command output truncated to fit on this page)

Reboot the Linux server using any one of the following method:

# reboot

 

OR

# shutdown -r now

 

Sample outputs:

 

Broadcast message from vivek@db1

(/dev/pts/0) at 2:20 …

 

The system is going down for reboot NOW!

[root@db1 vivek]# Connection to 173.xxx.yyy.zzz closed by remote host.

Connection to 173.xxx.yyy.zz closed.

Verification: After rebooting the box

Verify that everything is working fine and you have been upgraded to the latest CentOS Linux v6.5 release with the following commands:

# uname -a

# cat /etc/redhat-release

 

Sample outputs:

Fig.01: CentOS Linux 6.5 Final

 

Verify open ports and make sure your apps are running without any problems with the following commands:

# netstat -tulpn

# tail -f /var/log/messages

# tail -f /path/to/log/files

# ps aux | less

# ps aux | egrep  httpd|mysql

# pgrep  my_app

See yum(8) for more information.

 

 

]]>
http://wiki.shopingserver.com/howto-upgrade-centos-linux-6-4-6-3-6-2-6-1-6-0-v6-5/feed/ 0
CentOS / RHEL: See Detailed History Of yum Commands http://wiki.shopingserver.com/centos-rhel-see-detailed-history-yum-commands/ http://wiki.shopingserver.com/centos-rhel-see-detailed-history-yum-commands/#respond Sat, 06 Jan 2018 08:52:04 +0000 http://wiki.shopingserver.com/?p=18489 I

would like to see detailed information on the history of yum transactions such as updates, deleted packages, and other information. How do I see history of yum commands on CentOS / RHEL 6.x based server? How do I undo or redo or rollback packages using yum command?

 

The yum command has history option on the latest version of CentOS / RHEL v6.x+. To database are normally found in /var/lib/yum/history/ directory. The history option was added at the the end of 2009 (or thereabouts) to yum command. The history command allows an admin to access detailed information on the history of yum transactions that have been run on a system. You can see what has happened in past transactions (assuming the history_record config. option is set). You can use various command line options to view what happened, undo/redo/rollback to act on that information and start a new history file.

Prerequisite

You need yum version 3.2.xx or CentOS/RHEL 6.x. Verify this with the following command:

# yum info yum | grep –color Version

 

Sample outputs from CentOS v6.5:

Version     : 3.2.29

yum history command syntax

The basic syntax is:

yum history

yum history command #ID

yum history [options]

history [info|list|packages-list|summary|addon-info|redo|undo|rollback|new]

Examples

First, verify that history has been configured for yum command.

# ls -l /var/lib/yum/history/

 

Sample outputs:

total 1036

drwxr-xr-x. 30 root root    4096 Dec  9 11:40 2012-11-08

-rw——-.  1 root root 1050624 Dec  9 11:40 history-2012-11-08.sqlite

List your history

Type the following command:

# yum history

 

OR

# yum history list

 

Sample outputs:

Fig.01: yum history in action

 

Where,

ID – Transaction number.

Login user – The name of the user whose login session was used to initiate a yum.

Date and time – The date and time when a transaction was issued by yum.

Action(s) – A list of actions that were performed during a transaction as follows:

D or Downgrade – Package has been downgraded to an older version.

E or Erase – Package has been removed.

I or Install – New package has been installed.

O or Obsoleting – Package has been marked as obsolete.

R or Reinstall – Package has been reinstalled.

U or Update – Package has been updated to a newer version.

Altered — The number of packages that were affected by a yum, as follows:

*lt; – Before the transaction finished, the rpmdb database was changed outside yum.

– After the transaction finished, the rpmdb database was changed outside yum.

* – The transaction failed to finish.

# – The transaction finished successfully, but yum returned a non-zero exit code.

E – The transaction finished successfully, but an error or a warning was displayed.

P – The transaction finished successfully, but problems already existed in the rpmdb database.

s – The transaction finished successfully, but the –skip-broken command line option was used and certain packages were skipped.

To see all transactions, pass the add option as follows:

# yum history list all

You can list only one transactions or transactions in a given range:

# yum history list 7

# yum history list 1..3

 

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security

ID     | Login user               | Date and time    | Action(s)      | Altered


3 | 106300                   | 2013-08-12 15:14 | Update         |    1

2 | 88177                    | 2012-11-09 14:24 | Install        |    2

1 | System            | 2012-11-08 19:19 | Install        |  380

history list

List summary of all all past transactions

The syntax is:

# yum history summary

# yum history summary 3

# yum history summary 1..3

 

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security

Login user                 | Time                | Action(s)        | Altered


<vivek>                   | Last day            | Install          |        1

<vivek>                   | Last week           | E, I             |        3

root <root>                | Last week           | Update           |        1

<vivek>                   | Last 2 weeks        | I, U             |      139

<vivek>                   | Last 3 months       | Update           |        1

root <root>                | Last 3 months       | I, O, U          |      284

106300                     | Last 6 months       | I, U             |        6

88177                      | Over a year ago     | Install          |        2

System <unset>             | Over a year ago     | Install          |      380

history summary

Find out history of a package called nginx

The basic syntax is:

# yum history list PackageNameHere

# yum history list nginx

 

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security

ID     | Login user               | Date and time    | Action(s)      | Altered


28 |  <vivek>                 | 2013-12-09 11:40 | Install        |    1 EE

history list

You can also see complete history as follows for mysql package including version number, run:

# yum history package-list mysql

 

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security

ID     | Action(s)      | Package


26 | Install        | mysql-5.1.71-1.el6.x86_64

25 | Erase          | mysql-5.1.71-1.el6.x86_64                          EE

24 | Install        | mysql-5.1.71-1.el6.x86_64

history package-list

Now, use ID #24 to get detailed information on mysql package:

# yum history info 24

 

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security

Transaction ID : 24

Begin time     : Mon Dec  2 11:35:59 2013

Begin rpmdb    : 401:d28899f68a6631be573730605bd4825fe661fcce

End time       :            11:36:03 2013 (4 seconds)

End rpmdb      : 405:47873bf26c150bf0a26279da5c62d4ae4b1c227d

User           :  <vivek>

Return-Code    : Success

Command Line   : install mysql-server mysql

Transaction performed with:

Installed     rpm-4.8.0-37.el6.x86_64                       @base

Installed     yum-3.2.29-40.el6.centos.noarch               @base

Installed     yum-plugin-fastestmirror-1.1.30-14.el6.noarch @base

Packages Altered:

Install     mysql-5.1.71-1.el6.x86_64         @base

Install     mysql-server-5.1.71-1.el6.x86_64  @base

Dep-Install perl-DBD-MySQL-4.013-3.el6.x86_64 @base

Dep-Install perl-DBI-1.609-4.el6.x86_64       @base

history info

To find out what additional information is available for a certain transaction:

# yum history addon-info id

# yum history addon-info 24

 

To just get info on last transaction:

# yum history addon-info last

How do I undo / revert transactions?

Say, you deleted the nginx package using yum command:

# yum erase ngnix

 

Now, use yum history command to review the transaction history, the yum history command provides means to revert or repeat a selected transaction. To revert (undo) a transaction, type the following at a shell prompt as root:

# yum history undo id

 

To undo nginx erase action, type:

# yum history

# yum history package-list nginx

 

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security

ID     | Action(s)      | Package


29 | Erase          | nginx-1.4.4-1.el6.ngx.x86_64

28 | Install        | nginx-1.4.4-1.el6.ngx.x86_64                       EE

history package-list

To undo use ID # 29:

# yum history undo 29

 

Verify that nginx has been installed again:

# yum history package-list nginx

Loaded plugins: downloadonly, fastestmirror, security

ID     | Action(s)      | Package


30 | Install        | nginx-1.4.4-1.el6.ngx.x86_64                       EE

29 | Erase          | nginx-1.4.4-1.el6.ngx.x86_64

28 | Install        | nginx-1.4.4-1.el6.ngx.x86_64                       EE

history package-list

How do I redo / repeat transactions?

To repeat a particular transaction, run:

# yum history redo id

The yum history rollback option

The syntax is:

# yum history rollback id

 

The rollback command will undo all transactions up to the point of the specified transaction. For example, if you have 3 transactions, where package A; B and C where installed respectively. Then “yum history undo 1” will try to remove package A, “yum history redo 1” will try to install package A (if it is not still installed), and “yum history rollback 1” will try to remove packages B and C.

The yum new option

As described above, the yum command stores the transaction history in a single SQLite database file in /var/lib/yum/history/ directory. To start new transaction history, run the following command:

# yum history new

 

Verify with the following command:

# yum history

I strongly suggest that you read yum command man page for more information.

 

 

]]>
http://wiki.shopingserver.com/centos-rhel-see-detailed-history-yum-commands/feed/ 0
CentOS / RHEL: Install php-tidy Module / Extension http://wiki.shopingserver.com/centos-rhel-install-php-tidy-module-extension/ http://wiki.shopingserver.com/centos-rhel-install-php-tidy-module-extension/#respond Sat, 06 Jan 2018 08:49:41 +0000 http://wiki.shopingserver.com/?p=18487 I

am a new CentOS / RHEL / Red Hat / Fedora Linux server user. I need to provide tidy library support using php. How do I install php-tidy on RHEL or CentOS Linux for Apache server?

 

You need to install the following module using the yum command on RHEL/CentOS/Fedora/Scientific Linux server:

php-tidy – The php-tidy package contains a dynamic shared object that will add support for using the tidy library to PHP.

Install php-tidy module on RHEL/CentOS

Open the Terminal and type the following yum command:

# yum install php-tidy

 

Sample outputs:

Loaded plugins: auto-update-debuginfo, protectbase, rhnplugin, security

This system is receiving updates from RHN Classic or RHN Satellite.

0 packages excluded due to repository protections

Setting up Install Process

Resolving Dependencies

–> Running transaction check

—> Package php-tidy.x86_64 0:5.3.3-27.el6_5 will be installed

–> Processing Dependency: libtidy-0.99.so.0()(64bit) for package: php-tidy-5.3.3-27.el6_5.x86_64

–> Running transaction check

—> Package libtidy.x86_64 0:0.99.0-19.20070615.1.el6 will be installed

–> Finished Dependency Resolution

 

Dependencies Resolved

 

=============================================================================================

Package     Arch      Version                        Repository                        Size

=============================================================================================

Installing:

php-tidy    x86_64    5.3.3-27.el6_5                 rhel-x86_64-server-optional-6     36 k

Installing for dependencies:

libtidy     x86_64    0.99.0-19.20070615.1.el6       rhel-x86_64-server-6             127 k

 

Transaction Summary

=============================================================================================

Install       2 Package(s)

 

Total download size: 164 k

Installed size: 0

Is this ok [y/N]: y

Downloading Packages:

(1/2): libtidy-0.99.0-19.20070615.1.el6.x86_64.rpm                    | 127 kB     00:00

(2/2): php-tidy-5.3.3-27.el6_5.x86_64.rpm                             |  36 kB     00:00


Total                                                        654 kB/s | 164 kB     00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : libtidy-0.99.0-19.20070615.1.el6.x86_64                                   1/2

Installing : php-tidy-5.3.3-27.el6_5.x86_64                                            2/2

Verifying  : php-tidy-5.3.3-27.el6_5.x86_64                                            1/2

Verifying  : libtidy-0.99.0-19.20070615.1.el6.x86_64                                   2/2

 

Installed:

php-tidy.x86_64 0:5.3.3-27.el6_5

 

Dependency Installed:

libtidy.x86_64 0:0.99.0-19.20070615.1.el6

 

Complete!

Restart / reload web-server

Type the following command to restart / reload Apache server:

# service httpd restart

Verify new settings

# php -i | grep -color tidy

 

 

]]>
http://wiki.shopingserver.com/centos-rhel-install-php-tidy-module-extension/feed/ 0
CentOS / RHEL: Yum Lock Package Version At a Particular Version http://wiki.shopingserver.com/centos-rhel-yum-lock-package-version-particular-version/ http://wiki.shopingserver.com/centos-rhel-yum-lock-package-version-particular-version/#respond Sat, 06 Jan 2018 08:39:08 +0000 http://wiki.shopingserver.com/?p=18475 I

am a new CentOS / RHEL 6.x server user and DevOP. I need to lock a package called nginx on a server being updated via yum command. How do I lock package version at a particular version on CentOS / Red Hat Enterprise Linux (RHEL) 6.x or Fedora Linux?

 

You have two options as follows:

Pass the –exclude directive to the yum command to define list of packages to exclude from updates or installs.

yum versionlock command – Version lock rpm packages command.

Method # 1: yum versionlock command

You need to install yum-plugin-versionlock plugin. It takes a set of name/versions for packages and excludes all other versions of those packages (including optionally following obsoletes). This allows you to protect packages from being updated by newer versions.

Install yum-plugin-versionlock on a CentOS/RHEL server

To install yum-plugin-versionlock package, enter:

# yum -y install yum-versionlock

 

OR

# yum -y install yum-plugin-versionlock

 

Sample outputs:

Loaded plugins: product-id, rhnplugin, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

This system is receiving updates from RHN Classic or RHN Satellite.

Setting up Install Process

Resolving Dependencies

–> Running transaction check

—> Package yum-plugin-versionlock.noarch 0:1.1.30-14.el6 will be installed

–> Finished Dependency Resolution

 

Dependencies Resolved

 

================================================================================

Package                  Arch     Version         Repository              Size

================================================================================

Installing:

yum-plugin-versionlock   noarch   1.1.30-14.el6   rhel-x86_64-server-6    27 k

 

Transaction Summary

================================================================================

Install       1 Package(s)

 

Total download size: 27 k

Installed size: 0

Downloading Packages:

yum-plugin-versionlock-1.1.30-14.el6.noarch.rpm          |  27 kB     00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : yum-plugin-versionlock-1.1.30-14.el6.noarch                  1/1

Verifying  : yum-plugin-versionlock-1.1.30-14.el6.noarch                  1/1

 

Installed:

yum-plugin-versionlock.noarch 0:1.1.30-14.el6

 

Complete!

Syntax

The basic syntax is as follows:

yum versionlock package-name-here

yum versionlock package1 package2

yum versionlock add package-wildcard

yum versionlock add package1\*

yum versionlock [command] package1\*

To lock the nginx packages at current versions, type:

# yum versionlock nginx

 

OR

# yum versionlock add nginx

To list all current versionlock entries, run:

# yum versionlock list

To remove/delete versionlock entry for nginx package, enter:

# yum versionlock delete nginx

To remove all versionlock entries:

# yum versionlock clear

 

Sample outputs:

Loaded plugins: product-id, rhnplugin, security, subscription-manager,

: versionlock

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

This system is receiving updates from RHN Classic or RHN Satellite.

versionlock cleared

Add a exclude (within versionlock) for the latest versions of the packages in the available repos

# yum versionlock exclude pakage1 package2

# yum versionlock exclude pakage-wildcard-here

Demo: Locking ethtool package using yum lock version commands

First, check ethtool package has updates on the server:

# yum check-update

# yum check-update ethtool

 

Sample outputs:

Loaded plugins: product-id, rhnplugin, security, subscription-manager,

: versionlock

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

This system is receiving updates from RHN Classic or RHN Satellite.

 

ethtool.x86_64               2:3.5-1.2.el6_5                rhel-x86_64-server-6

Lock down ethtool, enter:

# yum versionlock add ethtool

 

Sample outputs:

Loaded plugins: product-id, rhnplugin, security, subscription-manager,

: versionlock

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

This system is receiving updates from RHN Classic or RHN Satellite.

Adding versionlock on: 2:ethtool-3.5-1.el6

versionlock added: 1

List entries in versionlock, enter:

# yum versionlock list

 

Sample outputs:

Loaded plugins: product-id, rhnplugin, security, subscription-manager,

: versionlock

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

This system is receiving updates from RHN Classic or RHN Satellite.

2:ethtool-3.5-1.el6.*

versionlock list done

Try to update ethtool package, enter:

# yum update ethtool

 

Sample outputs:

Loaded plugins: product-id, rhnplugin, security, subscription-manager,

: versionlock

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

This system is receiving updates from RHN Classic or RHN Satellite.

Setting up Update Process

No Packages marked for Update

Delete ethtool versionlock so that yum can apply an update:

# yum versionlock delete  2:ethtool-3.5-1.el6.*

 

Sample outputs:

Loaded plugins: product-id, rhnplugin, security, subscription-manager,

: versionlock

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

This system is receiving updates from RHN Classic or RHN Satellite.

Deleting versionlock for: 2:ethtool-3.5-1.el6.*

versionlock deleted: 1

Tip: List/view history of package?

Use the following command:

# yum –showduplicates list packageNameHere

# yum –showduplicates list ethtool

 

Sample outputs:

Fig.01: See all packages versions

 

The yum command has history option. It allows an admin to access detailed information on the history of yum transactions that have been run on a system. You can see what has happened in past transactions. You can use various command line options to view what happened, undo/redo/rollback to act on that information and start a new history file.

Method # 2: yum –exclude command to lock package version from yum update

Edit /etc/yum.conf

# vi /etc/yum.conf

 

Append the following line under [main] section to lock php and nginx, enter:

exclude=php* nginx*

Save and close the file. See how to exclude packages when I use “yum update” command tutorial for more information.

Related media

A quick video tutorial shows you how to prevent any package to be update using yum even its update is available on a CentOS/Red Hat Enterprises Linux server.

 

 

(Video 01: yum-versionlock: Lock rpm/yum Packages on a CentOS/RHEL Based Server)

 

 

]]>
http://wiki.shopingserver.com/centos-rhel-yum-lock-package-version-particular-version/feed/ 0