Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux System Getting Started Learning: install software packages on Ubuntu and Fedora     - The first IOS Objective-C program (Programming)

- OpenvSwitch 2.1.2 shell script to start and stop (Linux)

- CentOS 6 rapid deployment of Java applications (Linux)

- Getting case of Python Hello World (Programming)

- Install Xshell on Mac OS X (Linux)

- UNIX and class UNIX system security check notes (Linux)

- How to install CentOS CentOS web page (Server)

- 2016, the new Node project Precautions (Programming)

- Quickly locate the mistakes by gdb location (Programming)

- OpenSSL to generate public and private key (Linux)

- osprofiler use OpenStack Cinder Lane (Server)

- Examples 14 grep command (Linux)

- Linux / Windows setup is complete port range (Linux)

- expdp reported ORA-39181 Export Processing Method (Database)

- Linux some lessons learned about network security (Linux)

- CentOS set up FTP server (Server)

- Linux environment SSH login password instead of using the RSA Certificate (Linux)

- I use the desktop environment in GNU / Linux combination tool (Linux)

- Talking about the implementation and the JVM garbage collection mechanism (Programming)

- Axel install plug under CentOS 5/6 acceleration yum downloads (Linux)

 
         
  Linux System Getting Started Learning: install software packages on Ubuntu and Fedora
     
  Add Date : 2017-01-08      
         
         
         
  New entrants into the Linux world friends, you may have downloaded a good Linux installation ISO, and installed your Linux, then the next, you may want to install some software on the use of Linux. You may start using the software center graphical interface to install, and sometimes also need to install using the command line, or even their own need to compile a binary out - it's amazing how one thing ah.

So today we talk about how to install software packages on Linux.

This article from the GUI Software Center package manager, online repository installation, the local installation source to install one by one to explain matters related to the installation package you need to pay attention.

This article Environment

Ubuntu 15.04 64-bit
Fedora 22 64-bit
Installation target

It is a wget to download files from the Internet simple free software, below we will use wget to download some files.
Related concepts

Source: We install the program can be obtained from local or remote storage warehouse, the warehouse is the source of our program, it can be referred to as source.
Package Manager: As the name suggests Package Manager is used to manage the package, we can easily be installed from the repository to use this tool, uninstaller. Different distributions have different package manager, Ubuntu use apt-get and use Fedora 22 dnf.
Source: Original code programs, has not been compiled, the program can also be generated by compiling the source code.
Software Center graphical interface

Ubuntu Software Center

When we are in the graphical user interface (GUI: Graphical User Interface) when, Ubuntu provides us with a graphical installation tool, called the Ubuntu Software Center, the center of this software, we can like Windows by clicking a few buttons, easy package installation. Below is Open Software Center after the left is some classification, the following are some of the recommended packages.

Ubunutu Software Center

Click to view the installation can be installed in the machine package, and can manage them in this, as shown in select Firefox and click Uninstall, then you will be prompted to enter a password, enter the complete and correct you will uninstall the selected program.

Installed

Then in the search box to search wget you can see something as shown, and simply click to install and correctly enter the password.

Installing a new program

Fedora Software Center

As shown in FIG point icon you can open the Fedora open software center.

Fedora Software Center

After opening the interface shown, in the bottom category

Software Center

Opening the mine clearance on the map, shown below, click to install, you can wait

Installing a new program

Turning now to have been installed, we can see just installed minesweeper, click Remove, you can be deleted.

Remove Programs

If you encounter the following figure, only you need to enter your password.

Authenticate

Use Package Manager to install

Ubuntu use apt-get install from the depot

Here is the last virtual machine installation environment, so nothing is very clean, we take a look at apt-get command

$ Apt-get - help
apt 1.0.9.7ubuntu4, for amd64 architecture, compiled on Apr7201514: 42: 59
Usage: apt-get [options] command
apt-get [option] install | remove the package 1 [2 packages ...]
apt-get [options] source package 1 [2 packages ...]
apt-get is used to download and install packages a simple command-line interface.
The most commonly used commands are update and install.
command:
update - Retrieve updated lists of packages
upgrade - an upgrade
install - Install new packages (Note: The package name is libc6 instead libc6.deb)
remove - uninstall packages
autoremove - automatically install and uninstall all unused packages
purge - Remove and purge packages
source - Download source archives
build-dep - Configure compilation dependencies required for the source package
dist-upgrade - Distribution upgrade, see apt-get (8)
dselect-upgrade - Follow dselect selections to upgrade
clean - Erase downloaded package files
autoclean - Delete old downloaded package file
check - check to verify the integrity of the system dependencies
changelog - download the specified package and display its changelog
download - Download the binary package to the current directory specified
After apt-get command to have a basic understanding, we then want to change the source, will be replaced by domestic sources, Ali cloud and Netease have mirror sites.

Ali cloud mirrored configuration, see here
Netease mirrored configuration Please refer to here
Generally we just /etc/apt/sources.list inside xxx.xxx.com replaced mirrors.aliyun.com or mirrors.163.com to the rest without changes.

After the change source, we first update source

$ Sudo apt-get update
Upgrade all packages

$ Sudo apt-get upgrade
Install Command

$ Sudo apt-get install packagename
Uninstall command

$ Sudo apt-get remove packagename
Next, install wget

$ Sudo apt-get install wget
After the successful installation the following prompt should appear

$ Sudo apt-get install wget
Reading package lists ... Done
Building dependency tree package
Reading state information ... Done
The following NEW packages will be installed:
wget
0 packages upgraded, 1 newly installed packages, 0 to remove the package, there are 196 packages not upgraded.
282 kB to download packages.
700 kB will consume additional space after decompression.
Get: 1 http://cn.archive.ubuntu.com/ubuntu/ vivid / main wget amd64 1.16.1-1ubuntu1 [282 kB]
Download 282 kB, Processed in 0 seconds (517 kB / s)
Are selected not selected package wget.
(Reading database ... system's current total installed 174,852 files and directories.)
Is preparing to unpack ... / wget_1.16.1-1ubuntu1_amd64.deb ...
Being unpacked wget (1.16.1-1ubuntu1) ...
Processing for install-info (5.2.0.dfsg.1-6) triggers ...
Processing for man-db (2.7.0.2-5) triggers ...
We are set wget (1.16.1-1ubuntu1) ...
linuxcn @ linuxcn-VirtualBox: ~ $
Next, you want to uninstall wget

$ Sudo apt-get remove wget

Fedora uses dnf install from repositories

Configure the source, the source into the country improve download speeds.

Backup

$ Cd / etc / repo
$ Sudo mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.backup
$ Sudo mv /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.backup
Download Netease source profile (Netease and Ali cloud to choose between a)

$ Sudo wget http://mirrors.163.com/.help/fedora-163.repo
$ Sudo wget http://mirrors.163.com/.help/fedora-updates-163.repo
Download Ali cloud Source profile (Netease and Ali cloud to choose between a)

$ Sudo wget -O /etc/yum.repos.d/fedora.repo http://mirrors.aliyun.com/repo/fedora.repo
$ Sudo wget -O /etc/yum.repos.d/fedora-updates.repo http://mirrors.aliyun.com/repo/fedora-updates.repo
Clear the old cache and generate a new cache

$ Sudo dnf clean
$ Sudo dnf makecache
Get help dnf

$ Dnf -h
Installation package

$ Sudo dnf install packagename
Uninstall package

$ Sudo dnf remove packagename
Install wget

$ Sudo dnf install wget
Uninstall wget

$ Sudo dnf remove wget
 
Local install binary packages

Ubuntu uses dpkg install local deb packages

Sometimes we downloaded from the Internet to filename.deb This binary package, and this package is generally only allows the system to install Debian system, so we can install the package by the dpkg command.

First look dpkg command

$ Dpkg --help
Usage: dpkg [< option > ...] < command >
command:
-i | --install < .deb filename > ... | -R | --recursive < directory > ...
--unpack < .deb filename > ... | -R | --recursive < directory > ...
-A | --record-Avail < .deb filename > ... | -R | --recursive < directory > ...
--configure < package name > ... | -a | --pending
--triggers-only < package name > ... | -a | --pending
-r | --remove < package name > ... | -a | --pending
-P | --purge < Package name > ... | -a | --pending
-V | --verify < Package name > ... integrity check of the package.
-?, - Help display this help information.
--version display version information.
Install Command

$ Sudo dpkg -i filename.deb
Uninstall command

$ Sudo dpkg -r packagename
Wget is still here, for example, first with apt-get download wget to download a deb package to the current directory, it downloaded for wget_1.16.1-1ubuntu1_amd64.deb

With dpkg install wget

$ Sudo dpkg -i ./wget_1.16.1-1ubuntu1_amd64.deb
Are selected not selected package wget.
(Reading database ... system's current total installed 174,852 files and directories.)
Is preparing to unpack ... / wget_1.16.1-1ubuntu1_amd64.deb ...
Being unpacked wget (1.16.1-1ubuntu1) ...
We are set wget (1.16.1-1ubuntu1) ...
Processing for install-info (5.2.0.dfsg.1-6) triggers ...
Processing for man-db (2.7.0.2-5) triggers ...
Note: The above parameters -i installation was followed by deb packages to install.

Tips: You can use the Tab key commands and filename completion.

Uninstall can use apt-get

$ Sudo apt-get remove packagename
 

Fedora uses rpm to install local rpm package

Similarly, we also may be downloaded to filename.rpm such binary packages, then we can use the rpm command to install.

Getting Help

$ Rpm --help
Here we will next wget rpm package as an example

$ Dnf download wget # obtain binary package named wget-1.16.3-1.fcxx.x86_64.rpm of
rpm install command

$ Sudo rpm -i filename.rpm # -i parameter for the installation
$ Sudo rpm -i ./wget-1.16.3-1.fcxx.x86_64.rpm
 

Compile and install from source

Sometimes we find that a package was not included in the depot, there is no binary packages are available, this time we can try to compile and install from source, I'm still here wget, for example, demonstrate how to compile and solve compile problems encountered

The following environment for Ubuntu 15.04

$ Mkdir buildwget # build directory
$ Cd buildwget
$ Wget http://ftp.gnu.org/gnu/wget/wget-1.16.tar.xz # Download Source Package
$ Sudo apt-get remove wget # for later tests, first uninstall wget
$ Xz -d wget-1.16.tar.xz # unzip files xz
$ Tar -xvf wget-1.16.tar # unpack the tar file
$ Cd wget-1.16
$ Ls # List files
ABOUT-NLS ChangeLog.README GNUmakefile maint.mk po util
aclocal.m4 configure INSTALL Makefile.am README
AUTHORS configure.ac lib Makefile.in src
build-aux COPYING m4 msdos testenv
ChangeLog doc MAILING-LIST NEWS tests
The above document is we are going to compile the source file, which has a particular attention is INSTALL, we have to develop a habit, look INSTALL file, which will tell us how to compile, compile-time what needs attention? However, because the compiler here is relatively simple, it does not mention any particular INSTALL important things.

We perform in accordance with INSTALL ./configure

$ ./configure
If the following error

configure: error: - with-ssl = gnutls was given, but GNUTLS isnot available.
Error message saying that, given SSL is gnutls but not available (because there is no installation), so we installed and specify openssl as wget of SSL.

$ Sudo apt-get install openssl
$ Sudo apt-get install libssl-dev
$ ./configure --with-Ssl = openssl
If not, it should appear as follows after the implementation

configure: Summary of build options:
Version: 1.16
Host OS: linux-gnu
Install prefix: / usr / local
Compiler: gcc
CFlags: -g -O2
LDFlags:
Libs: -lssl -lcrypto -ldl -lz
SSL: openssl
Zlib: yes
PSL: no
Digest: yes
NTLM: yes
OPIE: yes
Debugging: yes
Then compile

$ Make
Compiler will output a lot of information, do not worry, if there is no error and the last stop, the compilation is successful, the next installation

$ Sudo make install
Try wget command is not yet out? Source installation encountered problems, we should be good at searching, questions and solve the corresponding compiler error adjusted according to the content, the missing dependencies installed, generally succeed.

to sum up

This article explains some methods for novices Ubuntu and Fedora installation package, some of the more detailed Ubuntu, Fedora only limited space reasons include the corresponding installation and uninstall command, but you can get help by --help man, dnf -h or rpm not repeat them here. From the source compiler installed, it shows a process of encounter problems, to solve the problem, because the compiler wget is relatively simple, here also not particularly intractable problems encountered, but it clearly shows the process of a compiler installation, the case error, let us not be afraid, but to read the error message is given, whereby the search, ask questions and seek answers. Also experiencing problems under Linux must first be good to go their own search, ask questions, get answers and solve problems summarized, or is difficult to learn knowledge.
     
         
         
         
  More:      
 
- Execute command sentence can result in equipment permanently bricked in Linux laptop (Linux)
- Generic mechanism C11 standard (Programming)
- Linux Security trust with users (Linux)
- How to use Linux to download music from Grooveshark (Linux)
- ORA-00824: can not set sga_target due to existing problem-solving (Database)
- Java application server WildFly (Server)
- Ubuntu install driver manager Mint Driver Manager and Device Driver Manager (Linux)
- System-level alias vs Oracle ADR functionality (Database)
- Mind mapping software installed in CentOS 7 in XMind (Linux)
- To install OwnCloud 7.0.4 under Ubuntu (Linux)
- Using C ++ Container Templates in Shared Memory (Programming)
- Linux centos rm directory does not prompt (Linux)
- MySQL optimization tabs (Database)
- LNMP Note: Addressing mail function can not send mail (Server)
- AWR Report (Database)
- C language macro definition #define Usage (Programming)
- Use window.name + iframe cross-domain access to data Detailed (Programming)
- STL in the list of erase () method (Programming)
- Linux platform to prevent hackers to share practical skills (Linux)
- Regular expressions in Perl (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.