Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ How to create a remote     - CentOS 6.4 (64bit) install Python 2.7.5 (Linux)

- Android application simulates the phone keypad (Programming)

- Installation configuration CUDA under Ubuntu 14.04 (Linux)

- To share some very useful Vim command (Linux)

- Commonly used Linux system camouflage method (Linux)

- Linux Troubleshooting: How to save the status of the SSH session is closed (Linux)

- How to disable IPv6 on Ubuntu, Linux Mint, Debian (Linux)

- OpenWrt modify flash size (Linux)

- AngularJS notes --- Data Binding (Programming)

- Use PXE with kickstart to install Linux automatically (Linux)

- To_teach you three strategies to prevent the LAN IP address theft (Linux)

- Python context managers (Programming)

- OpenSSH server configuration file for each Common Definition (Server)

- CentOS 6.7 compile and install LAMP (Server)

- To compile and install Redis Linux and master-slave replication configuration (Database)

- Processor in protected mode of protection (Linux)

- Build your own CA services: OpenSSL command line CA Quick Guide (Server)

- How to compare PDF files on Ubuntu (Linux)

- Java Adapter Mode (Programming)

- Iscsi package is installed on RHEL 6.3 x86-64 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
- HTML5 Application Cache (Programming)
- Linux RPM default installation path (Linux)
- The difference between statement and preparedStatement of the jdbc (Database)
- Use apt-p2p up a local Debian package cache (Server)
- Linux Mint 17 set up the Ruby environment (Linux)
- IOwait Linux system monitoring diagnostic tools (Linux)
- Java reflection technology explain (Programming)
- Installation Docker FAQ on Ubuntu (Linux)
- Java developers question (Programming)
- Linux text processing tool of sed (Linux)
- Linux server is how to do after the invasion (Linux)
- Ubuntu FAQ solutions (Linux)
- Ansible module Know (Linux)
- RPM package creation Getting Started (Linux)
- iOS persistence of data archiving NSKeyedArchiver (Programming)
- Analysis of MySQL High Availability (Database)
- Handle large data problems Bit-map method (Programming)
- Linux iostat command example explanation (Linux)
- Oracle 12c of the auto-increment Identity Columns (Database)
- Source Analysis: Java object memory allocation (Programming)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.