Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ How to create a remote     - To install Jetty server configuration in detail (Server)

- Gnu Linux - Ubuntu System Clean-term consolidation (Linux)

- C ++ based foundation: the difference between C and C ++ (Programming)

- JavaScript cross-browser event object library (Programming)

- Different between Linux file path and the windows (Linux)

- Ubuntu 14.10 used ifconfig commands to manage your network configuration (Linux)

- How to configure chroot environment in Ubuntu 14.04 (Linux)

- CentOS 6.7 install Nagios Tutorials (Server)

- Oracle 12c R2 new feature dbca command to create a standby database (Database)

- How to manage Vim plugin (Linux)

- Android screen rotation processing and ProgressDialog the best AsyncTask (Programming)

- SSH Filesystem use a secure connection for network file system (Linux)

- Linux based serial programming (Programming)

- Do not find ifconfig eth0 and IP address under CentOS6.5 (Linux)

- After installing minimize RHEL / CentOS 7 need to do some things (Linux)

- C language Bubble Sort - integer sort (Programming)

- Ubuntu install Tonido private cloud services (Server)

- Ubuntu Apache2 setting, problem solving css, pictures, etc. can not be displayed (Server)

- Pydev installed and configured on the Eclipse (Linux)

- OpenSSL Introduction and compilation steps on Windows, Linux, Mac systems (Linux)

  How to create a remote
  Add Date : 2017-09-10      
  Reprepro is a small command-line tool to easily create and manage .deb warehouse. Today we'll show you how to use reprepro simply create a Debian package repository, and use rsync to upload Sourceforge.net.

Step 1: Install and generate key Reprepro

First, install all the required packages, use the following apt-get command.

$ Sudo apt-get install reprepro gnupg
Now you need to generate a gnupg gpg key, here, use the following command.

$ Gpg --gen-key
It will ask you some questions, such as what you want to key, key is valid, if you do not know how to answer, simply click Enter to select the default option (recommended)

Of course, it will ask you for a username and password, remember these in mind, because we'll need it later.

gpg (GnuPG) 1.4.14; Copyright (C) 2013FreeSoftwareFoundation, Inc.
Thisis free software: you are free to change and redistribute it.
Thereis NO WARRANTY, to the extent permitted by law.
Pleaseselect what kind of key you want:
(1) RSA and RSA (default)
(2) DSA andElgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection?
RSA keys may be between 1024and4096 bits long.
What keysize do you want? (2048)
Requested keysize is2048 bits
Please specify how long the key should be valid.
0 = key does not expire
= Key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years
Keyis valid for? (0)
Key does not expire at all
Isthis correct? (Y / N) Y
You need a user ID to identify your key; the software constructs the user ID
from the RealName, CommentandEmailAddressinthis form:
"Heinrich Heine (Der Dichter) < heinrichh@duesseldorf.de>"
Real name: ravisaive
Email address: tecmint.com@gmail.com
Comment: tecmint
You selected this USER-ID:
"Ravi Saive (tecmint) < tecmint.com@gmail.com>"
Change (N) ame, (C) omment, (E) mail or (O) kay / (Q) uit? O
You need a Passphrase to protect your secret key.
We need to generate a lot of random bytes.Itis a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: key 2EB446DD marked as ultimately trusted
publicand secret key created andsigned.
gpg: checking the trustdb
gpg: 3 marginal (s) needed, 1 complete (s) needed, PGP trust model
gpg: depth: 0 valid: 1signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
pub 2048R / 2EB446DD2014-06-24
Key fingerprint = D222 B1C9 342E591102B191473BD679182EB446DD
uid RaviSaive (tecmint) < tecmint.com@gmail.com>
sub2048R / 7EF2F7502014-06-24
Now that your key has been generated, and to check, run this command with root privileges.

$ Sudo gpg --list-keys
Sample output

pub 2048R / 2EB446DD2014-06-24
uid ravisaive (tecmint) < tecmint.com@gmail.com>
sub2048R / 7EF2F7502014-06-24
Step 2: Create a package repository and export key

We are now going to start creating warehouse, first you need to create some folders, our warehouse will be placed in / var / www / apt directory, let us create these directories.

$ Sudo su
# Cd / var / www
# Mkdir apt
# Mkdir -p ./apt/incoming
# Mkdir -p ./apt/conf
# Mkdir -p ./apt/key
You now need to export the key to the warehouse folder, run:

# Gpg --armor --export username yourmail@mail.com >> /var/www/apt/key/deb.gpg.key
Note: The user name you entered in the previous step instead of the username, use your email instead of the above yourmail@mail.com.

We need to create a file "distributions" in / var / www / apt / conf.

# Touch / var / www / apt / conf / distributions
Add the following lines to the file and save distributions.

Origin :( your name)
Label :( library name)
Suite: (stable or unstable)
Codename :( release code name, such trusty)
Version :( releases, such as 14.04)
Architectures :( package supported architecture, such as i386 or amd64)
Components :( part contains, for example, main restricted universe multiverse)
Description :( description)
SignWith: yes
Next we'll create a repository tree, run these commands:

# Reprepro --ask-passphrase -Vb / var / www / apt export
Sample output

Created directory "/ var / www / apt / db"
ExportingTrusty ...
Created directory "/ var / www / apt / dists"
Created directory "/ var / www / apt / dists / Trusty"
Created directory "/ var / www / apt / dists / Trusty / universe"
Created directory "/ var / www / apt / dists / Trusty / universe / binary-i386"
FF5097B479C8220C ravisaive (tecmint) < tecmint.com@gmail.com> needs a passphrase
Please enter passphrase:
Successfully created '/var/www/apt/dists/Trusty/Release.gpg.new'
FF5097B479C8220C ravisaive (tecmint) < tecmint.com@gmail.com> needs a passphrase
Please enter passphrase:
Successfully created '/var/www/apt/dists/Trusty/InRelease.new'
Step 3: Create a new warehouse was added package

You are now ready to join the .deb package to the repository. Into the / var / www / apt directory every time you want to add the package at all times to do so.

# Cd / var / www / apt
# Reprepro --ask-passphrase -Vb. Includedeb Trusty /home/ravisaive/packages.deb
Note: Use your distributions entered in the file repository code to replace the trusty, and replace the package with a path /home/username/package.deb, you will be asked to enter a password.

Sample output

/home/ravisaive/packages.deb: component guessed as'universe '
Created directory "./pool"
Created directory "./pool/universe"
Created directory "./pool/universe/o"
Created directory "./pool/universe/o/ojuba-personal-lock"
Exporting indices ...
FF5097B479C8220C ravisaive (tecmint) < tecmint.com@gmail.com> needs a passphrase
Please enter passphrase:
Successfully created './dists/Trusty/Release.gpg.new'
FF5097B479C8220C ravisaive (tecmint) < tecmint.com@gmail.com> needs a passphrase
Please enter passphrase:
Successfully created './dists/Trusty/InRelease.new'
Your package has been added to the warehouse, if you want to remove it, then use the following command:

# Reprepro --ask-passphrase -Vb / var / www / apt remove trusty package.deb
Of course, you need to modify the code repository and command your package.

Step 4: Upload warehouse to Sourceforge.net

To upload warehouse to Sourceforge.net, of course you need an account with a usable items that are available, so I assume you want to upload to the warehouse http://sourceforge.net/projects/myfoo/testrepository, here is the project name myfoo (on UNIX name, not the URL, not the title), testrepository you want to upload this file to the above directory, where we'll use rsync command. (LCTT Annotation: Of course, you can also upload additional support Http / on Rsync server to provide remote software library services.)

# Rsync -avP -e ssh / var / www / apt / username@frs.sourceforge.net: / home / frs / project / myfoo / testrepository /
Note: Use your username on sourceforge.net instead of username, the name of your project with UNIX instead myfoo, with the file you want to store the folder instead of testrepository.

Now your warehouse (including setting and key, etc.) uploaded to http://sourceforge.net/projects/myfoo/testrepository.

It should be added to an already assembled system, you first need to import warehouse key, it is actually /var/www/apt/key/deb.gpg.key, but this is a local path, use your warehouse other users can not add to their system, which is the reason why we want to import the key from sourceforge.net.

$ Sudo su
# Wget -O - http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key | apt-key add -
You can now very easily put into the system in a warehouse, open /etc/apt/sources.list, and add the following line:

deb http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key trusty main
Note: with the UNIX type the name of your project instead myfoo, instead of the code with your warehouse trusty, with your upload stored folder instead of testrepository, to join with you in distributionsj warehouse assembly instead of main.

Next, run the following command to update the repository list.

$ Sudo apt-get update
- C ++ handling text input (Programming)
- C ++: Postmodern systems programming language (Programming)
- How MAT Android application memory leak analysis (Programming)
- Optimized to minimize the installation of CentOS 5.8 (Linux)
- C language programming entry - macro definitions and enum (Programming)
- Enterprise Hadoop cluster architecture - NFS installation (Server)
- Upgrading to MySQL 5.7 partitioning problem solving (Database)
- TeamCity continuous integration in the Linux installation (Linux)
- Linux memory management (Linux)
- Get the Linux device PCI ID method (Linux)
- C # function (Programming)
- Wildcards and special symbols usage comments under Linux (Linux)
- How to fix Not Enough Free Disk Space On / boot on Ubuntu (Linux)
- Linux server data backup (Server)
- After CentOS configure SSH password Free, still prompted for a password (Linux)
- Read the official GNU Make manual one (chapter 1-2) (Programming)
- Linux Getting Started tutorial: hard disk partition and to deal with traps (Linux)
- Linux, modify / retrieve the root password (Linux)
- Try to use Lets Encrypt (Linux)
- DRBD daily management (Server)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.