CentOS 7 /RHEL 7: How To Install And Configure FTP Server (vsftpd)

Normally you can download or upload files to FTP Server and you cthe defalut FTP package used is vsftpd,  it is a very secure file transfer protocol under CentOS 7 or RHEL 7 linux system.  How to install vsftpd package on centos 7 system? How do I install and configure FTP server or Vsftp service? in this article, you will see how to install, configure and setup FTP server on CentOS 7 or RHEL 7 linux system.

From wikipedia:

The File Transfer Protocol (FTP) is a standard network protocol used to transfer computer files from one host to another host over a TCP-based network, such as the Internet.

​Actually FTP is still not a very secure protocol and still has many security weaknesses., if it is possible, you can setup it with SSL/TLS connection or use SFTP (Secure FTP), it is a more secure protocol and use the Secure shell protocol to transfer files.

From Wikipedia:

The SSH file transfer protocol or secure FTP (SFTP), also transfers files and has a similar command set for users, but is built on different software technology. SFTP uses the Secure Shell protocol (SSH) to transfer files. Unlike FTP, it encrypts both commands and data, preventing passwords and sensitive information from being transmitted openly over the network. It cannot interoperate with FTP software.

CentOS 7 /RHEL 7 Install Vsftpd 

Issue the following yum command to install the vsftpd package to setup ftp server on centos 7 system, type:

yum install vsftpd

Outputs:

[root@osetc Desktop]# yum install vsftpd

Loaded plugins: fastestmirror, langpacks

base                                                     | 3.6 kB     00:00

extras                                                   | 3.4 kB     00:00

updates                                                  | 3.4 kB     00:00

updates/7/x86_64/primary_db                                | 4.8 MB   00:04

Loading mirror speeds from cached hostfile

* base: mirrors.btte.net

* extras: mirrors.btte.net

* updates: mirrors.nwsuaf.edu.cn

Resolving Dependencies

--> Running transaction check

---> Package vsftpd.x86_64 0:3.0.2-9.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

Package          Arch             Version                 Repository      Size

================================================================================

Installing:

vsftpd           x86_64           3.0.2-9.el7             base           165 k

Transaction Summary

================================================================================

Install  1 Package

Total download size: 165 k

Installed size: 343 k

Is this ok [y/d/N]: y

Downloading packages:

vsftpd-3.0.2-9.el7.x86_64.rpm                              | 165 kB   00:00

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing : vsftpd-3.0.2-9.el7.x86_64                                    1/1

Verifying  : vsftpd-3.0.2-9.el7.x86_64                                    1/1

Installed:

vsftpd.x86_64 0:3.0.2-9.el7

Complete!

Before edit the configuration file” vsftpd.conf“, you’d better backup it, type:

cp /etc/vsftpd/vsftpd.conf  /etc/vsftpd/vsftpd.conf.bak

CentOS 7 /RHEL 7 Configure Vsftpd FTP Server 

After installed vsftpd package, now we can start to edit vsftpd configuration file, using “vim” command to edit “/etc/vsftpd/vsftpd.conf” and find the following lines and make the changes as below :

anonymous_enable=NO     #==> line 12:  To disable anonymous access

local_enable=YES                #==>enable local user access

write_enable=YES                #==>enable write permission for ftp user

chroot_local_user=YES        #==> line 100, 101: uncomment ( enable chroot )

chroot_list_enable=YES

ascii_upload_enable=YES    #==>uncomment ( allow ascii mode )ascii_download_enable=YES

chroot_list_file=/etc/vsftpd/chroot_list  #==>uncomment ( specify chroot list )

listen=YES

listen_ipv6=NO

If you want to learn more information about “vsftpd.conf”, you can have a look manual page of “vsftpd.conf”, just type “man vsftpd.conf” command.

Then save above configuration file and restart the vsftpd service using the following command:

sudo systemctl restart vsftpd.service

outputs:

[root@osetc Desktop]# systemctl restart vsftpd.service

[root@osetc Desktop]# systemctl status vsftpd.service

vsftpd.service - Vsftpd ftp daemon

Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled)

Active: active (running) since Fri 2014-12-05 09:08:53 EST; 11s ago

Process: 14095 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)

Main PID: 14096 (vsftpd)

CGroup: /system.slice/vsftpd.service

└─14096 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf

Dec 05 09:08:53 itsprite systemd[1]: Starting Vsftpd ftp daemon...

Dec 05 09:08:53 itsprite systemd[1]: Started Vsftpd ftp daemon.

Set vsftpd service to start while system startup, type:

sudo systemctl enable vsftpd.service

CentOS 7 /RHEL 7 Add A FTP Users

As disallowing anonymous user to login the ftp server in above configuration so you’d better create a new ftp user, As root user is not allowed to login the ftp server by default. using the following command to create a user and set use password. create a ftp user named “ftpuser”, type:

useradd ftpuser
passwd ftpuser

Outputs:

[root@osetc Desktop]# useradd ftpuser

[root@osetc Desktop]# passwd ftpuser

Changing password for user ftpuser.

New password:

BAD PASSWORD: The password is a palindrome

Retype new password:

passwd: all authentication tokens updated successfully.

CentOS 7 /RHEL 7 Configure Firewall For vsftpd 

If you want to connect to the Vsftp FTP server remotely, you must allow the default FTP port 21 through firewall, type the following command:

firewall-cmd --permanent --add-port=21/tcp

or

firewall-cmd --permanent --zone=public --add-service=ftp

then reload the firewall service, type:

firewall-cmd --reload

CentOS 7 /RHEL 7 Install FTP Client

If you want to login the ftp server, you should install a ftp client , issue the following command:

yum install ftp

Outputs:

[root@osetc Desktop]# yum install ftp

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

* base: mirrors.btte.net

* extras: mirrors.btte.net

* updates: mirrors.nwsuaf.edu.cn

Resolving Dependencies

--> Running transaction check

---> Package ftp.x86_64 0:0.17-66.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

Package        Arch              Version                 Repository       Size

================================================================================

Installing:

ftp            x86_64            0.17-66.el7             base             61 k

Transaction Summary

================================================================================

Install  1 Package

Total download size: 61 k

Installed size: 96 k

Is this ok [y/d/N]: y

Downloading packages:

ftp-0.17-66.el7.x86_64.rpm                                 |  61 kB   00:00

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing : ftp-0.17-66.el7.x86_64                                       1/1

Verifying  : ftp-0.17-66.el7.x86_64                                       1/1

Installed:

ftp.x86_64 0:0.17-66.el7

Complete!

Or you can use other third part software, such as: filezilla.

CentOS 7 /RHEL 7 Test FTP Server

After installed and configured vsftpd ftp server, the next step is to verify that if the ftp server can work normally.  let’s have a test to login the ftp server using ftp user in command interface line, type:

ftp 127.0.0.1

Output:

[root@osetc Desktop]# ftp 127.0.0.1

Connected to 127.0.0.1 (127.0.0.1).

220 (vsFTPd 3.0.2)

Name (127.0.0.1:root): ftpuser

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp>

done……

CentOS /RHEL: How To Install MySQL 5.6 Using YUM command

How Do I install or upgrade to MySQL 6.5 version under linux operating system. How to install the latest version of MySQL 6.5 using Yum command?  This post will guide you how to install MySQL database 5.6 on CentOS 7/CentOS 6.5 and RHEL 7/RHEL 6.5.

MySQL is the world’s most popular open source database, enabling the cost-effective delivery of reliable, high-performance and scalable Web-based and embedded database applications, including all five of the top five websites*.

CentOS /RHEL Install MySQL Database 5.6

Step1# before installing MySQL database, you need to install MySQL Yum repository to resove pacakge dependency.issue the following command:

#For CentOS 6.5 or RHEL 6.5

yum localinstall http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

#For CentOS 7 or RHEL 7

yum localinstall http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

Outputs:

[root@osetc ~]# yum localinstall http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

Loaded plugins: fastestmirror, langpacks

mysql-community-release-el7-5.noarc | 6.0 kB     00:00     

Examining /var/tmp/yum-root-v8KvbT/mysql-community-release-el7-5.noarch.rpm: mysql-community-release-el7-5.noarch

Marking /var/tmp/yum-root-v8KvbT/mysql-community-release-el7-5.noarch.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package mysql-community-release.noarch 0:el7-5 will be installed

--> Finished Dependency Resolution

adobe-linux-x86_64                  |  951 B     00:00     

base/7/x86_64                       | 3.6 kB     00:00     

epel/x86_64/metalink                | 5.4 kB     00:00     

epel/x86_64                         | 4.4 kB     00:00     

epel/x86_64/updateinfo              | 206 kB     00:00     

epel/x86_64/primary_db              | 3.7 MB     00:03     

epel/x86_64/pkgtags                 | 1.3 MB     00:01     

extras/7/x86_64                     | 3.4 kB     00:00     

nux-dextop/x86_64                   | 2.9 kB     00:00     

updates/7/x86_64                    | 3.4 kB     00:00     

Dependencies Resolved

===========================================================

 Package

    Arch   Version

               Repository                             Size

===========================================================

Installing:

 mysql-community-release

    noarch el7-5

               /mysql-community-release-el7-5.noarch 4.3 k

Transaction Summary

===========================================================

Install  1 Package

Total size: 4.3 k

Installed size: 4.3 k

Is this ok [y/d/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : mysql-community-release-el7-5.noarch    1/1 

  Verifying  : mysql-community-release-el7-5.noarch    1/1 

Installed:

  mysql-community-release.noarch 0:el7-5                   

Complete!

step2# Install MySQL DataBase 5.6

To Install MySQL Database 5.6 on centos 7/6.5 or RHEL 7/6.5 linux, issue the following yum command:

yum install mysql-community-server

Outputs:

[root@osetc ~]# yum install mysql-community-server

Loaded plugins: fastestmirror, langpacks

mysql-connectors-community          | 2.5 kB     00:00     

mysql-tools-community               | 2.5 kB     00:00     

mysql56-community                   | 2.5 kB     00:03     

(1/3): mysql56-community/x86_64/prima |  59 kB   00:02     

(2/3): mysql-connectors-community/x86 | 7.0 kB   00:05     

(3/3): mysql-tools-community/x86_64/p |  11 kB   00:05     

Loading mirror speeds from cached hostfile

 * base: mirrors.btte.net

 * epel: ftp.sjtu.edu.cn

 * extras: mirrors.btte.net

 * nux-dextop: li.nux.ro

 * updates: mirrors.btte.net

Resolving Dependencies

--> Running transaction check

---> Package mariadb-server.x86_64 1:5.5.40-1.el7_0 will be obsoleted

---> Package mysql-community-server.x86_64 0:5.6.22-2.el7 will be obsoleting

--> Processing Dependency: mysql-community-common(x86-64) = 5.6.22-2.el7 for package: mysql-community-server-5.6.22-2.el7.x86_64

--> Processing Dependency: mysql-community-client(x86-64) = 5.6.22-2.el7 for package: mysql-community-server-5.6.22-2.el7.x86_64

--> Running transaction check

---> Package mariadb.x86_64 1:5.5.40-1.el7_0 will be obsoleted

---> Package mysql-community-client.x86_64 0:5.6.22-2.el7 will be obsoleting

--> Processing Dependency: mysql-community-libs(x86-64) = 5.6.22-2.el7 for package: mysql-community-client-5.6.22-2.el7.x86_64

---> Package mysql-community-common.x86_64 0:5.6.22-2.el7 will be installed

--> Running transaction check

---> Package mariadb-libs.x86_64 1:5.5.40-1.el7_0 will be obsoleted

---> Package mysql-community-libs.x86_64 0:5.6.22-2.el7 will be obsoleting

--> Finished Dependency Resolution

Dependencies Resolved

===========================================================

 Package       Arch   Version      Repository         Size

===========================================================

Installing:

 mysql-community-client

               x86_64 5.6.22-2.el7 mysql56-community  19 M

     replacing  mariadb.x86_64 1:5.5.40-1.el7_0

 mysql-community-libs

               x86_64 5.6.22-2.el7 mysql56-community 2.0 M

     replacing  mariadb-libs.x86_64 1:5.5.40-1.el7_0

 mysql-community-server

               x86_64 5.6.22-2.el7 mysql56-community  57 M

     replacing  mariadb-server.x86_64 1:5.5.40-1.el7_0

Installing for dependencies:

 mysql-community-common

               x86_64 5.6.22-2.el7 mysql56-community 256 k

Transaction Summary

===========================================================

Install  3 Packages (+1 Dependent package)

Total download size: 79 M

Is this ok [y/d/N]: y

Downloading packages:

warning: /var/cache/yum/x86_64/7/mysql56-community/packages/mysql-community-common-5.6.22-2.el7.x86_64.rpm: V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Public key for mysql-community-common-5.6.22-2.el7.x86_64.rpm is not installed

(1/4): mysql-community-common-5.6.22- | 256 kB   00:59     

(2/4): mysql-community-libs-5.6.22-2. | 2.0 MB   07:31

Step3# running the following command to start MySQL service

#For CentOS 7 or RHEL 7

systemctl start mysql.service

#For CentOS 6.5 or RHEL 6.5

service start mysqld

Step4# Enable MySQL service while system starts up by runnging the following command:

#For CentOS 7 or RHEL 7

systemctl enable mysql.service

#For CentOS 6.5 or RHEL 6.5

chkconfig mysqld on

Step5# start to run mysql secure installation To secure MySQL server, type the following command:

/usr/bin/mysql_secure_installation

Outputs:

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we\'ll need the current

password for the root user.  If you\'ve just installed MySQL, and

you haven\'t set the root password yet, the password will be blank,

so you should just press enter here.

Enter current password for root (enter for none):

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL

root user without the proper authorisation.

Set root password? [Y/n] Y

New password:=====>"enter new password"

Re-enter new password:=====>"enter new password again"

Password updated successfully!

Reloading privilege tables..

... Success!

By default, a MySQL installation has an anonymous user, allowing anyone

to log into MySQL without having to have a user account created for

them.  This is intended only for testing, and to make the installation

go a bit smoother.  You should remove them before moving into a

production environment.

Remove anonymous users? [Y/n] Y

... Success!

Normally, root should only be allowed to connect from 'localhost'.  This

ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y

... Success!

By default, MySQL comes with a database named 'test' that anyone can

access.  This is also intended only for testing, and should be removed

before moving into a production environment.

Remove test database and access to it? [Y/n] Y

- Dropping test database...

... Success!

- Removing privileges on test database...

... Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n] Y

... Success!
Cleaning up...

All done!  If you\'ve completed all of the above steps, your MySQL

installation should now be secure.

Thanks for using MySQL!

Step6# Log on MySQL server with root password created in above secure installation, type:

mysql -u root -p

Outputs:

[root@osetc Desktop]# mysql -u root -p

Enter password: 

Welcome to the MySQL  Commands end with ; or \g.

Your MySQL connection id is 13

Server version: 5.5.40-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]>

Welcome to the MySQLmonitor.  Commands end with ; or \g.

Your MySQL connection idis 2

Server version:5.6.22-log MySQL Community Server (GPL)




Copyright (c) 2000, 2014,Oracle and/or its affiliates. All rights reserved.

Oracle is a registeredtrademark of Oracle Corporation and/or its affiliates. Other names may betrademarks of their respective owners.

Type 'help;' or '\h' forhelp. Type '\c' to clear the current input statement.

mysql>

done….

CentOS /RHEL: How To Install Adobe Reader 9.5.5 using Yum command

After installed CentOS 7 or RHEL 7 system, I would like to install Adobe Reader to read file with “pdf” format on my linux system. How Do I install the latest Adobe Reader version under Centos 7/Centos 6.5 or RHEL 7/6.5 or Fedora 21 linux? this post will guide you how to install adobe rader.

CentOS /RHEL download the latest version of Adobe Reader

To download the latest version of adobe reader from the official site, issue the following wget command:

​wget http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.rpm

or

wget http://download.softpedia.ro/dl/1ed3e76ea31ab48310a56007590085e3/54918324/500001963/linux/AdbeRdr9.5.5-1_i486linux_enu.bin

outputs:

[root@osetc~]# wget http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.rpm

----  http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.rpm

Resolving ardownload.adobe.com (ardownload.adobe.com)... 184.25.56.50, 184.25.56.60

Connecting to ardownload.adobe.com (ardownload.adobe.com)|184.25.56.50|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 60118961 (57M)

Saving to: ‘AdbeRdr9.5.5-1_i486linux_enu.rpm’

100%[======================================>] 60,118,961  17.2KB/s   in 23m 10s

 08:30:42 (42.2 KB/s) - ‘AdbeRdr9.5.5-1_i486linux_enu.rpm’ saved [60118961/60118961]

CentOS /RHEL install Adobe Reader 9.5.5 using Yum command

Step1# Install nux-dextop repository so that yum can use its to resolve dependencies

After got the rpm package of adobe reader 9.5.5, if you just use rpm -ivh to install it, you will find that other dependency packages are need to install. we can install the nux-dextop repository to resolve dependencies, run the following command:

yum localinstall http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

Outputs:

[root@osetc~]# yum localinstall http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

Loaded plugins: fastestmirror, langpacks

nux-dextop-release-0-5.el7.nux.noarch.rpm                | 9.7 kB     00:00     

Examining /var/tmp/yum-root-v8KvbT/nux-dextop-release-0-5.el7.nux.noarch.rpm: nux-dextop-release-0-5.el7.nux.noarch

Marking /var/tmp/yum-root-v8KvbT/nux-dextop-release-0-5.el7.nux.noarch.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package nux-dextop-release.noarch 0:0-5.el7.nux will be installed

--> Processing Dependency: epel-release for package: nux-dextop-release-0-5.el7.nux.noarch

Loading mirror speeds from cached hostfile

 * base: mirror.bit.edu.cn

 * extras: mirror.bit.edu.cn

 * updates: mirror.bit.edu.cn

--> Running transaction check

---> Package epel-release.noarch 0:7-5 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

 Package        Arch   Version     Repository                              Size

================================================================================

Installing:

 nux-dextop-release

                noarch 0-5.el7.nux /nux-dextop-release-0-5.el7.nux.noarch 3.5 k

Installing for dependencies:

 epel-release   noarch 7-5         extras                                  14 k

Transaction Summary

================================================================================

Install  1 Package (+1 Dependent package)

Total size: 18 k

Total download size: 14 k

Installed size: 28 k

Is this ok [y/d/N]: y

Downloading packages:

epel-release-7-5.noarch.rpm                                |  14 kB   00:01     

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : epel-release-7-5.noarch                                      1/2 

  Installing : nux-dextop-release-0-5.el7.nux.noarch                        2/2 

  Verifying  : epel-release-7-5.noarch                                      1/2 

  Verifying  : nux-dextop-release-0-5.el7.nux.noarch                        2/2 

Installed:

  nux-dextop-release.noarch 0:0-5.el7.nux                                       

Dependency Installed:

  epel-release.noarch 0:7-5                                                     

Complete!

Step2# Using “yum localinstall” to install adobe reader rpm package by running the following command:

  yum localinstall AdbeRdr9.5.5-1_i486linux_enu.rpm

outputs:

[root@osetc~]# yum localinstall AdbeRdr9.5.5-1_i486linux_enu.rpm 

Loaded plugins: fastestmirror, langpacks

Examining AdbeRdr9.5.5-1_i486linux_enu.rpm: AdobeReader_enu-9.5.5-1.i486

Marking AdbeRdr9.5.5-1_i486linux_enu.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package AdobeReader_enu.i486 0:9.5.5-1 will be installed

--> Processing Dependency: libatk-1.0.so.0 for package: AdobeReader_enu-9.5.5-1.i486

epel/x86_64/metalink                                     | 5.0 kB     00:00     

epel                                                     | 4.4 kB     00:00     

nux-dextop                                               | 2.9 kB     00:00     

epel/x86_64/primary_db         FAILED                                           

http://ftp6.sjtu.edu.cn/fedora/epel/7/x86_64/repodata/b8e832bf3567e4d16a0c44196c7c986fe818e2b8d8ae570eb3dd5251b4cdf131-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed to connect to 2001:da8:8000:6023::230: Network is unreachable"

Trying other mirror.

(1/3): epel/x86_64/group_gz                                | 250 kB   00:00     

(2/3): nux-dextop/x86_64/p 17% [==-             ]  75 kB/s | 890 kB   00:56 ETA

...

Dependencies Resolved

================================================================================

 Package           Arch   Version                Repository                Size

================================================================================

Installing:

 AdobeReader_enu   i486   9.5.5-1                /AdbeRdr9.5.5-1_i486linux_enu

                                                                          135 M

Installing for dependencies:

 atk               i686   2.8.0-4.el7            base                     232 k

 avahi-libs        i686   0.6.31-13.el7          base                      60 k

...

Transaction Summary

================================================================================

Install  1 Package  (+43 Dependent packages)

Upgrade             (  7 Dependent packages)

Total size: 151 M

Total download size: 13 M

Is this ok [y/d/N]: y

...

43/44): cups-libs-1.6.3-14.el7.i686.rpm                   | 354 kB   00:22     

(44/44): freetype-2.4.11-9.el7.i686.rpm                    | 386 kB   00:38     

--------------------------------------------------------------------------------

Total                                              327 kB/s |  13 MB  00:39     

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-nux.ro

Importing GPG key 0x85C6CD8A:

 Userid     : "Nux.Ro (rpm builder) <rpm@li.nux.ro>"

 Fingerprint: 561c 96bd 2f7f dc2a db5a fd46 e98b fbe7 85c6 cd8a

 Package    : nux-dextop-release-0-5.el7.nux.noarch (@/nux-dextop-release-0-5.el7.nux.noarch)

 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-nux.ro

Is this ok [y/N]: y

Installed:

  AdobeReader_enu.i486 0:9.5.5-1                                                

Complete!

Step3# check if adobe reader is installed on your system

To check if adobe reader program is installed, just issue the following command to start adobe reader program.

$acroread

or you can directly go to “Applications“->”office“, if you can see the adobe read 9 item, then just click it to start adobe reader.

Note: when starting adobe reader program, you need to accept the license firstly.

 

 

CentOS /RHEL : How To Install Apache OpenOffice 4.1.1

I would like to install the latest version of Apache OpenOffice 4.1.1 in my centos system or rhel system, How do I install Apache OpenOffice 4.1.1 on Centos 7/6.5 or RHEL 7/6.5 or Fedora ?this post will guide you how to install apache openoffice program.

​Apache OpenOffice 4.1.1 is a micro release intended to fix critical issues.  All users of Apache OpenOffice 4.1.0 or earlier are advised to upgrade. You can download Apache OpenOffice 4.1.1 here.

Centos 7 download Apache OpenOffice 4.1.1 package using wget

To download apache openoffice 4.1.1 package,issue the following command:

wget http://sourceforge.net/projects/openofficeorg.mirror/files/4.1.1/binaries/en-US/Apache_OpenOffice_4.1.1_Linux_x86-64_install-rpm_en-US.tar.gz

Outputs:

[root@osetc ~]# wget wget http://sourceforge.net/projects/openofficeorg.mirror/files/4.1.1/binaries/en-US/Apache_OpenOffice_4.1.1_Linux_x86-64_install-rpm_en-US.tar.gz/download -O Apache_OpenOffice_4.1.1_Linux_x86-64_install-rpm_en-US.tar.gz

---  http://wget/

Resolving wget (wget)... 61.50.248.117

Connecting to wget (wget)|61.50.248.117|:80... failed: Connection refused.

----  http://sourceforge.net/projects/openofficeorg.mirror/files/4.1.1/binaries/en-US/Apache_OpenOffice_4.1.1_Linux_x86-64_install-rpm_en-US.tar.gz/download

Resolving sourceforge.net (sourceforge.net)... 216.34.181.60

Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:80... connected.

HTTP request sent, awaiting response... 302 Found

Location: http://downloads.sourceforge.net/project/openofficeorg.mirror/4.1.1/binaries/en-US/Apache_OpenOffice_4.1.1_Linux_x86-64_install-rpm_en-US.tar.gz?r=&ts=1418738690&use_mirror=jaist [following]

...

CentOS 7 Install Apache OpenOffice 4.1.1

Step1# Before installing apacke openoffice 4.1.1, you need to remove the old openoffice or libreoffice package, issue the following command:

yum remove openoffice* libreoffice*

outputs:

[root@osetc ~]# yum remove openoffice* libreoffice*

Loaded plugins: fastestmirror, langpacks

No Match for argument: openoffice*

Resolving Dependencies

--> Running transaction check

---> Package libreoffice-calc.x86_64 1:4.1.4.2-3.el7 will be erased

--> Processing Dependency: libreoffice-calc for package: unoconv-0.6-7.el7.noarch

---> Package libreoffice-core.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-draw.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-emailmerge.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-graphicfilter.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-impress.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-langpack-en.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-math.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-opensymbol-fonts.noarch 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-pdfimport.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-pyuno.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-ure.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-writer.x86_64 1:4.1.4.2-3.el7 will be erased

--> Running transaction check

---> Package unoconv.noarch 0:0.6-7.el7 will be erased

--> Finished Dependency Resolution

base/7/x86_64                                                                                                        | 3.6 kB  00:00:00

extras/7/x86_64                                                                                                      | 3.4 kB  00:00:00

updates/7/x86_64                                                                                                     | 3.4 kB  00:00:00

updates/7/x86_64/primary_db                                                                                          | 5.4 MB  00:00:02

--> Running transaction check

---> Package libreoffice-langpack-en.x86_64 1:4.1.4.2-3.el7 will be erased

---> Package libreoffice-langpack-en.x86_64 1:4.1.4.2-3.el7 will be erased

--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================

Package                                       Arch                    Version                             Repository                  Size

============================================================================================================================================

Removing:

libreoffice-calc                              x86_64                  1:4.1.4.2-3.el7                     @anaconda                   25 M

libreoffice-core                              x86_64                  1:4.1.4.2-3.el7                     @anaconda                  232 M

libreoffice-draw                              x86_64                  1:4.1.4.2-3.el7                     @anaconda                  2.2 M

libreoffice-emailmerge                        x86_64                  1:4.1.4.2-3.el7                     @anaconda                   57 k

libreoffice-graphicfilter                     x86_64                  1:4.1.4.2-3.el7                     @anaconda                  1.3 M

libreoffice-impress                           x86_64                  1:4.1.4.2-3.el7                     @anaconda                  4.3 M

libreoffice-langpack-en                       x86_64                  1:4.1.4.2-3.el7                     @anaconda                  0.0

libreoffice-math                              x86_64                  1:4.1.4.2-3.el7                     @anaconda                  3.4 M

libreoffice-opensymbol-fonts                  noarch                  1:4.1.4.2-3.el7                     @anaconda                  556 k

libreoffice-pdfimport                         x86_64                  1:4.1.4.2-3.el7                     @anaconda                  632 k

libreoffice-pyuno                             x86_64                  1:4.1.4.2-3.el7                     @anaconda                  2.3 M

libreoffice-ure                               x86_64                  1:4.1.4.2-3.el7                     @anaconda                  7.6 M

libreoffice-writer                            x86_64                  1:4.1.4.2-3.el7                     @anaconda                   16 M

Removing for dependencies:

unoconv                                       noarch                  0.6-7.el7                           @anaconda                  196 k

Transaction Summary

============================================================================================================================================

Remove  13 Packages (+1 Dependent package)

Installed size: 295 M

Is this ok [y/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Erasing    : unoconv-0.6-7.el7.noarch                                                                                                1/14

Erasing    : 1:libreoffice-pdfimport-4.1.4.2-3.el7.x86_64                                                                            2/14

Erasing    : 1:libreoffice-draw-4.1.4.2-3.el7.x86_64                                                                                 3/14

Erasing    : 1:libreoffice-emailmerge-4.1.4.2-3.el7.x86_64                                                                           4/14

Erasing    : 1:libreoffice-langpack-en-4.1.4.2-3.el7.x86_64                                                                          5/14

Erasing    : 1:libreoffice-graphicfilter-4.1.4.2-3.el7.x86_64                                                                        6/14

Erasing    : 1:libreoffice-calc-4.1.4.2-3.el7.x86_64                                                                                 7/14

Erasing    : 1:libreoffice-impress-4.1.4.2-3.el7.x86_64                                                                              8/14

Erasing    : 1:libreoffice-math-4.1.4.2-3.el7.x86_64                                                                                 9/14

Erasing    : 1:libreoffice-pyuno-4.1.4.2-3.el7.x86_64                                                                               10/14

Erasing    : 1:libreoffice-writer-4.1.4.2-3.el7.x86_64                                                                              11/14

Erasing    : 1:libreoffice-core-4.1.4.2-3.el7.x86_64                                                                                12/14

Erasing    : 1:libreoffice-opensymbol-fonts-4.1.4.2-3.el7.noarch                                                                    13/14

Erasing    : 1:libreoffice-ure-4.1.4.2-3.el7.x86_64                                                                                 14/14

Verifying  : 1:libreoffice-langpack-en-4.1.4.2-3.el7.x86_64                                                                          1/14

Verifying  : 1:libreoffice-calc-4.1.4.2-3.el7.x86_64                                                                                 2/14

Verifying  : 1:libreoffice-opensymbol-fonts-4.1.4.2-3.el7.noarch                                                                     3/14

Verifying  : 1:libreoffice-emailmerge-4.1.4.2-3.el7.x86_64                                                                           4/14

Verifying  : 1:libreoffice-pyuno-4.1.4.2-3.el7.x86_64                                                                                5/14

Verifying  : 1:libreoffice-ure-4.1.4.2-3.el7.x86_64                                                                                  6/14

Verifying  : 1:libreoffice-math-4.1.4.2-3.el7.x86_64                                                                                 7/14

Verifying  : unoconv-0.6-7.el7.noarch                                                                                                8/14

Verifying  : 1:libreoffice-pdfimport-4.1.4.2-3.el7.x86_64                                                                            9/14

Verifying  : 1:libreoffice-draw-4.1.4.2-3.el7.x86_64                                                                                10/14

Verifying  : 1:libreoffice-graphicfilter-4.1.4.2-3.el7.x86_64                                                                       11/14

Verifying  : 1:libreoffice-writer-4.1.4.2-3.el7.x86_64                                                                              12/14

Verifying  : 1:libreoffice-impress-4.1.4.2-3.el7.x86_64                                                                             13/14

Verifying  : 1:libreoffice-core-4.1.4.2-3.el7.x86_64                                                                                14/14

Removed:

libreoffice-calc.x86_64 1:4.1.4.2-3.el7                                 libreoffice-core.x86_64 1:4.1.4.2-3.el7

libreoffice-draw.x86_64 1:4.1.4.2-3.el7                                 libreoffice-emailmerge.x86_64 1:4.1.4.2-3.el7

libreoffice-graphicfilter.x86_64 1:4.1.4.2-3.el7                        libreoffice-impress.x86_64 1:4.1.4.2-3.el7

libreoffice-langpack-en.x86_64 1:4.1.4.2-3.el7                          libreoffice-math.x86_64 1:4.1.4.2-3.el7

libreoffice-opensymbol-fonts.noarch 1:4.1.4.2-3.el7                     libreoffice-pdfimport.x86_64 1:4.1.4.2-3.el7

libreoffice-pyuno.x86_64 1:4.1.4.2-3.el7                                libreoffice-ure.x86_64 1:4.1.4.2-3.el7

libreoffice-writer.x86_64 1:4.1.4.2-3.el7

Dependency Removed:

unoconv.noarch 0:0.6-7.el7

Complete!

Step2# Extrace downloaded pakcage of ApacheOffice 4.1.1

Using the following command to extrace the package so that we can use rpm command to install it.

[root@osetc  ~]# tar -xvf Apache_OpenOffice_4.1.1_Linux_x86-64_install-rpm_en-US.tar.gz

outputs:

[root@osetc ~]# tar -xvf Apache_OpenOffice_4.1.1_Linux_x86-64_install-rpm_en-US.tar.gz

en-US/

en-US/readmes/

en-US/readmes/README_en-US.html

en-US/readmes/README_en-US

en-US/RPMS/

en-US/RPMS/openoffice-xsltfilter-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-core04-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-onlineupdate-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-draw-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-brand-impress-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-en-US-math-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-ure-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-impress-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-brand-calc-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-brand-math-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-en-US-calc-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-writer-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-gnome-integration-4.1.1-9775.x86_64.rpm

en-US/RPMS/desktop-integration/

en-US/RPMS/desktop-integration/openoffice4.1.1-suse-menus-4.1.1-9775.noarch.rpm

en-US/RPMS/desktop-integration/openoffice4.1.1-redhat-menus-4.1.1-9775.noarch.rpm

en-US/RPMS/desktop-integration/openoffice4.1.1-mandriva-menus-4.1.1-9775.noarch.rpm

en-US/RPMS/desktop-integration/openoffice4.1.1-freedesktop-menus-4.1.1-9775.noarch.rpm

en-US/RPMS/openoffice-core02-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-calc-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-brand-base-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-core03-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-brand-draw-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-core01-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-brand-writer-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-graphicfilter-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-pyuno-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-ooofonts-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-core06-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-en-US-help-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-en-US-impress-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-javafilter-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-ogltrans-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-core05-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-en-US-res-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-en-US-base-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-en-US-writer-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-en-US-draw-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-brand-en-US-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-ooolinguistic-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-core07-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-en-US-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-base-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-images-4.1.1-9775.x86_64.rpm

en-US/RPMS/openoffice-math-4.1.1-9775.x86_64.rpm

en-US/licenses/

en-US/licenses/LICENSE

en-US/licenses/NOTICE

Step3# using rpm command with “Uvh” option to install Apache OpenOffice 4.1.1 RPM Packages, type:

cd en-US/RPMS

rpm -Uvh RPMS/*.rpm

outputs:

[root@osetc RPMS]# rpm -Uvh *.rpm

Preparing...                          ################################# [100%]

Updating / installing...

1:openoffice-ure-4.1.1-9775        ################################# [  2%]

2:openoffice-core01-4.1.1-9775     ################################# [  5%]

3:openoffice-en-US-4.1.1-9775      ################################# [  7%]

4:openoffice-impress-4.1.1-9775    ################################# [ 10%]

....

cd

40:openoffice-pyuno-4.1.1-9775      ################################# [ 98%]

41:openoffice-xsltfilter-4.1.1-9775 ################################# [100%]

Change directory to “desktop-integration” in the current directory, then install all rpm packages in this directory:

cd desktop-integration

rpm -Uvh openoffice4.1.1-redhat-menus-4.1.1-9775.noarch.rpm

outputs:

[root@osetc desktop-integration]# rpm -Uvh openoffice4.1.1-redhat-menus-4.1.1-9775.noarch.rpm

Preparing...                          ################################# [100%]

Updating / installing...

1:openoffice4.1.1-redhat-menus-4.1.################################# [100%]

/bin/gtk-update-icon-cache

gtk-update-icon-cache: Cache file created successfully.

/bin/gtk-update-icon-cache

gtk-update-icon-cache: Cache file created successfully.

Step4# issue the “openoffice4” command to startup Apache openoffice 4.1.1. or click “Applications“->”Office” in Menu tab.

CentOS /RHEL: How To Install Adobe Flash Player 11.2

​This post will guide you how to install the latest version of adobe flash player 11.2 on your centos 7/centos 6.5 or rhel 7/rhel 6.5. How to install the adobe flash player under linux operating system? I will show you how to install the adobe flash player with below two ways.

#1: install adobe flash player 11.2 via GUI(using firefox browser)

#2: install adobe flash player 11.2 using yum command

CentOS /RHEL Install Adobe Flash Player Via Firefox Browser

Step1# open firefox browser, directly go the official download page of adobe flash player, the adobe site will detect your system automatically, you just need to choose the correct rpm package, select “YUM for Linux(YUM)“.

Step2# click “download now” to download adobe yum repository.

Step3#  system will prompt you that if you want to install that file. click “install“, the installation of adobe flash player will start and it will also resolve dependencies.

step4# click “next” to go to next page. so for, the adobe flash player is installed on your system.

CentOS /RHEL Install Adobe Flash Player 11.2 Using Yum Command

Step1# downloading the adobe yum repository RPM package to resolve package dependencies while installing adobe flash player package. issue the following command:

# For x86-64 system

wget http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm

# For X86

wget http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm

outputs:

[root@osetc~]# wget http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm .

--  http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm

Resolving linuxdownload.adobe.com (linuxdownload.adobe.com)... 193.104.215.69

Connecting to linuxdownload.adobe.com (linuxdownload.adobe.com)|193.104.215.69|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 4256 (4.2K) [application/x-rpm]

Saving to: ‘adobe-release-x86_64-1.0-1.noarch.rpm’

100%[======================================>] 4,256       9.21KB/s   in 0.5s

 (9.21 KB/s) - ‘adobe-release-x86_64-1.0-1.noarch.rpm’ saved [4256/4256]

-Resolving . (.)... failed: Name or service not known.

wget: unable to resolve host address ‘.’

FINISHED --

Total wall clock time: 2.3s

Downloaded: 1 files, 4.2K in 0.5s (9.21 KB/s)

Step2# Install adobe yum repository package by running the following command:

rpm -ivh adobe-release-x86_64-1.0-1.noarch.rpm

outputs:

[root@osetc ~]# rpm -ivh adobe-release-x86_64-1.0-1.noarch.rpm

warning: adobe-release-x86_64-1.0-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID f6777c67: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

1:adobe-release-x86_64-1.0-1       ################################# [100%]

 

Step3#: Start to install Adobe Flash Player 11.2 and dependency packages using yum command,type:

yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl

outputs:

[root@osetc~]# yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl

Loaded plugins: fastestmirror, langpacks

adobe-linux-x86_64                                       |  951 B     00:00

adobe-linux-x86_64/primary                                 | 1.2 kB   00:01

Loading mirror speeds from cached hostfile

* base: mirror.bit.edu.cn

* epel: ftp6.sjtu.edu.cn

* extras: mirror.bit.edu.cn

* nux-dextop: li.nux.ro

* updates: mirror.bit.edu.cn

adobe-linux-x86_64                                                          2/2

No package nspluginwrapper available.

Package alsa-plugins-pulseaudio-1.0.27-3.el7.x86_64 already installed and latest version

Package libcurl-7.29.0-19.el7.x86_64 already installed and latest version

Resolving Dependencies

--> Running transaction check

---> Package flash-plugin.x86_64 0:11.2.202.425-release will be installed

--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

Package         Arch      Version                  Repository             Size

================================================================================

Installing:

flash-plugin    x86_64    11.2.202.425-release     adobe-linux-x86_64    6.9 M

Transaction Summary

================================================================================

Install  1 Package

Total download size: 6.9 M

Installed size: 19 M

Is this ok [y/d/N]: y

Downloading packages:

warning: /var/cache/yum/x86_64/7/adobe-linux-x86_64/packages/flash-plugin-11.2.202.425-release.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID f6777c67: NOKEY

Public key for flash-plugin-11.2.202.425-release.x86_64.rpm is not installed

flash-plugin-11.2.202.425-release.x86_64.rpm               | 6.9 MB   05:28

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

Importing GPG key 0xF6777C67:

Userid     : "Adobe Systems Incorporated (Linux RPM Signing Key) <secure@adobe.com>"

Fingerprint: 78a8 75e9 7f09 06bd 6355 73fa 3a69 bd24 f677 7c67

Package    : adobe-release-x86_64-1.0-1.noarch (@/adobe-release-x86_64-1.0-1.noarch)

From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

Is this ok [y/N]: y

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing : flash-plugin-11.2.202.425-release.x86_64                     1/1

Verifying  : flash-plugin-11.2.202.425-release.x86_64                     1/1

Installed:

flash-plugin.x86_64 0:11.2.202.425-release

Complete!

Step4# Checking if Adobe Flash Player 11.2 is installed, issue the following command:

[root@osetc ~]# rpm -qa | grep flash

flash-plugin-11.2.202.425-release.x86_64

done…..

CentOS 7 /RHEL 7: How To Restart/Stop/Start Network Service

I want to restart the network service on my centos 7 system, How to restart/start/stop network service using systemctl command under centos 7 operating system? If the system V init script still can be used to restart/start/stop network service in centos 7 or rhel7? this post will guide you how to restart/stop/start network service using “systemctl” command in centos 7.

CentOS 7 restart network service

In centos 7 or RHEL7, the network service name is changed to “network.service“, issue the following systemctl command to restart network service on your current system:

systemctl restart network.service

or

systemctl restart network

To check the status of network service, run the following command:

systemctl status network.service

Outputs:

[root@devops /]# systemctl status network.service

network.service - LSB: Bring up/down networking

Loaded: loaded (/etc/rc.d/init.d/network)

Active: active (exited) since Tue 2014-12-16 08:02:27 CET; 17s ago

Process: 9491 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)

Process: 9649 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)

Dec 16 08:02:26 devops systemd[1]: Starting LSB: Bring up/down networking...

Dec 16 08:02:27 devops network[9649]: Loopback-Schnittstelle hochfahren:  D...en

Dec 16 08:02:27 devops network[9649]: Datei »/etc/sysconfig/network-script...en

Dec 16 08:02:27 devops network[9649]: Datei »/etc/sysconfig/network-script...en

Dec 16 08:02:27 devops network[9649]: Datei »/etc/sysconfig/network-script...en

Dec 16 08:02:27 devops network[9649]: [  OK  ]

Dec 16 08:02:27 devops systemd[1]: Started LSB: Bring up/down networking.

Hint: Some lines were ellipsized, use -l to show in full.

Try to use “service” command to restart network service, type:

service network restart

outputs:

[root@devops Desktop]# service network restart

Restarting network (via systemctl):                        [  OK  ]

From the above output, you will see that service command will redirect to “systemctl“. so I advised that you’d better to use “systemctl” command to restart system service.

CentOS 7 start network service

To start network service on centos 7 system, issue the following command:

systemctl start network.service

or

systemctl start network

CentOS 7 stop Network service

To stop network service on your system, issue the following command:

systemctl stop network.service

or

systemctl stop network

Issue the following command to check the network status, type:

systemctl status network

Outputs:

[root@devops /]# systemctl status network

network.service - LSB: Bring up/down networking

Loaded: loaded (/etc/rc.d/init.d/network)

Active: inactive (dead) since Tue 2014-12-16 08:09:43 CET; 12s ago

Process: 13236 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)

Process: 9649 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)

Dec 16 08:02:27 devops network[9649]: [  OK  ]

Dec 16 08:02:27 devops systemd[1]: Started LSB: Bring up/down networking.

Dec 16 08:09:42 devops systemd[1]: Stopping LSB: Bring up/down networking...

Dec 16 08:09:42 devops network[13236]: Schnittstelle enp0s3 beenden:  [  OK  ]

Dec 16 08:09:42 devops network[13236]: Loopback-Schnittstelle beenden:  Dat...en

Dec 16 08:09:42 devops network[13236]: Datei »/etc/sysconfig/network-scrip...en

Dec 16 08:09:42 devops network[13236]: Datei »/etc/sysconfig/network-scrip...en

Dec 16 08:09:43 devops network[13236]: Datei »/etc/sysconfig/network-scrip...en

Dec 16 08:09:43 devops network[13236]: [  OK  ]

Dec 16 08:09:43 devops systemd[1]: Stopped LSB: Bring up/down networking.

Hint: Some lines were ellipsized, use -l to show in full.

Searching the Active line to check the status if it is “inactive(dead)”.

CentOS 7 reload network service

If you just want to reload your netowrk configuration file, just need to reload the network service, issue the following command, type:

systemctl reload network.service

or

systemctl reload network

done…

CentOS 7/RHEL7: 4 useful commands to check Block devices

How can I list all available block devices under linux system? How to view block devices in centos 7 or rhel 7 operating system? this post will show you how to check block devices using the following 4 commands:

#1 lsblk – used to list block devices and it will lists information about all available or the specified block devices. the lsblk command will read the sysfs filesystem to gather information.

#2 blkid – this command will locate/print block device attributes and it can determine the type of content that a block device holds and attributes from the content metadata.

#3 df – df command will display the amount of disk space available on the file system containing each file name argument.

#4 du – the du command will estimate file space usage, will display the amount of space that is being used by file in a directory.

CentOS 7 check block devices using “lsblk” command

To list all available block devices on your system, issue the following command:

lsblk

Outputs:

[root@osetc Desktop]# lsblk

NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

fd0               2:0    1    4K  0 disk

sda               8:0    0   40G  0 disk

├─sda1            8:1    0  500M  0 part /boot

└─sda2            8:2    0 39.5G  0 part

├─centos-swap 253:0    0    2G  0 lvm  [SWAP]

└─centos-root 253:1    0 37.5G  0 lvm  /

sr0              11:0    1 1024M  0 rom

Form the above output of “lsblk” command, you will see the device name (NAME), major and minor device number(MAJ:MIN), removable device (RM), device Size(SIZE), read-only device (RO), and the mount point of device (MOUNTPOINT).

CentOS 7 check available block devices using “blkid” command

To display information about all available block devices, issue the following command:

blkid

Outputs:

[root@osetc Desktop]# blkid

/dev/sda1: UUID="54352552-3d25-4ee7-bd9c-b2355634fc82" TYPE="xfs"

/dev/sda2: UUID="EDwo5T-eGDd-gLO6-DM3z-6h74-g9I8-dcUqr1" TYPE="LVM2_member"

/dev/mapper/centos-swap: UUID="996389c2-680d-40c5-a25f-b3d9956df733" TYPE="swap"

/dev/dm-1: UUID="dbedd8fa-5d86-4ea0-8551-8444a48cd44f" TYPE="xfs"

If you just want to check one particular block device, just appending “device name” to “blkid” command:

blkid <device_name>

blkid /dev/sda1

Outputs:

[root@osetc Desktop]# blkid /dev/sda1

/dev/sda1: UUID="54352552-3d25-4ee7-bd9c-b2355634fc82" TYPE="xfs"

To get more detailed information of block devices, using “-po udev” option to blkid command, type:

blkid -po udev <device-name>

For example: check /dev/sda1 information for more detailed information:

blkid -po udev /dev/sda1

Outputs:

[root@osetc Desktop]# blkid -po udev /dev/sda1

ID_FS_UUID=54352552-3d25-4ee7-bd9c-b2355634fc82

ID_FS_UUID_ENC=54352552-3d25-4ee7-bd9c-b2355634fc82

ID_FS_TYPE=xfs

ID_FS_USAGE=filesystem

ID_PART_ENTRY_SCHEME=dos

ID_PART_ENTRY_TYPE=0x83

ID_PART_ENTRY_FLAGS=0x80

ID_PART_ENTRY_NUMBER=1

ID_PART_ENTRY_OFFSET=2048

ID_PART_ENTRY_SIZE=1024000

ID_PART_ENTRY_DISK=8:0

CentOS 7 check file system disk space usage

To display a detailed information of file system disk space usage, issue the following command:

df

Outputs:

[root@osetc Desktop]# df

Filesystem              1K-blocks    Used Available Use% Mounted on

/dev/mapper/centos-root  39277836 5308296  33969540  14% /

devtmpfs                   496332       0    496332   0% /dev

tmpfs                      505428     288    505140   1% /dev/shm

tmpfs                      505428   13548    491880   3% /run

tmpfs                      505428       0    505428   0% /sys/fs/cgroup

/dev/sda1                  508588  120936    387652  24% /boot

To display disk space usage information with a human readable format, passing with “-h” option, type:

df -h

Outputs:

[root@osetc Desktop]# df -h

Filesystem               Size  Used Avail Use% Mounted on

/dev/mapper/centos-root   38G  5.1G   33G  14% /

devtmpfs                 485M     0  485M   0% /dev

tmpfs                    494M  288K  494M   1% /dev/shm

tmpfs                    494M   14M  481M   3% /run

tmpfs                    494M     0  494M   0% /sys/fs/cgroup

/dev/sda1                497M  119M  379M  24% /boot

The above output of “df -h” command will show the partition size in megabytes and gigabytes.

CentOS 7 check disk usage of each FILE

To display the disk usage for each file in the current directory, issue the following command, type:

du

Outputs:

[root@osetc~]# du

4 ./.cache/dconf

8 ./.cache/abrt

4 ./.cache/imsettings

0 ./.cache/evolution/addressbook/trash

0 ./.cache/evolution/addressbook

0 ./.cache/evolution/calendar/trash

0 ./.cache/evolution/calendar

0 ./.cache/evolution/mail/trash

0 ./.cache/evolution/mail

0 ./.cache/evolution/memos/trash

0 ./.cache/evolution/memos

0 ./.cache/evolution/sources/trash

Done.

CentOS 7 /RHEL7: 2 linux commands to check Memory Usage

I would like to check the memory usage of current linux system, How to view the memory usage information in centOS 7? This post will show you how to check the memory usage using the following command:

#1 free command – this command will display the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. the memory information is gathered by parsing /proc/meminfo file.

#2 system monitor tool – this is a GUI program to use to view the cpu usage, memory usage of current processes.

CentOS 7 check memrory usage using “free” command

To list  the amount of free and used memory on your system, just type “free” command:

free

Outputs:

[root@osetc /]# free

total       used       free     shared    buffers     cached

Mem:       1010860     934976      75884       8280          0     107944

-/+ buffers/cache:     827032     183828

Swap:      2129916     138000    1991916

This command will gather the memory information by parsing the /proc/meminfo file. Using “cat” command to view the memory information:

cat /proc/meminfo

Outputs:

[root@osetc /]# cat /proc/meminfo

MemTotal:        1010860 kB

MemFree:           75184 kB

MemAvailable:     103136 kB

Buffers:               0 kB

Cached:           116740 kB

SwapCached:        10096 kB

Active:           284496 kB

Inactive:         432848 kB

Active(anon):     221640 kB

Inactive(anon):   387300 kB

Active(file):      62856 kB

Inactive(file):    45548 kB

Unevictable:           0 kB

Mlocked:               0 kB

SwapTotal:       2129916 kB

SwapFree:        1991948 kB

Dirty:                 0 kB

Writeback:             0 kB

AnonPages:        591796 kB

Mapped:            44504 kB

Shmem:              8312 kB

Slab:             111916 kB

SReclaimable:      60120 kB

SUnreclaim:        51796 kB

KernelStack:        4192 kB

PageTables:        30180 kB

NFS_Unstable:          0 kB

Bounce:                0 kB

WritebackTmp:          0 kB

CommitLimit:     2635344 kB

Committed_AS:    2966816 kB

VmallocTotal:   34359738367 kB

VmallocUsed:      163076 kB

VmallocChunk:   34359553388 kB

HardwareCorrupted:     0 kB

AnonHugePages:    428032 kB

HugePages_Total:       0

HugePages_Free:        0

HugePages_Rsvd:        0

HugePages_Surp:        0

Hugepagesize:       2048 kB

DirectMap4k:      102272 kB

DirectMap2M:      946176 kB

DirectMap1G:           0 kB

The free command will display the amount of memory in kilobytes by defaultm, if you want to display the amount of memory in megabytes, issue the following free command with “-m” option, type:

free -m

Outputs:

[root@osetc /]# free -m

total       used       free     shared    buffers     cached

Mem:           987        914         72          8          0        106

-/+ buffers/cache:        807        179

Swap:         2079        134       1945

CentOS 7 check memory usage using the system monitor tool

To start “system monitor” tool, click “Application“->”system tools” ->”system monitor“, then system will pop-up a “system monitor” window.  This tool is similar with the “Task Manager” in the windows operating system.

Or type the “gnome-system-monitor” command, enter:

gnome-system-monitor

system will pop-up “system monitor” window, swithc to “Resources” tab, you will see that the amount of memory usage and memory history.

linux system monitor2

CentOS 7 /RHEL: 3 useful commands to view system processes

In this post you will see how to check system processes using the below command to check system processes under centos 7 or RHEL 7 operating system.

#1 ps command – allows you to display information about running processes in your current system.

#2 top command – this command will dispalys a real-time list of processes that are running on the system. it can display system summary information as well as list of processes or threads currently being managed by linux kernel.

#3 system monitor tool – this is a GUI program to use to view the cpu usage, memory usage of current processes.

CentOS 7 view system processes using “ps” command

To list all processes that are currently running on the system including processes owned by others users, issue the following command:

ps aux

Outputs:

[root@osetc /]# ps aux

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

root         1  0.0  0.3 216908  3820 ?        Ss   Dec14   0:14 /usr/lib/systemd/systemd --sw

root         2  0.0  0.0      0     0 ?        S    Dec14   0:00 [kthreadd]

root         3  0.0  0.0      0     0 ?        S    Dec14   0:03 [ksoftirqd/0]

root         5  0.0  0.0      0     0 ?        S<   Dec14   0:00 [kworker/0:0H]

root         7  0.0  0.0      0     0 ?        S    Dec14   0:00 [migration/0]

root         8  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcu_bh]

root         9  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/0]

root        10  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/1]

root        11  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/2]

root        12  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/3]

root        13  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/4]

root        14  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/5]

root        15  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/6]

root        16  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/7]

root        17  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/8]

root        18  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/9]

root        19  0.0  0.0      0     0 ?        S    Dec14   0:00 [rcuob/10]

This command will display the process ID(PID), the terminal associated with the process(TTY), the cumulated CPU time in hh:mm:ss format(TIME) and the executeable name (COMMAND), the effective username of the process owner(USER), the percentage of the CPU(CPU), and memory usage(MEM)

To check one particualar process named httpd,type the following command:

ps aux | grep httpd

Outputs:

[root@osetc/]# ps aux | grep httpd

root     39039  3.2  1.4 449460 14700 ?        Ss   02:58   0:00 /usr/sbin/httpd -DFOREGROUND

apache   39041  0.0  0.7 451544  7780 ?        S    02:58   0:00 /usr/sbin/httpd -DFOREGROUND

apache   39042  0.0  0.7 451544  7780 ?        S    02:58   0:00 /usr/sbin/httpd -DFOREGROUND

apache   39043  0.0  0.7 451544  7780 ?        S    02:58   0:00 /usr/sbin/httpd -DFOREGROUND

apache   39044  0.0  0.7 451544  7780 ?        S    02:58   0:00 /usr/sbin/httpd -DFOREGROUND

apache   39047  0.0  0.7 451544  7780 ?        S    02:58   0:00 /usr/sbin/httpd -DFOREGROUND

root     39051  0.0  0.0 112640   976 pts/2    S+   02:58   0:00 grep --color=auto httpd

[root@osetc /]#

CentOS 7 view system processes using top command

The top command provides a dynamic real-time view of a running system. it can display system summary infomration as well as a list of processes or threads currently being managed by the linux kernel.

To display real-time processes that are running on the system, issue the following command:

top

Outputs:

[root@osetc /]# top

top - 03:03:17 up 1 day, 29 min,  4 users,  load average: 0.02, 0.07, 0.12

Tasks: 306 total,   3 running, 303 sleeping,   0 stopped,   0 zombie

%Cpu(s): 48.5 us,  4.1 sy,  0.0 ni, 47.5 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st

KiB Mem:   1010860 total,   932044 used,    78816 free,        0 buffers

KiB Swap:  2129916 total,   140144 used,  1989772 free.   161596 cached Mem

PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND

7889 devops    20   0 1684604 358340   8388 R 41.7 35.4  18:28.95 gnome-shell

6564 root      20   0  193088  29220   1984 S  7.6  2.9   1:48.72 Xorg

8261 devops    20   0  630472  11324   3484 S  2.0  1.1   0:23.79 gnome-terminal-

8093 devops    20   0  144908    604    388 S  0.3  0.1   0:30.98 escd

8094 devops    20   0  447792   3820   1584 S  0.3  0.4   2:31.47 vmtoolsd

39066 root      20   0       0      0      0 S  0.3  0.0   0:00.24 kworker/0:1

1 root      20   0  216908   4816   2284 S  0.0  0.5   0:14.39 systemd

2 root      20   0       0      0      0 S  0.0  0.0   0:00.07 kthreadd

3 root      20   0       0      0      0 S  0.0  0.0   0:03.27 ksoftirqd/0

5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H

7 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0

8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh

9 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/0

10 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/1

11 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/2

This command will display the process owner (USER), the priority(PR), the nice value(NI), the amount of virtual memory the process uses(VIRT), the percentage of the CPU(CPU), the memory usage (MEM), the cumulated CPU time(TIME), the name of the executable file(COMMAND).

CentOS 7 view system processes using the system monitor tool

To start “system monitor” tool, click “Application“->”system tools” ->”system monitor“, then system will pop-up a “system monitor” window.  this tool is similar with the “Task Manager” in the windows operating system.

linux system monitor1

CentOS 7 /RHEL7: Shut down/Restart/Suspend/Hibernate The System

I would like to shut down or restart the system in the centos 7 or rhel 7, How to shutdown system? which commands I can use to shutdown the system? of course, you still can use the “poweroff” command to shutdown the system, this is an old command in the centos 6.x or previous version. In centos 7 or Rhel 7, A number of power management commands used in old centos version or rhel are replaced by systemctl utility.

You are able to use systemctl command with “poweroff” option to shutdown the system or with “reboot” option to restart the system. those old commands are still available to use for compatibility only in centos 7 or rhel 7.

In this post you will see that how to use systemctl utility shut down/restart/suspend/hibernate the system.

CentOS 7 /RHEL7 Shut down/Restart/Suspend/Hibernate The System

CentOS 7 shut down the system

To shutdown and power-off the centos 7 or rhel 7 system, issue the following command, type:

systemctl poweroff

This command not only shutdown the system, but also prints a wall message to all users that are currently logged into the system. If passing with “–force” option, shutdown of all running services is skipped, however all processes are killed and all file systems are unmounted or mounted read-only. type:

systemctl poweroff --force

CentOS 7 restart the system

To shutdown and reboot the system, using the following systemctl command with reboot option, type:

systemctl reboot

This command also will send a wall message to all logged user in the current system. if passing “–force” option to this command, the operation action is similar with “poweroff”. enter:

systemctl reboot --force

Note: if “–force” option is specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems, this my result in data loss.

systemctl reboot --force --force

CentOS 7 suspend the system

To suspend the system, issue the following systemctl command with “suspend” option, type:

systemctl suspend

This command will save the system state in RAM and put the machine in a sleep state, and the system still requires power in this state.As the system state is saved in RAM, so its restoring speed of the system is fast.

CentOS 7 hibernate the system

To hibernate the system, issue the following command as root user:

systemctl hibernate

this command will fully powered off the system and the system state is saved to disk. the system does not require power, and can stay in hibernate mode indefinitely. because the system state is not saved in RAM, so its restoring speed of the system is slower than suspend mode.

Done…..