Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Linux System Getting Started Learning: install software packages on Ubuntu and Fedora     - C # how to generate a folder or file automatically rename (Programming)

- Linux screen commonly commands (Linux)

- Spring inject a type of object to enumerate (Programming)

- How nodeclub constructed Docker image (Server)

- Debian 7.8 system installation and configuration process (Linux)

- Linux Learning Notes: Users and Groups (Linux)

- Linux host dual LAN transceiver package ARP problem (Linux)

- OpenResty load balancing MySQL (Database)

- ImageMagick Tutorial: How to cut images in Linux command line (Linux)

- Zabbix monitors Nginx status (Server)

- Hadoop namenode do NFS disaster recovery (Server)

- Ubuntu 14.10 How to install office suite Calligra Suite 2.8.7 (Linux)

- Linux Shell introduces (Linux)

- VirtualBox install Windows 8.1 has encountered an error 0x000000C4 solutions (Linux)

- Ubuntu install Vendetta Online 14.04 (Linux)

- Linux operating system to solve a serious fault handling (Linux)

- Linux server alarms using Java (Server)

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

- Use Ansible to bulk manage remote servers (Server)

- MongoDB query timeout exception SocketTimeoutException (Database)

  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.


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.


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, 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.
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:
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 ( 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.


$ 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 >
-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 ( 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
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.
- Iptables in Ubuntu (Linux)
- CentOS6 installation configuration rsh (Server)
- Linux non-root user uses less than 1024 ports (Linux)
- MongoDB fragmentation (Cluster) (Database)
- MariaDB 10.1 and MySQL 5.7 in general performance on commodity hardware (Database)
- Node.JS different ways to install under Ubuntu 15.04 (Linux)
- 20 Advanced Java interview questions summary (Programming)
- Nginx Keepalived Nginx monitoring scripts (Server)
- How to compare PDF files on Ubuntu (Linux)
- MySQL high availability cluster fragmentation of deployment uses Fabric (Database)
- Linux System Getting Started Learning: hard disk partition, and to deal with traps (Linux)
- Depth understanding of JavaScript new mechanism (Programming)
- Linux server is how to do after the invasion (Linux)
- Expand an existing RAID arrays and remove the failed disk in a RAID (Linux)
- Slow update statement Performance Analysis (Database)
- Custom Android UI template Comments (Programming)
- Summary Linux operating system some tips to prevent attacks (Linux)
- MongoDB query statistics grouping remove duplicate records (Database)
- To install Docker under CentOS7 (Linux)
- CentOS / Linux install VNC Server (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.