Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ How to create a remote     - Docker use Dockerfile created since the launch of the service support SSH container mirror (Server)

- Eclipse remove all comments and code spaces (Linux)

- Installation and use Docker under Ubuntu 14.04 (Linux)

- CentOS6.5 install SVN & visual management tools iF.SVNAdmin (Server)

- How to Install Winusb in Ubuntu 14.04 (Linux)

- Use netcat [nc] command on Linux and Unix port scan (Server)

- Kafka cluster deployment (Server)

- SQLite3 simple operation (Database)

- VirtualBox modify the size of the virtual machine disk VDI (Linux)

- Linux Telnet access Windows 7 configuration procedure (Linux)

- Let Markdown code syntax highlighting and support Django1.6 (Linux)

- Use mdadm tool to create software RAID 0 (Linux)

- JBoss7 configuration - Supports IPv4 and IPv6 dual-stack environment (Server)

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

- How to Debian Linux the default Python version switch to alternative version (Linux)

- Linux development management utility command (Linux)

- How to remove the Linux memory Cache, Buffer and swap space (Linux)

- JavaScript function closures Quick Start (Programming)

- Linux five security TIPS (Linux)

- To access an Oracle database using Instant Client (Database)

  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
- MD5 and simple to use (Linux)
- Inherent limitations of Linux systems network security (Linux)
- N1QL bring SQL-like query NoSQL database experience (Database)
- Servlet 3.0 interfaces of AsyncListener (Programming)
- Linux Command Tutorial: cat command to view the contents of the file (Linux)
- DataGuard a hardware issue warnings found (Database)
- Save the database data files into Oracle Learning (Database)
- Oracle table Access Control (Database)
- Oracle RAC upgrade to problems encountered (Database)
- To teach you a trick to find the real IP address (Linux)
- Binder began to talk about inter-process communication mechanism from Android AIDL (Programming)
- Ubuntu Linux Change the PATH (Linux)
- A command to install Sublime Text 3 on Manjaro / Archlinux (Linux)
- CentOS7 boot systemd introduction and use of management (Linux)
- GitLab Installation Guide -Ubuntu 14.04 LTS (Server)
- Linux deploy Tutorial (Linux)
- Android imageView in the Src and Background (Programming)
- Protobuf compiled and used on the Ubuntu 14.04 (Programming)
- MySQL main and backup replication structures (using mysqld_multi) (Database)
- Everyone should know something about TCP (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.