Mainos / Advertisement:

Ero sivun ”APT/en” versioiden välillä

Kohteesta Taisto
Siirry navigaatioon Siirry hakuun
(Ak: Uusi sivu: APT)
 
(Ak: Uusi sivu: == Sources ==)
 
(27 välissä olevaa versiota samalta käyttäjältä ei näytetä)
Rivi 1: Rivi 1:
 
<languages/>
 
<languages/>
Voit lukea lisää wikipediasta ja debian-wikistä:
+
You can read more about APT from wikipedia and the debian-wiki:
  
 
http://en.wikipedia.org/wiki/Advanced_Packaging_Tool
 
http://en.wikipedia.org/wiki/Advanced_Packaging_Tool
Rivi 9: Rivi 9:
 
== APT (Advanced Packaging Tool) ==
 
== APT (Advanced Packaging Tool) ==
  
=== Komennot ===
+
=== Commands ===
 
  apt-cache                    aptitude-create-state-bundle
 
  apt-cache                    aptitude-create-state-bundle
 
  apt-cdrom                    aptitude-curses
 
  apt-cdrom                    aptitude-curses
Rivi 20: Rivi 20:
 
=== /etc/apt/sources.list ===
 
=== /etc/apt/sources.list ===
  
Lähdelista, jonka avulla määritetään mistä apt (yrittää) hakea asennus paketit.
+
A sources list used to defined where apt tries to get it's packages from.
nano /etc/apt/sources.list
+
  nano /etc/apt/sources.list
  
Voit lisätä asemassa olevan CD:n tai DVD:n lähdelistaan komennolla (Sinulla tulee olla mountattu CD tai DVD levy ensin.)
+
You can add a CD or DVD disc to the sources list (you have to mount the disk before this!) using the command:
apt-cdrom add
+
  apt-cdrom add
  
Lisää tämän jälkeen sources.list tiedostoon (vaihda tummennettu numero levysi numeroksi):
+
After this open the sources.list file and change the darkened number to the number of your disc:
  
 
   deb cdrom:[Debian GNU/Linux 7.7.0 _Wheezy_ - Official amd64 DVD Binary-'''1''' 20141018-13:06]/ wheezy contrib main
 
   deb cdrom:[Debian GNU/Linux 7.7.0 _Wheezy_ - Official amd64 DVD Binary-'''1''' 20141018-13:06]/ wheezy contrib main
  
Voit ottaa internet lähteet käyttöön muokkaamalla lähdelistaan rivit
+
You can enable internet sources by modifying the sources.list with the following lines:
 
  deb <nowiki>http://ftp.fi.debian.org/debian/</nowiki> wheezy main contrib
 
  deb <nowiki>http://ftp.fi.debian.org/debian/</nowiki> wheezy main contrib
 
  deb-src <nowiki>http://ftp.fi.debian.org/debian/</nowiki> wheezy main contrib
 
  deb-src <nowiki>http://ftp.fi.debian.org/debian/</nowiki> wheezy main contrib
  
Saatavilla olevien pakettien listan voi päivittää komennolla
+
The list of available packages can be updated with the command:
aptitude update
+
  aptitude update
  
Pakettien päivittäminen
+
Updating packages:
  
 
   aptitude upgrade
 
   aptitude upgrade
  
==== Esimerkki sources.list ====
+
==== Example sources.list ====
  
 
  deb http://http.debian.net/debian wheezy main
 
  deb http://http.debian.net/debian wheezy main
Rivi 50: Rivi 50:
 
  deb-src http://security.debian.org/ wheezy/updates main
 
  deb-src http://security.debian.org/ wheezy/updates main
  
=== Pakettien etsiminen ===
+
=== Searching for packets ===
  
Voit etsiä asennettuja ja asentamattomia paketteja komennolla
+
You can search for installed and not installed packages using the command
aptitude search hakusana
+
  aptitude search searchword
Komento palauttaa listan paketeista, jotka täsmäsivät hakusanaan.
+
The command returns you a list of packages that matched with the search word.
  
  
Rivi alkaa ''i'' -kirjaimella, jos paketti on jo asennettu.
+
The line will begin with an "i" if the package is already installed.
  
Seuraavana on paketin nimi.
+
After that comes the package name.
  
Lopussa on Lyhyt kuvaus paketista.
+
In the end there is a short description of the package.
  
  
Esimerkki
+
Example
 
  root@debian:/# aptitude search ssh
 
  root@debian:/# aptitude search ssh
 
  ...
 
  ...
Rivi 70: Rivi 70:
 
  ...
 
  ...
  
=== Pakettien asentaminen ===
+
=== Installing packages ===
  
Kun pakettilista on päivitetty onnistuneesti, voit asentaa paketteja komennolla
+
Once your packages list has been successfully updated, you can install packages using the command
aptitude install paketinnimi
+
  aptitude install packagename
  
Useasti asennus kysy lupaa jatkaa, paina ''Y'' -kirjainta ja ''Enter'' jatkaaksesi
+
In most cases the installation will prompt you for permission to continue, press "Y" and then "Enter" to continue.
  
Esimerkki (proftpd)
+
Example (proftpd)
 
  root@debian:/# aptitude install proftpd
 
  root@debian:/# aptitude install proftpd
 
  Note: selecting "proftpd-basic" instead of the
 
  Note: selecting "proftpd-basic" instead of the
Rivi 87: Rivi 87:
 
  Do you want to continue? [Y/n/?]
 
  Do you want to continue? [Y/n/?]
  
=== Näytä asennetut paketit ===
+
=== Show installed packages ===
  
Listaa kaikki asennetut paketit
+
List all installed packages
  
 
   dpkg-query -l
 
   dpkg-query -l
  
Listaa tietty paketti jos on asennettu
+
List a certain package if it's installed
  
 
   dpkg-query -l 'foo*'
 
   dpkg-query -l 'foo*'
  
== Pakettien poistaminen ==
+
== Removing packages ==
  
  
Poista asennettu paketti
+
Remove installed package
  
   aptitude remove ''paketinnimi''
+
   aptitude remove "packagename"
  
Poista paketti ja konfiguraatiot
+
Remove package and configurations
  
   aptitude purge ''paketinnimi''
+
   aptitude purge "packagename"
  
== Lähteet ==
+
== Sources ==
  
 
https://wiki.debian.org/ListInstalledPackages
 
https://wiki.debian.org/ListInstalledPackages

Nykyinen versio 12. elokuuta 2015 kello 08.45

Muut kielet:
English • ‎suomi

You can read more about APT from wikipedia and the debian-wiki:

http://en.wikipedia.org/wiki/Advanced_Packaging_Tool

https://wiki.debian.org/Apt


APT (Advanced Packaging Tool)

Commands

apt-cache                     aptitude-create-state-bundle
apt-cdrom                     aptitude-curses
apt-config                    aptitude-run-state-bundle
apt-extracttemplates          apt-key
apt-ftparchive                apt-listchanges
apt-get                       apt-mark
aptitude                      apt-sortpkgs

/etc/apt/sources.list

A sources list used to defined where apt tries to get it's packages from.

 nano /etc/apt/sources.list

You can add a CD or DVD disc to the sources list (you have to mount the disk before this!) using the command:

 apt-cdrom add

After this open the sources.list file and change the darkened number to the number of your disc:

 deb cdrom:[Debian GNU/Linux 7.7.0 _Wheezy_ - Official amd64 DVD Binary-1 20141018-13:06]/ wheezy contrib main

You can enable internet sources by modifying the sources.list with the following lines:

deb http://ftp.fi.debian.org/debian/ wheezy main contrib
deb-src http://ftp.fi.debian.org/debian/ wheezy main contrib

The list of available packages can be updated with the command:

 aptitude update

Updating packages:

 aptitude upgrade

Example sources.list

deb http://http.debian.net/debian wheezy main
deb-src http://http.debian.net/debian wheezy main
deb http://http.debian.net/debian wheezy-updates main
deb-src http://http.debian.net/debian wheezy-updates main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

Searching for packets

You can search for installed and not installed packages using the command

 aptitude search searchword

The command returns you a list of packages that matched with the search word.


The line will begin with an "i" if the package is already installed.

After that comes the package name.

In the end there is a short description of the package.


Example

root@debian:/# aptitude search ssh
...
i   ssh                   - secure shell client and server (metapackage)
...

Installing packages

Once your packages list has been successfully updated, you can install packages using the command

 aptitude install packagename

In most cases the installation will prompt you for permission to continue, press "Y" and then "Enter" to continue.

Example (proftpd)

root@debian:/# aptitude install proftpd
Note: selecting "proftpd-basic" instead of the
      virtual package "proftpd"
The following NEW packages will be installed:
  proftpd-basic proftpd-mod-vroot{a}
0 packages upgraded, 2 newly installed, 0 to remove and 46 not upgraded.
Need to get 2,573 kB of archives. After unpacking 4,356 kB will be used.
Do you want to continue? [Y/n/?]

Show installed packages

List all installed packages

 dpkg-query -l

List a certain package if it's installed

 dpkg-query -l 'foo*'

Removing packages

Remove installed package

 aptitude remove "packagename"

Remove package and configurations

 aptitude purge "packagename"

Sources

https://wiki.debian.org/ListInstalledPackages

Mainos / Advertisement: