Ubuntu:Adding a software repository

来源:互联网 发布:淘宝直播流量怎么买 编辑:程序博客网 时间:2024/05/16 18:46

Adding a software repository

Software is available from third-party sources, as well as from the default Ubuntu software repositories. If you want to install software from a third-party software repository, you must add it to the package manager's list of available repositories.

[Caution] 

Only add software repositories from sources that you trust. Third-party software repositories are not checked for security by Ubuntu members, and may contain software which is harmful to your computer.

  1. Open SystemAdministrationSoftware Sources and select Other Software.

  2. Click Add to add a new repository.

  3. Enter the APT line for the extra repository. This should be available from the website of the repository, and should look similar to the following:

    deb http://archive.ubuntu.com/ubuntu/ lucid main
  4. Click Add Source and then clickClose to save your changes.

  5. You will be notified that the information about available software is out-of-date. ClickReload.

  6. Packages from the new repository should now be available in your package manager.

As a security measure, most software repositories use a GPG key to digitally sign the files they provide. This makes it easy to check that the files have not been tampered with since their creation. In order for your package manager to be able to check this, you need the public key that corresponds to the signatures. The key should be available for download on the repository's website.

Download the GPG key. Then, click SystemAdministrationSoftware Sources, select theAuthentication tab, click Import Key File and select the GPG key to be imported.

You can also add the GPG key using the terminal by entering the following command:

                                  sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com key-fingerprint                              

Adding a Personal Package Archive (PPA)

Launchpad provides all users with their own Personal Package Archive (PPA) that can be used to build and store Ubuntu packages. In the same way that you can add a normal software repository, you can also add a PPA to the package manager's list of available repositories. PPAs work like normal Ubuntu archives. You can install software in the usual way -- for example, through apt-get or synaptic -- and whenever there's an update Ubuntu will prompt you to install it.

[Caution] 

You download and install PPA packages at your own risk. Ubuntu, Launchpad and Canonical do not endorse these packages. You must be certain that you trust the PPA owner before you install their software.

You should begin by familiarizing yourself with the section called “Adding a software repository” before beginning.

The APT line for the PPA can be found on the PPA overview page on Launchpad, and should look similar to the following:

deb http://ppa.launchpad.net/user/ppa/ppa-name lucid main

As a security measure, all PPAs use a unique GPG key to digitally sign the packages that they provide. This makes it easy to check that the packages have not been tampered with since Launchpad built them and to be sure that you are downloading from the PPA that you want. In order for your package manager to be able to check this, you need the public key that corresponds to the signatures. The key should be available for download on the PPA overview page on Launchpad. Until you add the PPA's key to your system, you will see warnings that you are downloading from an untrusted source.

The key used to sign a PPA is listed on the PPA overview page. Instructions on how to add the key can be found inthe section called “Adding a software repository”.

Additional information about adding a PPA repository can be found on Launchpad.


原创粉丝点击