Otherwise you have to type sudo in front of all of these commands individually. Now you have permission to dramatically screw up the computer so be 'root' carefully! When entered without anything else after it, the default to switch to is root. and enter your root password when prompted. We do this by using sudo to change the user in the terminal without having to actually be logged into a session as root. So substitute the actual file names like ubuntu-advantage-tools or libnfsidmap1 with whatever YOUR computer says needs to be upgraded.Īll of these commands need to be run as root. The technique works regardless of what names you see in your output. deb package from the internet : deb : - name : Remove useless packages from the cache : autoclean : yes - name : Remove dependencies that are no longer required missing package NAMES in YOUR case won't necessarily be the same as in this example. deb package : deb : /tmp/b - name : Install the build dependencies for package "foo" : pkg : foo state : build-dep - name : Install a. : name : zfsutils-linux state : latest fail_on_autoremove : yes - name : Install latest version of "openjdk-6-jdk" ignoring "install-recommends" : name : openjdk-6-jdk state : latest install_recommends : no - name : Update all packages to their latest version : name : "*" state : latest - name : Upgrade the OS (apt-get dist-upgrade) : upgrade : dist - name : Run the equivalent of "apt-get update" as a separate step : update_cache : yes - name : Only run "update_cache=yes" if the last one is more than 3600 seconds ago : update_cache : yes cache_valid_time : 3600 - name : Pass options to dpkg on run : upgrade : dist update_cache : yes dpkg_options : 'force-confold,force-confdef' - name : Install a. name : Install apache httpd (state=present is optional) : name : apache2 state : present - name : Update repositories cache and install "foo" package : name : foo update_cache : yes - name : Remove "foo" package : name : foo state : absent - name : Install the package "foo" : name : foo - name : Install a list of packages : pkg : - foo - foo-tools - name : Install the version '1.00' of package "foo" : name : foo=1.00 - name : Update the repository cache and update package "nginx" to latest version using default release squeeze-backport : name : nginx state : latest default_release : squeeze-backports update_cache : yes - name : Install the version '1.18.0' of package "nginx" and allow potential downgrades : name : nginx=1.18.0 state : present allow_downgrade : yes - name : Install zfsutils-linux with ensuring conflicted packages (e.g. When an exact version is specified, an implicit priority of 1001 is used. When default_release is used, an implicit priority of 990 is used. When used with a loop: each package will be processed individually, it is much more efficient to pass the list directly to the name option. Since we don’t have warnings and prompts before installing we disallow this.Use an explicit fnmatch pattern if you want wildcarding) The apt-get commandline supports implicit regex matches here but we do not because it can let typos through easier (If you typo foo as fo apt-get would install packages that have “fo” in their name with a warning and a prompt for the user. Remove the file or remove its execute permission afterwards. For example when installing Postgresql-9.5 in Debian 9, creating an excutable shell script (/usr/sbin/policy-rc.d) that throws a return code of 101 will stop Postgresql 9.5 starting up after install. Most distributions have mechanisms to avoid this. In most cases, packages installed with apt will start newly installed services by default. Three of the upgrade modes ( full, safe and its alias true) required aptitude up to 2.3, since 2.4 apt-get is used as a fall-back.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |