Showing posts with label CentOS. Show all posts
Showing posts with label CentOS. Show all posts

Thursday, December 7, 2017

CentOS: nohup

Command:

# nohup COMMAND &
# tail -f nohup.out
# exit



CentOS: Running CPU Miner using cpulimit (90%)

Command:

# cpulimit -l 90 -- ./minerd --config n-zeny.json


Result:

[2017-12-07 14:19:23] 2 miner threads started, using 'yescrypt' algorithm.
[2017-12-07 14:19:23] Starting Stratum on stratum+tcp://mining-zeny.mdpool.info:6969
[2017-12-07 14:19:23] Stratum requested work restart
[2017-12-07 14:19:26] accepted: 1/1 (100.00%), 0.36 khash/s (yay!!!)
[2017-12-07 14:19:28] accepted: 2/2 (100.00%), 0.56 khash/s (yay!!!)
[2017-12-07 14:19:44] accepted: 3/3 (100.00%), 0.51 khash/s (yay!!!)
[2017-12-07 14:19:49] accepted: 4/4 (100.00%), 0.53 khash/s (yay!!!)

CentOS: Installing cpulimit

Command:

# yum install cpulimit


Result:

Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * epel: mirror.dmmlabs.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package cpulimit.x86_64 1:0.2-1.20151118gitf4d2682.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package              Arch               Version                                       Repository        Size
==============================================================================================================
Installing:
 cpulimit             x86_64             1:0.2-1.20151118gitf4d2682.el6                epel              14 k

Transaction Summary
==============================================================================================================
Install       1 Package(s)

Total download size: 14 k
Installed size: 23 k
Is this ok [y/N]: y
Downloading Packages:
cpulimit-0.2-1.20151118gitf4d2682.el6.x86_64.rpm                                       |  14 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:cpulimit-0.2-1.20151118gitf4d2682.el6.x86_64                                             1/1
  Verifying  : 1:cpulimit-0.2-1.20151118gitf4d2682.el6.x86_64                                             1/1

Installed:
  cpulimit.x86_64 1:0.2-1.20151118gitf4d2682.el6                                                            

Complete!

CentOS: Installing Cpu Miner

Command:

$sudo yum -y groupinstall "Development Tools"
$ sudo yum -y install git libcurl-devel python-devel screen rsync
$ git clone https://github.com/bitzeny/cpuminer.git cpuminer
$ cd cpuminer/
$ ./autogen.sh
$ ./configure CFLAGS="-O3"
$ make

CentOS: CPUMiner: Fixing libjansson error

Error message:

./minerd: error while loading shared libraries: libjansson.so.4: cannot open shared object file: No such file or directory


Command:

ln -s /usr/local/lib/libjansson.so.4 /usr/lib/libjansson.so.4
ldconfig

Friday, September 1, 2017

CentOS: Enabling SSL (Doesn't work perfectly)

Command:

# cd /etc/httpd/conf.d/
# diff /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.org


Result:

105,106c105
< #SSLCertificateFile /etc/pki/tls/certs/localhost.crt
< SSLCertificateFile /etc/pki/tls/certs/ca.crt
---
> SSLCertificateFile /etc/pki/tls/certs/localhost.crt
113,114c112
< #SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
< SSLCertificateKeyFile /etc/pki/tls/private/ca.key
---
> SSLCertificateKeyFile /etc/pki/tls/private/localhost.key


Command:

# sudo openssl genrsa -out ca.key 2048


Result:

Generating RSA private key, 2048 bit long modulus
........................................................................................+++
..........+++
e is 65537 (0x10001)


Command:

# sudo openssl req -new -key ca.key -out ca.csr


Result:

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]: US
State or Province Name (full name) []: SOMEWHERE1
Locality Name (eg, city) [Default City]: SOMEWHERE2
Organization Name (eg, company) [Default Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []: www.myserver.com
Email Address []:admin@myserver.com

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: PASSWORD
An optional company name []:


Command:

# sudo openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt


Result:

Signature ok
subject=/C=US/ST=SOMEWHERE1/L=SOMEWHERE2/O=Default Company Ltd/CN=www.myserver.com/emailAddress=admin@myserver.com
Getting Private key


Command:

# sudo cp ca.crt /etc/pki/tls/certs
# sudo cp ca.key /etc/pki/tls/private/ca.key
# sudo cp ca.csr /etc/pki/tls/private/ca.csr


Command:

# diff /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.org


Result:

105,106c105
< #SSLCertificateFile /etc/pki/tls/certs/localhost.crt
< SSLCertificateFile /etc/pki/tls/certs/ca.crt
---
> SSLCertificateFile /etc/pki/tls/certs/localhost.crt
113,114c112
< #SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
< SSLCertificateKeyFile /etc/pki/tls/private/ca.key
---
> SSLCertificateKeyFile /etc/pki/tls/private/localhost.key


Command:

# apachectl restart


Result:

[Fri Sep 01 05:21:33 2017] [warn] module ssl_module is already loaded, skipping


Command:

# sudo mkdir -p /var/www/html/ssl
# sudo mkdir -p /etc/httpd/sites-available
# sudo mkdir -p /etc/httpd/sites-enabled

# apachectl restart
# vi httpd.conf
# diff httpd.conf httpd.conf.bkup20170901


Result:

217d216
< #LoadModule ssl_module modules/mod_ssl.so
1012,1021d1010
<
< #Listen 443
< #<VirtualHost *:443>
< # ServerName www.myserver.com
< # SSLEngine on
< # SSLCertificateFile "/path/to/www.example.com.cert"
< # SSLCertificateKeyFile "/path/to/www.example.com.key"
< #</VirtualHost>
<
< IncludeOptional sites-enabled/*.conf


Command:

# cat ssl.conf


Result:

<VirtualHost *:443>
ServerAdmin admin@myserver.com
DocumentRoot "/var/www/html/ssl/"
ServerName Myserver
ServerAlias myserver
ErrorLog /var/www/html/ssl/error.log

<Directory "/var/www/html/ssl/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


Command:

# sudo ln -s /etc/httpd/sites-available/ssl.conf /etc/httpd/sites-enabled/ssl.conf
# apachectl restart


Result:

apachectl: Configuration syntax error, will not run "restart":
Syntax error on line 1021 of /etc/httpd/conf/httpd.conf:
Invalid command 'IncludeOptional', perhaps misspelled or defined by a module not included in the server configuration


Command:

# diff httpd.conf httpd.conf.bkup20170901


Result:

217d216
< #LoadModule ssl_module modules/mod_ssl.so
1012,1021d1010
<
< #Listen 443
< #<VirtualHost *:443>
< # ServerName www.myserver.com
< # SSLEngine on
< # SSLCertificateFile "/path/to/www.example.com.cert"
< # SSLCertificateKeyFile "/path/to/www.example.com.key"
< #</VirtualHost>
<
< Include sites-enabled/


Command:

# apachectl restart


Result:

[Fri Sep 01 05:42:50 2017] [warn] _default_ VirtualHost overlap on port 443, the first has precedence


Reference:

http://www.techrepublic.com/article/how-to-enable-https-on-apache-centos/

CentOS: Installing mod_ssl & openssl

Command:

# sudo yum install mod_ssl openssl


Result:

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                             | 5.4 kB     00:00    
 * base: ftp.tsukuba.wide.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
base                                                                                                                                      | 3.7 kB     00:00    
cr                                                                                                                                        | 2.9 kB     00:00    
epel                                                                                                                                      | 4.3 kB     00:00    
epel/primary_db                                                                                                                           | 5.9 MB     00:00    
extras                                                                                                                                    | 3.4 kB     00:00    
updates                                                                                                                                   | 3.4 kB     00:00    
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mod_ssl.x86_64 1:2.2.15-60.el6.centos.5 will be installed
---> Package openssl.x86_64 0:1.0.1e-16.el6_5.14 will be updated
---> Package openssl.x86_64 0:1.0.1e-57.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================
 Package                           Arch                             Version                                              Repository                         Size
=================================================================================================================================================================
Installing:
 mod_ssl                           x86_64                           1:2.2.15-60.el6.centos.5                             updates                            98 k
Updating:
 openssl                           x86_64                           1.0.1e-57.el6                                        base                              1.5 M

Transaction Summary
=================================================================================================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)

Total download size: 1.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): mod_ssl-2.2.15-60.el6.centos.5.x86_64.rpm                                                                                          |  98 kB     00:00    
(2/2): openssl-1.0.1e-57.el6.x86_64.rpm                                                                                                   | 1.5 MB     00:00    
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                             16 MB/s | 1.6 MB     00:00    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : openssl-1.0.1e-57.el6.x86_64                                                                                                                  1/3
  Installing : 1:mod_ssl-2.2.15-60.el6.centos.5.x86_64                                                                                                       2/3
  Cleanup    : openssl-1.0.1e-16.el6_5.14.x86_64                                                                                                             3/3
  Verifying  : openssl-1.0.1e-57.el6.x86_64                                                                                                                  1/3
  Verifying  : 1:mod_ssl-2.2.15-60.el6.centos.5.x86_64                                                                                                       2/3
  Verifying  : openssl-1.0.1e-16.el6_5.14.x86_64                                                                                                             3/3

Installed:
  mod_ssl.x86_64 1:2.2.15-60.el6.centos.5                                                                                                                      

Updated:
  openssl.x86_64 0:1.0.1e-57.el6                                                                                                                                

Complete!

Wednesday, August 30, 2017

CentOS: iptables: Fixing Webserver Accessibility (How secure now?)

Command:

# diff /etc/sysconfig/iptables /etc/sysconfig/iptables.org


Result:

1c1,2
< # Generated by iptables-save v1.4.7 on Wed Aug 30 00:09:28 2017
---
> # Firewall configuration written by system-config-firewall
> # Manual customization of this file is not recommended.
3,11c4,12
< :INPUT DROP [0:0]
< :FORWARD DROP [0:0]
< :OUTPUT ACCEPT [24:2320]
< -A INPUT -i lo -j ACCEPT
< -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
< -A INPUT -p tcp -m tcp --dport 53 -j ACCEPT
< -A INPUT -p udp -m udp --dport 53 -j ACCEPT
< -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
< -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
---
> :INPUT ACCEPT [0:0]
> :FORWARD ACCEPT [0:0]
> :OUTPUT ACCEPT [0:0]
> -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
> -A INPUT -p icmp -j ACCEPT
> -A INPUT -i lo -j ACCEPT
> -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
> -A INPUT -j REJECT --reject-with icmp-host-prohibited
> -A FORWARD -j REJECT --reject-with icmp-host-prohibited
13d13
< # Completed on Wed Aug 30 00:09:28 2017


Reference:

http://programmerbox.com/2013-12-24_vps_construct_procedure_manual/

Tuesday, August 29, 2017

CentOS: Adding User

Command:

# useradd USERNAME
# passwd USERNAME


Result:

Changing password for user USERNAME.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.


Command:

# su USERNAME
$ cd ~
$ ls
$ pwd


Result:

/home/USERNAME

Monday, July 25, 2016

CentOS: iptables

Command:

# cat ./set_firewall

Result:

#!/bin/bash

# Flush all the chains in filter (default) table.
iptables -F

# Attempt to delete every non-builtin chain in filter (default) table.
iptables -X

# Set the policy for INPUT chain to DROP target.
iptables -P INPUT DROP

# Set the policy for FORWARD chain to DROP target.
iptables -P FORWARD DROP

# Set the policy for OUTPUT chain to ACCEPT target.
iptables -P OUTPUT ACCEPT

# Append rules to INPUT chain.
# Protocol of the rule is icmp (Internet Control Message Protocol) which is the protocol for ping.
# Target is ACCEPT.
iptables -A INPUT -p icmp -j ACCEPT

# Append rules to INPUT chain.
# The rule is for Loopback network interface.
# Target is ACCEPT.
iptables -A INPUT -i lo -j ACCEPT

# Append rules to INPUT chain.
# The rule is for tcp protocol on port 80.
# Target is ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT

# Append rules to INPUT chain.
# The rule is for tcp protocol on port 22.
# Target is ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

# Append rules to INPUT chain.
# The rule for packets after session ESTABLISHED and RELATED packets.
# Target is ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Dump iptables rules to stdout
iptables-save


Command:

# ./set_firewall

Result:

# Generated by iptables-save v1.4.21 on Tue May 24 23:44:34 2016
*nat
:PREROUTING ACCEPT [41489:3695453]
:INPUT ACCEPT [15:960]
:OUTPUT ACCEPT [628:160830]
:POSTROUTING ACCEPT [628:160830]
:OUTPUT_direct - [0:0]
:POSTROUTING_ZONES - [0:0]
:POSTROUTING_ZONES_SOURCE - [0:0]
:POSTROUTING_direct - [0:0]
:POST_public - [0:0]
:POST_public_allow - [0:0]
:POST_public_deny - [0:0]
:POST_public_log - [0:0]
:PREROUTING_ZONES - [0:0]
:PREROUTING_ZONES_SOURCE - [0:0]
:PREROUTING_direct - [0:0]
:PRE_public - [0:0]
:PRE_public_allow - [0:0]
:PRE_public_deny - [0:0]
:PRE_public_log - [0:0]
-A PREROUTING -j PREROUTING_direct
-A PREROUTING -j PREROUTING_ZONES_SOURCE
-A PREROUTING -j PREROUTING_ZONES
-A OUTPUT -j OUTPUT_direct
-A POSTROUTING -j POSTROUTING_direct
-A POSTROUTING -j POSTROUTING_ZONES_SOURCE
-A POSTROUTING -j POSTROUTING_ZONES
-A POSTROUTING_ZONES -o enp0s3 -g POST_public
-A POSTROUTING_ZONES -g POST_public
-A POST_public -j POST_public_log
-A POST_public -j POST_public_deny
-A POST_public -j POST_public_allow
-A PREROUTING_ZONES -i enp0s3 -g PRE_public
-A PREROUTING_ZONES -g PRE_public
-A PRE_public -j PRE_public_log
-A PRE_public -j PRE_public_deny
-A PRE_public -j PRE_public_allow
COMMIT
# Completed on Tue May 24 23:44:34 2016
# Generated by iptables-save v1.4.21 on Tue May 24 23:44:34 2016
*mangle
:PREROUTING ACCEPT [58667:5285859]
:INPUT ACCEPT [58666:5285283]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [28814:3788418]
:POSTROUTING ACCEPT [28814:3788418]
:FORWARD_direct - [0:0]
:INPUT_direct - [0:0]
:OUTPUT_direct - [0:0]
:POSTROUTING_direct - [0:0]
:PREROUTING_ZONES - [0:0]
:PREROUTING_ZONES_SOURCE - [0:0]
:PREROUTING_direct - [0:0]
:PRE_public - [0:0]
:PRE_public_allow - [0:0]
:PRE_public_deny - [0:0]
:PRE_public_log - [0:0]
-A PREROUTING -j PREROUTING_direct
-A PREROUTING -j PREROUTING_ZONES_SOURCE
-A PREROUTING -j PREROUTING_ZONES
-A INPUT -j INPUT_direct
-A FORWARD -j FORWARD_direct
-A OUTPUT -j OUTPUT_direct
-A POSTROUTING -j POSTROUTING_direct
-A PREROUTING_ZONES -i enp0s3 -g PRE_public
-A PREROUTING_ZONES -g PRE_public
-A PRE_public -j PRE_public_log
-A PRE_public -j PRE_public_deny
-A PRE_public -j PRE_public_allow
COMMIT
# Completed on Tue May 24 23:44:34 2016
# Generated by iptables-save v1.4.21 on Tue May 24 23:44:34 2016
*security
:INPUT ACCEPT [17193:1591366]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [28814:3788418]
:FORWARD_direct - [0:0]
:INPUT_direct - [0:0]
:OUTPUT_direct - [0:0]
-A INPUT -j INPUT_direct
-A FORWARD -j FORWARD_direct
-A OUTPUT -j OUTPUT_direct
COMMIT
# Completed on Tue May 24 23:44:34 2016
# Generated by iptables-save v1.4.21 on Tue May 24 23:44:34 2016
*raw
:PREROUTING ACCEPT [58667:5285859]
:OUTPUT ACCEPT [28814:3788418]
:OUTPUT_direct - [0:0]
:PREROUTING_direct - [0:0]
-A PREROUTING -j PREROUTING_direct
-A OUTPUT -j OUTPUT_direct
COMMIT
# Completed on Tue May 24 23:44:34 2016
# Generated by iptables-save v1.4.21 on Tue May 24 23:44:34 2016
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Tue May 24 23:44:34 2016


Command:

# iptables -L -v

Result:

Chain INPUT (policy DROP 4 packets, 128 bytes)
 pkts bytes target     prot opt in     out     source               destination      
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere          
    0     0 ACCEPT     all  --  lo     any     anywhere             anywhere          
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:http
   57  3900 ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:ssh
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             state RELATED,ESTABLISHED

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination      

Chain OUTPUT (policy ACCEPT 29 packets, 7336 bytes)
 pkts bytes target     prot opt in     out     source               destination

Monday, July 18, 2016

CentOS: Quick Fixing the Locale Problem When Terminal.app Failed to Set Locale Environment Variables on Startup

Command:

$ locale

Result:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: LC_ALL??????????????????: ??????????????????????
LANG=ja_JP.utf8
LC_CTYPE=UTF-8
LC_NUMERIC="ja_JP.utf8"
LC_TIME="ja_JP.utf8"
LC_COLLATE="ja_JP.utf8"
LC_MONETARY="ja_JP.utf8"
LC_MESSAGES="ja_JP.utf8"
LC_PAPER="ja_JP.utf8"
LC_NAME="ja_JP.utf8"
LC_ADDRESS="ja_JP.utf8"
LC_TELEPHONE="ja_JP.utf8"
LC_MEASUREMENT="ja_JP.utf8"
LC_IDENTIFICATION="ja_JP.utf8"
LC_ALL=


Command:

$ LC_CTYPE=ja_JP.utf8
$ locale

Result:

LANG=ja_JP.utf8
LC_CTYPE=ja_JP.utf8
LC_NUMERIC="ja_JP.utf8"
LC_TIME="ja_JP.utf8"
LC_COLLATE="ja_JP.utf8"
LC_MONETARY="ja_JP.utf8"
LC_MESSAGES="ja_JP.utf8"
LC_PAPER="ja_JP.utf8"
LC_NAME="ja_JP.utf8"
LC_ADDRESS="ja_JP.utf8"
LC_TELEPHONE="ja_JP.utf8"
LC_MEASUREMENT="ja_JP.utf8"
LC_IDENTIFICATION="ja_JP.utf8"
LC_ALL=


Command:

$ date

Result:

2016年  5月 18日 水曜日 03:47:01 JST

CentOS: Setting System Locale

Command:

$ locale -a | grep ja

Result:

ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc


Command:

$ localectl set-locale LANG=ja_JP.utf8
$ localectl

Result:

System Locale: LANG=ja_JP.utf8

CentOS: Installing Sysstat

Command:

# yum install sysstat

Result:

Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * updates: ftp.jaist.ac.jp
Resolving Dependencies
--> Running transaction check
---> Package sysstat.x86_64 0:10.1.5-7.el7 will be installed
--> Processing Dependency: libsensors.so.4()(64bit) for package: sysstat-10.1.5-7.el7.x86_64
--> Running transaction check
---> Package lm_sensors-libs.x86_64 0:3.3.4-11.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package                        Arch                  Version                       Repository           Size
==============================================================================================================
Installing:
 sysstat                        x86_64                10.1.5-7.el7                  base                296 k
Installing for dependencies:
 lm_sensors-libs                x86_64                3.3.4-11.el7                  base                 40 k

Transaction Summary
==============================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 336 k
Installed size: 1.1 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): lm_sensors-libs-3.3.4-11.el7.x86_64.rpm                                         |  40 kB  00:00:01    
(2/2): sysstat-10.1.5-7.el7.x86_64.rpm                                                                                                       | 296 kB  00:00:06    
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                55 kB/s | 336 kB  00:00:06    
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : lm_sensors-libs-3.3.4-11.el7.x86_64                                                                                                              1/2
  Installing : sysstat-10.1.5-7.el7.x86_64                                                                                                                      2/2
  Verifying  : sysstat-10.1.5-7.el7.x86_64                                                                                                                      1/2
  Verifying  : lm_sensors-libs-3.3.4-11.el7.x86_64                                                                                                              2/2

Installed:
  sysstat.x86_64 0:10.1.5-7.el7                                                                                                                                    

Dependency Installed:
  lm_sensors-libs.x86_64 0:3.3.4-11.el7                                                                                                                            

Complete!

CentOS: Installing OpenSSH Server

Command:

# yum -y install openssh-server

Result:

Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.jaist.ac.jp
* extras: ftp.jaist.ac.jp
* updates: ftp.jaist.ac.jp
Package openssh-server-6.6.1p1-25.el7_2.x86_64 already installed and latest version
Nothing to do

CentOS: Print Release Informations

Command:

$ cat /etc/centos-release

Result:

CentOS Linux release 7.2.1511 (Core)


Command:

$ cat /etc/os-release

Result:

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"


Command:

$ cat /etc/redhat-release

Result:

CentOS Linux release 7.2.1511 (Core)


Command:

$ cat /etc/system-release

Result:

CentOS Linux release 7.2.1511 (Core)

Monday, May 16, 2016

CentOS: Installing net-tools

List of programs in net-tools package:
  1. arp
  2. hostname
  3. ifconfig
  4. ipmaddr
  5. iptunnel
  6. mii-tool
  7. nameif
  8. netstat
  9. plipconfig
  10. rarp
  11. route
  12. slattach

Command to install:

$ sudo yum install net-tools

Sunday, May 15, 2016

CentOS: Downloading CentOS 7 Minimal iso

Link:

http://buildlogs.centos.org/rolling/7/isos/x86_64/CentOS-7-x86_64-Minimal.iso