183

Many people seem to be afraid of mixing stable with testing, but frankly, testing is fairly stable in its own right, and with proper preferences and solution checking, you can avoid the "stability drift" that puts your core packages on the unstable path. "Testing is fairly stable??", you ask. Yes. In order for a package to migrate from unstable to testing,...


68

First stop your server obviously: sudo service apache2 stop Remove apache2 packages and dependencies: sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common sudo apt-get autoremove --purge If you manually modified or installed stuff, apt might not remove it. Check what's left: whereis apache2 Have a look whats inside these directories, ...


66

Update: As of Ansible 2.0, there is now a generic & abstracted package module Usage Examples: Now when the package name is the same across different OS families, it's as simple as: --- - name: Install foo package: name=foo state=latest When the package name differs across OS families, you can handle it with distribution or OS family specific vars ...


60

Have you tried this? $ yum list installed bind


50

The Debian Policy Manual has this to say about the version field, which answers some parts of your question: Format The format is: [epoch:]upstream_version[-debian_revision] The three components here are: epoch This is a single (generally small) unsigned integer. It may be omitted, in which case zero is assumed. If it is omitted then ...


40

Edit 4/4/2014: Hey OP, look at what was just released today: http://blogs.technet.com/b/windowsserver/archive/2014/04/03/windows-management-framework-v5-preview.aspx I just wanted to expand a little on the accepted answer, because it's a little sparse on details. Filipe's answer makes no mention of the strategies that Windows actually does use to resolve ...


32

you can do a yum install without the -y switch (if you use it): yum install <package> this will grab a list of packages and dependancies required. Before installing it will ask you if you want to install or not, just answer no and no changes will be made. Alternatively you can do yum deplist <package> to list all the dependancies of a ...


29

It doesn't. Unless we're talking about .NET which asks you to install framework version X according with the compiler. Everything else just throws an error. With luck, you get missing dll xxxx.dll. Although, most installers will have the required libraries included in order to run the software.


27

"I've installed foobar version 2, compiled from sources" Take the extra effort when adding custom software to your system and package your additions in a RPM. See Martin Streicher, 2010-01-12, Building and distributing packages, IBM on how to do that. Then install that resulting RPM so it can and will play nice with your package manager's conflict and ...


26

Since squeeze in Debian and since oneric in Ubuntu, there are some (like headers-more-module I needed) in apt-get install nginx-extras


23

For debian you can do this with policy-rc.d. Here's one explanation: A package’s maintainer scripts are supposed to only interface with the init system by means of invoke-rc.d, update-rc.d and the LSB init script headers... invoke-rc.d will, before taking its action, check whether /usr/sbin/policy-rc.d is executable, will call it with the respective ...


22

Coming way to late but (at least on Fedora 15) one can use yumdb for similar queries: yumdb info 'python*' And what I actually needed to list packages from given repo(s): yumdb search from_repo 'my-*-repo'


20

Alternatively if the deb is also in the repository and you want to know older versions changelog, you can use apt-get changelog package to read all the changelog. For example for openssl: apt-get changelog libssl1.0.0


19

NOTE: This answer is not about finding a vagrant box for "Amazon Linux". This answer is about helping the original poster solve the goal of using the same system in production as in dev, which happens to be Ubuntu. As you can see in the comments below, OP agreed this would solve his problem. Canonical provides official Ubuntu AMIs on EC2 and corresponding ...


18

Is php 5.3 really necessary for what you're doing? Don't automatically assume newer is better. If you upgrade to CentOS 6 php 5.3 is the default. What you have to understand is RedHat (and thus its clones) is very conservative about upgrading packages with good reason. If you want the to push it and get more upgraded packages, expect problems. That said, ...


18

The yum history option allows the user to view what has happened in past transactions. To make it more simple you can grep Update from yum history # yum history Loaded plugins: fastestmirror, refresh-packagekit ID | Login user | Date and time | Action(s) | Altered ----------------------------------------------------------...


16

The FHS compliant path to install third party software is not /srv, but /opt. Check here and here. With regards to whether or not to use precompiled packages, you have two choices: Use them if you trust the vendor regarding security updates and bugfixes. I would, they surely have more manpower and resources dedicated to this task than your company. You can ...


15

They have lots of metadata. Use -qp to target the package file and --qf to specify which metadata you're interested in. $ rpm -qp /var/cache/yum/x86_64/16/fedora/packages/db4-4.8.30-3.fc15.i686.rpm --qf "%{name}: %{buildhost}\n" db4: x86-10.phx2.fedoraproject.org rpm --querytags will show you the metadata tags.


14

You can use the check-update option to yum to see if there is an update available for the package. It will tell you if there is an update available (and to what version) for the specified package. So you could do something like: yum check-update <package> to see the info for a specific package, and: yum check-update to see the info for the ...


13

UPDATE This original answer is now out of date. The updated command for Puppet 3.x is: puppet resource package If you're looking for all the packages and versions installed on a node regardless of whether they're installed by Puppet or not, the following command is built in and can be run on any Puppet node: ralsh package This will output the data in a ...


13

On Debian based systems there is the DPKG (below apt) can have diversions setup using the command dpkg-divert dpkg-divert is the utility used to set up and update the list of diversions. File diversions are a way of forcing dpkg(1) not to install a file into its location, but to a diverted location. ... System administrators can also use it ...


13

There's a much easier way of issuing this query: rpm -qa | grep bind or rpm -q bind. The former is best if you're not completely sure of the package name.


13

You can abstract out package managers via facts - name: Install packages with_items: package_list action: "{{ ansible_pkg_mgr }} state=installed name={{ item }}" All you need is some logic that sets ansible_pkg_mgr to apt or yum etc. Ansible are also working on doing what you want in a future module.


13

No, installing packages from the wrong distribution version is not safe. Despite that people seem to do it all the time (and usually break their systems in amusing ways). In particular glibc is the most critical package on the system; everything is built against it, and if its ABI is changed then everything would have to be rebuilt against it. You should not ...


13

I am not sure what is available for R (heard about REnv), but for Python I've decided on the pragmatic approach that every user is responsible for their own Python environment with pyenv (same is true for Perl with perlbrew and Ruby with RVM). That way, users can create their own optimal environment for every project without my assistance (pyenv manages ...


12

I had a similar problem. First step was to find the top ten space hogs: # cd /usr/share # du -sm * | sort -rn | head -10 /usr/share/doc was 759MB on my system. Space that could be useful for other purposes. With *nix you can move things around without breaking things. In my case I had plenty of free space on /home which was on a different partition: # ...


12

On the reference installation (only once): dpkg-query -W -f='${Package}\n' | sort > baselist.txt (The following assumes bash) To get the packages added from the reference installation (this doesn't show what was removed): comm -1 -3 baselist.txt <(dpkg-query -W -f='${Package}\n' | sort) Even better, avoiding copy of baselist.txt: comm -1 -3 <(...


12

For rpm you must specify where to get the file with the new version of the package. yum, which is a more intelligent management system, try to find a new version of the package in their repositories, will look for the package dependencies, will look for the fastest repository mirror (and make a lot of other pleasantrie)


11

Here is an example workflow using ptman's suggestion. Assuming you have downloaded the .dsc file, the .orig.*z file, and maybe also a .debian.*z file, then unpack the source package with: dpkg-source -x [package_name]_[package_version].dsc Move into the extracted source folder and run: sudo mk-build-deps -i This will create the file [package_name]-build-...


11

No, there is no way to use Amazon Linux outside of EC2. If you want to use a Red Hat Enterprise Linux derivative (which Amazon Linux is), I recommend using CentOS 6 both in Vagrant and on EC2. You will find many CentOS base boxes here, and the official AMIs are listed here.


Only top voted, non community-wiki answers of a minimum length are eligible