mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-10 22:21:11 +08:00
20150324-1 选题
This commit is contained in:
parent
b52aa9da24
commit
45a30b0f30
@ -0,0 +1,132 @@
|
||||
How to Install Telegram Messenger Application on Linux
|
||||
================================================================================
|
||||
Telegram is an Instant Messaging (IM) application similar to whatsapp. It has a very large user base. It has a lot of features that differentiate it from other messaging application.
|
||||
|
||||
![Install Telegram in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Install-Telegram-in-Linux.png)
|
||||
Telegram Messenger for Linux
|
||||
|
||||
This article aims at making you aware of telegram application followed by detailed installation instructions on Linux Box.
|
||||
|
||||
#### Features of Telegram ####
|
||||
|
||||
- Implementation for mobile devices
|
||||
- Available for Desktop.
|
||||
- Application Program Interface (API) of Telegram can be Accessed by third party developers.
|
||||
- Available for Android, iphone/ipad, Windows Phone, Web-Version, PC, Mac and Linux
|
||||
- The above application provides Heavily Encrypted and self destruct messages.
|
||||
- Lets you access your message from multiple devices and platform.
|
||||
- The overall processing and message delivery is lightening fast.
|
||||
- Distributed server across the globe for security and speed.
|
||||
- Open API and Free Protocol
|
||||
- NoAds, No Subscription charge. – Free forever.
|
||||
- Powerful – No limit to media and chats
|
||||
- Several security measures that make it safe from Hackers.
|
||||
- Reply to Specific message in group. Mention @username to notify multiple users in group.
|
||||
|
||||
#### Why Telegram? ####
|
||||
|
||||
When Applications like whatsapp and other IM are providing almost same things in bag, why should someone opt for Telegram?
|
||||
|
||||
Well Availability of API to third party developer is enough to say. Moreover availability for PC which means you won’t have to struggle typing message using your mobile, but you can use your PC and that is pretty more than sufficient.
|
||||
|
||||
Also The option to connect on remote locations, Co-ordinate – Group of upto 200 Members, Sync all your devices, Send – Documents of all kind, Encrypt message, Self destruction of message, Storage of Media in Cloud, Build own tool on freely available API and what not.
|
||||
|
||||
**Testing Environment**
|
||||
|
||||
We have used Debian GNU/Linux, x86_64 architecture to test it and the overall process went very smooth for us. Here what we did stepwise.
|
||||
|
||||
### Installation of Telegram Messenger in Linux ###
|
||||
|
||||
First go to the official Telegram site, and download Telegram source package ([tsetup.0.7.23.tar.xz][1]) for Linux system or you may use following wget command to download directly.
|
||||
|
||||
# wget https://updates.tdesktop.com/tlinux/tsetup.0.7.23.tar.xz
|
||||
|
||||
Once package has been downloaded, unpack the tarball and switch from current working directory to the extracted directory.
|
||||
|
||||
# tar -xf tsetup.0.7.23.tar.xz
|
||||
# cd Telegram/
|
||||
|
||||
Next, execute the binary file ‘Telegram’ from the command line as shown below.
|
||||
|
||||
# ./Telegram
|
||||
|
||||
1. The first Impression. Click “START MESSAGING”.
|
||||
|
||||
![Start Messaging](http://www.tecmint.com/wp-content/uploads/2015/03/Start-Messaging.jpeg)
|
||||
Start Messaging
|
||||
|
||||
2. Enter Your phone Number. Click “NEXT”. If you have not registered for telegram before this, using the same number as entered above you will get a warning that you don’t have a telegram account yet. Click “Register Here”.
|
||||
|
||||
![Signup for Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Register.png)
|
||||
Signup for Telegram
|
||||
|
||||
3. After submitting your phone number, telegram will send you a verification code, shortly. You need to Enter it.
|
||||
|
||||
![Telegram Verification Code](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Verfication-Code.png)
|
||||
Telegram Verification Code
|
||||
|
||||
4. Enter your First_Name, Last_name and pics and click “SIGNUP”.
|
||||
|
||||
![Enter Account Details](http://www.tecmint.com/wp-content/uploads/2015/03/Enter-Account-Details.jpeg)
|
||||
Enter Account Details
|
||||
|
||||
5. After account creation, I got this interface. Everything seems at its place, even when I am new to telegram Application. The interface is really simple.
|
||||
|
||||
![Telegram Interface](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Interface.jpeg)
|
||||
Telegram Interface
|
||||
|
||||
6. Click Add a contact and Enter Their first_name, last_name and Phone number. Click create when done!.
|
||||
|
||||
![Add New Telegram Contact](http://www.tecmint.com/wp-content/uploads/2015/03/Add-New-Telegram-Contact.png)
|
||||
Add New Telegram Contact
|
||||
|
||||
7. If the contact you added is not on telegram already, You get a warning message and telegram will acknowledge you when your contact joins telegram.
|
||||
|
||||
![Telegram Contact Notification](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Notification.jpeg)
|
||||
Telegram Contact Notification
|
||||
|
||||
8. As soon as the contact joins telegram you get a message (pop-out like) that reads [YOUR_CONTACT] joined telegram.
|
||||
|
||||
9. A formal chat window on Linux Machine. Nice experience…
|
||||
|
||||
![Telegram Contact Join Message](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Join-Message.jpeg)
|
||||
Telegram Contact Join Message
|
||||
|
||||
10. At the same time, I’ve tried messaging from my android mobile device, the interface looks similar on both.
|
||||
|
||||
![Telegram Mobile Interface](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Mobile-Interface.png)
|
||||
Telegram Mobile Interface
|
||||
|
||||
11. Telegram settings page. You have a lot of options to configure.
|
||||
|
||||
![Telegram Settings](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Settings.png)
|
||||
Telegram Settings
|
||||
|
||||
12. About Telegram.
|
||||
|
||||
![About Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/About-Telegram.jpeg)
|
||||
About Telegram
|
||||
|
||||
#### Less Interesting Points ####
|
||||
|
||||
- Telegram usage protocol MTProto Mobile protocol.
|
||||
- Released Initially for iPhone in the year 2013 (August 14)..
|
||||
- People Behind this Amazing Project: Pavel and Nikolai Durov..
|
||||
|
||||
That’s all for now. I’ll be here again with another interesting article you will love to read. I take the pleasure on behalf of Tecmint to thank all our valuable readers and critics who made us stand where we are now through continuous self evolving process. Keep Connected! Keep Commenting. Share if you care for us.
|
||||
|
||||
- [https://telegram.org/][2]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/install-telegram-in-linux/
|
||||
|
||||
作者:[Avishek Kumar][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/avishek/
|
||||
[1]:https://tdesktop.com/linux
|
||||
[2]:https://telegram.org/
|
@ -0,0 +1,130 @@
|
||||
4 Tools to Securely Delete Files from Linux
|
||||
================================================================================
|
||||
Any computer user with normal level skill set knows that any data removed from computer system can be recovered later with little bit of efforts. This is a good thing in the scenario when you have accidentally deleted your critical data. But in most cases, you don't want your private data to be recovered easily. Whenever we remove anything, the operating system deletes just the index of the particular data. It means that data is still there somewhere on the disk, this method is insecure, as any smart computer hacker can use any good data recovery tool to easily recover your deleted data. Linux users utilizes the well know “**rm**” command to remove data from their operating system, but “rm” command works in the conventional fashion. Data removed using this command can be recovered by special file recovery tools.
|
||||
|
||||
Let’s see how we can safely and completely remove files/folders from our Linux system. The methods mentioned below remove data completely so it becomes very hard for recovery tools to find traces of the actual data and recover it.
|
||||
|
||||
### Secure-Delete ###
|
||||
|
||||
Secure-Delete is a set of tools for Linux operating system and they provide advanced techniques for permanent removal of files. Once Secure-Delete has been installed on any Linux system, it provides following four commands:
|
||||
|
||||
- srm
|
||||
- smem
|
||||
- sfill
|
||||
- sswap
|
||||
|
||||
Run following command in the terminal to install it in ubuntu:
|
||||
|
||||
sudo apt-get install secure-delete
|
||||
|
||||
![secure delete](http://blog.linoxide.com/wp-content/uploads/2015/03/secure-delete.png)
|
||||
|
||||
Run following command to install it in RHEL, Fedora or Centos:
|
||||
|
||||
sudo yum install secure-delete
|
||||
|
||||
“**srm**” command works similarly to “rm” command, but instead of just deleting the file, it first overwrites it multiple times with some random data and then removes the file permanently. The syntax for this command is pretty simply, just specify the file or directory to remove and it will take care of the task.
|
||||
|
||||
sudo srm /home/aun/Documents/xueo/1.png
|
||||
|
||||
"**sfill**" checks the specified partition/directories for space marked as free or available, and then uses its algorithm to fill it up with some random data. In this way it ensures that there are no more recoverable files/folders on the partition.
|
||||
|
||||
sudo sfill /home
|
||||
|
||||
"**sswap**" command is used to securely wipe your swap partitions. Swap partition is used to store data for running programs. First of all find out your swap partition by running the following command:
|
||||
|
||||
cat /proc/swaps
|
||||
|
||||
Example output of above command is show below:
|
||||
|
||||
aun@eagle:~$ cat /proc/swaps
|
||||
Filename Type Size Used Priority
|
||||
/dev/sda5 partition 2084860 71216 -1
|
||||
|
||||
From here, you can see that swap is set to which partition, and then securely clean it by running the following command. Replace the "/dev/sda5" part with your partition name.
|
||||
|
||||
sudo sswap /dev/sda5
|
||||
|
||||
“**smem**” is used to clean the contents of memory, its true that RAM contents are cleaned when system is rebooted or powered off, but some residual traces of data still remain in the memory. This command provides secure memory cleaning, simly run smem command on the terminal.
|
||||
|
||||
smem
|
||||
|
||||
### Shred ###
|
||||
|
||||
"shred" command destroys files/folder’s contents in a way that it is impossible to recover. It keeps overwriting the files with randomly generated data patterns so in this way it becomes very hard to recover any data from them even if hackers or thief uses high level of data recovery tools/equipments. Shred is installed by default on all Linux distributions, if you want, you can find its installation path by running following command:
|
||||
|
||||
aun@eagle:~$ whereis shred
|
||||
|
||||
shred: /usr/bin/shred /usr/share/man/man1/shred.1.gz
|
||||
|
||||
Run following command to remove file using shred utility.
|
||||
|
||||
shred /home/aun/Documents/xueo/1.png
|
||||
|
||||
Run following command to securely remove any partition using shred ; Replace partition name with your desired partition.
|
||||
|
||||
shred /dev/sda5
|
||||
|
||||
Shred by default overwrites file with random contents 25 times. If you want it to overwrite file more than this, simply specify the desired number with "shred -n" option.
|
||||
|
||||
shred -n 100 filename
|
||||
|
||||
If you want to truncate and remove file after overwriting, use "shred -u" option
|
||||
|
||||
shred -u filename
|
||||
|
||||
### dd ###
|
||||
|
||||
This command is originally used for Disk Cloning. It is used to copy contents of one partition or disk to another. But it is also used for securely wiping out the contents of a hard disk or partitions. Run following command to overwrite your current data with random data.You don't need to install dd command, all Linux distributions include this command already.
|
||||
|
||||
sudo dd if=/dev/random of=/dev/sda
|
||||
|
||||
You can also overwrite the contents of hard disk or partitions by simply replacing everything with “zero”.
|
||||
|
||||
sudo dd if=/dev/zero of=/dev/sda
|
||||
|
||||
### Wipe ###
|
||||
|
||||
Wipe was originally developed to securely erase files from magnetic media. This command line utility writes special patterns to the files repeatedly. It uses fsync() call and/or the O_SYNC bit to force disk access. It uses Gutmann algorithm for repeated writes. You can remove contents of single file, folder or entire hard disk with this command, but whole hard disk format using wipe command will take good amount of time. The installation and use of this utility is pretty easy.
|
||||
|
||||
Install wipe on ubuntu by running the following command on the terminal.
|
||||
|
||||
sudo aptitude install wipe
|
||||
|
||||
![Wipe Linux](http://blog.linoxide.com/wp-content/uploads/2015/03/wipe.png)
|
||||
|
||||
Install Wipe in Redhat Linux, Centos or Fedora by running the following command:
|
||||
|
||||
sudo yum install wipe
|
||||
|
||||
Once the installation is complete, run following command on the terminal to get complete list of its available options:
|
||||
|
||||
man wipe
|
||||
|
||||
Remove any file or directory as:
|
||||
|
||||
wipe filename
|
||||
|
||||
Securely remove your tmp partition by running following command:
|
||||
|
||||
wipe -r /tmp
|
||||
|
||||
Use following command to remove contents of complete partition (replace partition name with your desired partition).
|
||||
|
||||
wipe /dev/sda1
|
||||
|
||||
### Conclusion ###
|
||||
|
||||
We hope you find this article useful, the privacy of your data is critical, its important to have such secure file removal utilities installed on your system so you may be able to remove your private data without fear of being recovered easily. All of the above mentioned tools are pretty lightweight, they take minimum system resources to run, and does not affect performance of your system in anyway. Enjoy!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/security/delete-files-permanatly-linux/
|
||||
|
||||
作者:[Aun Raza][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://linoxide.com/author/arunrz/
|
@ -0,0 +1,163 @@
|
||||
7 Quirky ‘ls’ Command Tricks Every Linux User Should Know
|
||||
================================================================================
|
||||
We have covered most of the things on ‘ls‘ command in last two articles of our Interview series. This article is the last part of the ‘ls command‘ series. If you have not gone through last two articles of this series you may visit the links below.
|
||||
|
||||
注:以下三篇都做过源文,看看翻译了没有,如果发布了可适当改链接地址
|
||||
- [15 Basic ‘ls’ Command Examples in Linux][]
|
||||
- [15 Interview Questions on Linux “ls” Command – Part 1][]
|
||||
- [10 Useful ‘ls’ Command Interview Questions – Part 2][]
|
||||
|
||||
![7 Quirky ls Command Tricks](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-tricks.jpg)
|
||||
7 Quirky ls Command Tricks
|
||||
|
||||
### 1. List the contents of a directory with time using various time styles. ###
|
||||
|
||||
To list the contents of a directory with times using style, we need to choose any of the below two methods.
|
||||
|
||||
# ls -l –time-style=[STYLE] (Method A)
|
||||
|
||||
**Note** – The above switch (`--time` style must be run with switch `-l`, else it won’t serve the purpose).
|
||||
|
||||
# ls –full-time (Method B)
|
||||
|
||||
Replace `[STYLE]` with any of the below option.
|
||||
|
||||
full-iso
|
||||
long-iso
|
||||
iso
|
||||
locale
|
||||
+%H:%M:%S:%D
|
||||
|
||||
**Note** – In the above line H(Hour), M(Minute), S(Second), D(Date) can be used in any order.
|
||||
|
||||
Moreover you just choose those relevant and not all options. E.g., `ls -l --time-style=+%H` will show only hour.
|
||||
|
||||
`ls -l --time-style=+%H:%M:%D` will show Hour, Minute and date.
|
||||
|
||||
# ls -l --time-style=full-iso
|
||||
|
||||
![ls Command Full Time Style](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Full-Time-Style.gif)
|
||||
ls Command Full Time Style
|
||||
|
||||
# ls -l --time-style=long-iso
|
||||
|
||||
![Long Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Long-Time-Listing-Format.gif)
|
||||
Long Time Style Listing
|
||||
|
||||
# ls -l --time-style=iso
|
||||
|
||||
![Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Local-Time-Style-Listing.gif)
|
||||
Time Style Listing
|
||||
|
||||
# ls -l --time-style=locale
|
||||
|
||||
![Locale Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Hour-Mintue-Time-Style-Listing.gif)
|
||||
Locale Time Style Listing
|
||||
|
||||
# ls -l --time-style=+%H:%M:%S:%D
|
||||
|
||||
![Date and Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Time-Style-Listing.gif)
|
||||
Date and Time Style Listing
|
||||
|
||||
# ls --full-time
|
||||
|
||||
![Full Style Time Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Style-Time-Listing.gif)
|
||||
|
||||
Full Style Time Listing
|
||||
|
||||
### 2. Output the contents of a directory in various formats such as separated by commas, horizontal, long, vertical, across, etc. ###
|
||||
|
||||
Contents of directory can be listed using ls command in various format as suggested below.
|
||||
|
||||
- across
|
||||
- comma
|
||||
- horizontal
|
||||
- long
|
||||
- single-column
|
||||
- verbose
|
||||
- vertical
|
||||
|
||||
# ls –-format=across
|
||||
# ls --format=comma
|
||||
# ls --format=horizontal
|
||||
# ls --format=long
|
||||
# ls --format=single-column
|
||||
# ls --format=verbose
|
||||
# ls --format=vertical
|
||||
|
||||
![Listing Formats of ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-Listing-Formats.gif)
|
||||
Listing Formats of ls Command
|
||||
|
||||
### 3. Use ls command to append indicators like (/=@|) in output to the contents of the directory. ###
|
||||
|
||||
The option `-p` with ‘ls‘ command will server the purpose. It will append one of the above indicator, based upon the type of file.
|
||||
|
||||
# ls -p
|
||||
|
||||
![Append Indicators to Content](http://www.tecmint.com/wp-content/uploads/2015/03/Append-Indicators.gif)
|
||||
Append Indicators to Content
|
||||
|
||||
### 4. Sort the contents of directory on the basis of extension, size, time and version. ###
|
||||
|
||||
We can use options like `--extension` to sort the output by extension, size by extension `--size`, time by using extension `-t` and version using extension `-v`.
|
||||
|
||||
Also we can use option `--none` which will output in general way without any sorting in actual.
|
||||
|
||||
# ls --sort=extension
|
||||
# ls --sort=size
|
||||
# ls --sort=time
|
||||
# ls --sort=version
|
||||
# ls --sort=none
|
||||
|
||||
![Sort Listing of Content by Options](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Content-by-Extensions.gif)
|
||||
Sort Listing of Content by Options
|
||||
|
||||
### 5. Print numeric UID and GID for every contents of a directory using ls command. ###
|
||||
|
||||
The above scenario can be achieved using flag -n (Numeric-uid-gid) along with ls command.
|
||||
|
||||
# ls -n
|
||||
|
||||
![Print Listing of Content by UID and GID](http://www.tecmint.com/wp-content/uploads/2015/03/Print-UID-GID-of-Contents.gif)
|
||||
Print Listing of Content by UID and GID
|
||||
|
||||
### 6. Print the contents of a directory on standard output in more columns than specified by default. ###
|
||||
|
||||
Well ls command output the contents of a directory according to the size of the screen automatically.
|
||||
|
||||
We can however manually assign the value of screen width and control number of columns appearing. It can be done using switch ‘`--width`‘.
|
||||
|
||||
# ls --width 80
|
||||
# ls --width 100
|
||||
# ls --width 150
|
||||
|
||||
![List Content Based on Window Sizes](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-By-More-Column.gif)
|
||||
List Content Based on Window Sizes
|
||||
|
||||
**Note**: You can experiment what value you should pass with width flag.
|
||||
|
||||
### 7. Include manual tab size at the contents of directory listed by ls command instead of default 8. ###
|
||||
|
||||
# ls --tabsize=[value]
|
||||
|
||||
![List Content by Table Size](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-by-Table-Size.gif)
|
||||
List Content by Table Size
|
||||
|
||||
**Note**: Specify the `[Value]=` Numeric value.
|
||||
|
||||
That’s all for now. Stay tuned to Tecmint till we come up with next article. Do not forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/linux-ls-command-tricks/
|
||||
|
||||
作者:[Avishek Kumar][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/avishek/
|
||||
[1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/
|
||||
[2]:http://www.tecmint.com/ls-command-interview-questions/
|
||||
[3]:http://www.tecmint.com/ls-interview-questions/
|
@ -0,0 +1,113 @@
|
||||
How to Host Open Source Code Repository in github
|
||||
================================================================================
|
||||
Hi all, today we will be learning how to host Source Code of Open Source Software in the repository hosted by github.com . GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. It provides a workplace to host powerful collaboration, code review, and code management for open source and private projects. Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. GitHub offers both paid plans for private repositories and free accounts, which are usually used to host open-source software projects.
|
||||
|
||||
![github universe logo](http://blog.linoxide.com/wp-content/uploads/2015/03/github-universe.jpg)
|
||||
|
||||
It is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Anyone can host their software's source code in github's repository for the use, contribution, sharing, issue tracking and many more by millions of people across the globe. Here are some easy and quick steps to easily host software's source code.
|
||||
|
||||
### 1. Creating a new Github Account ###
|
||||
|
||||
First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below.
|
||||
|
||||
![Github Homepage](http://blog.linoxide.com/wp-content/uploads/2015/03/github-homepage.png)
|
||||
|
||||
Now, after the homepage has been opened, please fill form shown to sign up for a new github account.
|
||||
|
||||
After the you entered the valid information required for sign up, you'll be redirected to the plan choosing step. We have 5 plans listed in this page. One can choose the plan according to their requirement. Here, we'll go for a free plan. So, click on Choose to the Free plan and click on Finish Sign up. If we are planning to create an organization then, we need to tick on Help me setup an organization next.
|
||||
|
||||
![choosing plan](http://blog.linoxide.com/wp-content/uploads/2015/03/choosing-plan.png)
|
||||
|
||||
### 2. Creating a New Repository ###
|
||||
|
||||
After we have successfully signed up a new account or logged in to Github, we'll now need to create a new Repository to get started.
|
||||
|
||||
Click on **(+)** button which is located at the top right near the account id. Then Click on New Repository .
|
||||
|
||||
![Add new repository](http://blog.linoxide.com/wp-content/uploads/2015/03/create-new-repository.png)
|
||||
|
||||
Now, after clicking on add a new repository, we'll now be directed to the page where we'll need to enter the required information.
|
||||
|
||||
![adding repository information](http://blog.linoxide.com/wp-content/uploads/2015/03/adding-information-repository.png)
|
||||
|
||||
Now, after entering the required information about the new repository, we'll need to click on green Create repository button.
|
||||
|
||||
After it is done, we'll get to see something similar like this image.
|
||||
|
||||
![repository github](http://blog.linoxide.com/wp-content/uploads/2015/03/repository-github.png)
|
||||
|
||||
### 3. Uploading an existing Project ###
|
||||
|
||||
If we want to share our existing project on Github, we'll surely need to push the codes to the repository we created. To do so, we'll first need to install git in our Linux machine. As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it.
|
||||
|
||||
$ sudo apt-get install git
|
||||
|
||||
![installing git](http://blog.linoxide.com/wp-content/uploads/2015/03/install-git.png)
|
||||
|
||||
Now, as git is ready, we are now ready to upload the codes.
|
||||
|
||||
**Note**: To avoid errors, do not initialize the new repository with **README**, license, or gitignore files. You can add these files after your project has been pushed to GitHub.
|
||||
|
||||
In Terminal, we'll need to change the current working directory to your local project then initialize the local directory as a Git repository/
|
||||
|
||||
$ git init
|
||||
|
||||
We'll then add the files in our new local repository. This stages them for the first commit.
|
||||
|
||||
$ git add .
|
||||
|
||||
Now, we'll need to commit the files that we've staged in our local repository.
|
||||
|
||||
$ git commit -m 'First commit'
|
||||
|
||||
![git commit](http://blog.linoxide.com/wp-content/uploads/2015/03/git-commit.png)
|
||||
|
||||
In Terminal, we'll add the URL for the remote repository where our local repostory will be pushed.
|
||||
|
||||
$ git remote add origin remote Repository url
|
||||
$ git remote -v
|
||||
|
||||
![adding remote url](http://blog.linoxide.com/wp-content/uploads/2015/03/adding-remote-url.png)
|
||||
|
||||
Note: Please do replace remote Repository url to the url of the remote repo.
|
||||
|
||||
Now, to push the changes in our local repository to GitHub's repo we'll need to run as below and enter the required credential for the repository.
|
||||
|
||||
$ git push origin master
|
||||
|
||||
![pushing repo](http://blog.linoxide.com/wp-content/uploads/2015/03/pushing-repo.png)
|
||||
|
||||
### Cloning a Repo ###
|
||||
|
||||
If we want to download a code repository from github straight to our local drives with a single command then, we can simply use git clone command which will clone the current directory to the remote repository.
|
||||
|
||||
$ git clone https://github.com/aruntechgeek/linspeed.git
|
||||
|
||||
![cloning repo](http://blog.linoxide.com/wp-content/uploads/2015/03/cloning-repo.png)
|
||||
|
||||
Please change the above url to the repository you want to clone from.
|
||||
|
||||
### Updating a Change ###
|
||||
|
||||
If we made changes to our code and want to push them to our remote repository then after changing the changes, we should run the following commands inside that directory.
|
||||
|
||||
$ git add .
|
||||
$ git commit -m "Updating"
|
||||
$ git push
|
||||
|
||||
### Conclusion ###
|
||||
|
||||
Hurray! We have successfully hosted our Project Source Code in Github repository. Github is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Millions of awesome Open Source projects are hosted in github. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Github :-)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/usr-mgmt/host-open-source-code-repository-github/
|
||||
|
||||
作者:[Arun Pyasi][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://linoxide.com/author/arunp/
|
||||
[1]:http://github.com/
|
@ -0,0 +1,99 @@
|
||||
How to Interactively Create a Docker Container
|
||||
================================================================================
|
||||
Hi everyone, today we'll learn how we can interactively create a docker container using a docker image. Once we start a process in Docker from an Image, Docker fetches the image and its Parent Image, and repeats the process until it reaches the Base Image. Then the Union File System adds a read-write layer on top. That read-write layer, the information about its Parent Image and some other information like its unique id, networking configuration, and resource limits is called a **Container**. Containers has states as they can change from **running** to **exited** state. A container with state as **running** includes a tree of processes running on the CPU, isolated from the other processes running on the host where as **exited** is the state of the file system and its exit value is preserved. You can start, stop, and restart a container with it.
|
||||
|
||||
Docker Technology has brought a remarkable change in the field of IT enabling cloud service for sharing applications and automating workflows, enabling apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. In this article, we'll build CentOS Instance in which we'll host a website running under Apache Web Server.
|
||||
|
||||
Here is quick and easy tutorial on how we can create a container in an interactive method using an interactive shell.
|
||||
|
||||
### 1. Running a Docker Instance ###
|
||||
|
||||
Docker initially tries to fetch and run the required image locally and if its not found in local host the it pulls from the [Docker Public Registry Hub][1] . Here. we'll fetch and create a fedora instance in a Docker Container and attach a bash shell to the tty.
|
||||
|
||||
# docker run -i -t fedora bash
|
||||
|
||||
![Downloading Fedora Base Image](http://blog.linoxide.com/wp-content/uploads/2015/03/downloading-fedora-base-image.png)
|
||||
|
||||
### 2. Installing Apache Web Server ###
|
||||
|
||||
Now, after our Fedora base image with instance is ready, we'll now gonna install Apache Web Server interactively without creating a Dockerfile for it. To do so, we'll need to run the following commands in a terminal or shell.
|
||||
|
||||
# yum update
|
||||
|
||||
![Updating Fedora Base Image](http://blog.linoxide.com/wp-content/uploads/2015/03/updating-fedora-base-image.png)
|
||||
|
||||
# yum install httpd
|
||||
|
||||
![Installing httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-httpd2.png)
|
||||
|
||||
# exit
|
||||
|
||||
### 3. Saving the Image ###
|
||||
|
||||
Now, we'll gonna save the changes we made into the Fedora Instance. To do that, we'll first gonna need to know the Container ID of the Instance. To get that we'll need to run the following command.
|
||||
|
||||
# docker ps -a
|
||||
|
||||
![Docker Running Container](http://blog.linoxide.com/wp-content/uploads/2015/03/docker-running-container.png)
|
||||
|
||||
Then, we'll save the changes as a new image by running the below command.
|
||||
|
||||
# docker commit c16378f943fe fedora-httpd
|
||||
|
||||
![committing fedora httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/committing-fedora-httpd.png)
|
||||
|
||||
Here, the changes are saved using the Container ID and image name fedora-httpd. To make sure that the new image is running or not, we'll run the following command.
|
||||
|
||||
# docker images
|
||||
|
||||
![view docker images](http://blog.linoxide.com/wp-content/uploads/2015/03/view-docker-images.png)
|
||||
|
||||
### 4. Adding the Contents to the new image ###
|
||||
|
||||
As we have our new Fedora Apache image running successfully, now we'll want to add the web contents which includes our website to Apache Web Server so that our website will run successfully out of the box. To do so, we'll need to create a new Dockerfile which will handle the operation from copying web contents to allowing port 80. To do so, we'll need to create a file Dockerfile using our favorite text editor as shown below.
|
||||
|
||||
# nano Dockerfile
|
||||
|
||||
Now, we'll need to add the following lines into that file.
|
||||
|
||||
FROM fedora-httpd
|
||||
ADD mysite.tar /tmp/
|
||||
RUN mv /tmp/mysite/* /var/www/html
|
||||
EXPOSE 80
|
||||
ENTRYPOINT [ "/usr/sbin/httpd" ]
|
||||
CMD [ "-D", "FOREGROUND" ]
|
||||
|
||||
![configuring Dockerfile](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-Dockerfile.png)
|
||||
|
||||
Here, in above Dockerfile, the web content which we have in mysite.tar will get automatically extracted to /tmp/ folder. Then, the entire site will move to the Apache Web root ie /var/www/html/ and the expose 80 will open port 80 so that the website will be available normally. Then, the entrypoint is set to /usr/sbin/httpd so that the Apache Server will execute.
|
||||
|
||||
### 5. Building and running a Container ###
|
||||
|
||||
Now, we'll build our Container using the Dockerfile we just created in order to add our website on it. To do so, we'll need to run the following command.
|
||||
|
||||
# docker build -rm -t mysite .
|
||||
|
||||
![Building mysite Image](http://blog.linoxide.com/wp-content/uploads/2015/03/building-mysite-image.png)
|
||||
|
||||
After building our new container, we'll want to run the container using the command below.
|
||||
|
||||
# docker run -d -P mysite
|
||||
|
||||
![Running mysite Container](http://blog.linoxide.com/wp-content/uploads/2015/03/running-mysite-container.png)
|
||||
|
||||
### Conclusion ###
|
||||
|
||||
Finally, we've successfully built a Docker Container interactively. In this method, we build our containers and image directly via interactive shell commands. This method is quite easy and quick to build and deploy our images and containers. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/linux-how-to/interactively-create-docker-container/
|
||||
|
||||
作者:[Arun Pyasi][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://linoxide.com/author/arunp/
|
||||
[1]:https://registry.hub.docker.com/
|
@ -0,0 +1,60 @@
|
||||
Prips – Print IP address on a given range
|
||||
================================================================================
|
||||
prips is a tool that can be used to print all of the IP address on a given range. It can enhance the usability of tools that are made to work on only one host at a time.
|
||||
|
||||
### Install Prips on ubuntu ###
|
||||
|
||||
Open the terminal and run the following command
|
||||
|
||||
sudo apt-get install prips
|
||||
|
||||
### Using prips ###
|
||||
|
||||
### prips syntax ###
|
||||
|
||||
prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] start end
|
||||
prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] CIDR-block
|
||||
|
||||
### Available Options ###
|
||||
|
||||
The prips tool accepts the following command-line options:
|
||||
|
||||
- -c -- Print the range in CIDR notation.
|
||||
- -d delim -- Set the delimiter to the character with ASCII code delim where 0 <= delim <= 255.
|
||||
- -e -- Exclude ranges from the output.
|
||||
- -f format -- Set the format of addresses (hex, dec, or dot).
|
||||
- -i incr -- Set the increment to ‘x'.
|
||||
|
||||
### Prips Examples ###
|
||||
|
||||
Display all the addresses in a reserved subnet:
|
||||
|
||||
prips 192.168.32.0 192.168.32.255
|
||||
|
||||
The same, using CIDR notation:
|
||||
|
||||
prips 192.168.32/24
|
||||
|
||||
Display only the usable addresses in a class A reserved subnet using a space instead of a newline for a delimiter:
|
||||
|
||||
prips -d 32 10.0.0.1 10.255.255.255
|
||||
|
||||
Display every fourth address in a weird block:
|
||||
|
||||
prips -i 4 192.168.32.7 192.168.33.5
|
||||
|
||||
Determine the smallest CIDR block containing two addresses:
|
||||
|
||||
prips -c 192.168.32.5 192.168.32.11
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.ubuntugeek.com/prips-print-ip-address-on-a-given-range.html
|
||||
|
||||
作者:[ruchi][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.ubuntugeek.com/author/ubuntufix
|
Loading…
Reference in New Issue
Block a user