Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
============
Kubernetes, Jenkins, Ansible (Docker) les nouvelles technologie
Red Hat Certified System Administrator (RHCSA)
Red Hat Systems Engineer (RHCE)
The Network File System (NFS) protocol is used to share files between Linux
Domain Name System (DNS)
Network Time Protocol (NTP)
The Lightweight Directory Access Protocol (LDAP)
Transport Layer Security (TLS)
Network Address Translation (NAT)
Hypertext Transfer Protocol (HTTP)
Secure Shell (SSH)
User Datagram Protocol (UDP)
Internet Control Message Protocol(ICMP)
Transfer Control Protocol(TCP)
Dynamic Host Configuration Protocol (DHCP)
KVM (Kernel Virtual Machine).
===
man -k ls | grep 8
==================
1: Executable programs or shell commands
� 5: File formats and conventions
� 8: System administration commands
====Using Compression
gzip home.tar . gzip replaces home.tar with its compressed version, home.tar.gz
-z (gzip) or -j (bzip2) options while creating the archive with tar.
tar tvf etc.tar.gz . Notice that the tar command has no issues reading from a gzip
compressed file
gunzip etc.tar.gz . This decompresses the compressed file
default virtualisation technology for redhat 7 is KVM
Need one or more 64 bits CPU
which command enables you to list all virtual machines that are available,
including VMs that haven�t been started?
#virsh list --all
At the hypervisor
level, this network is represented by a vnet interface. The first VM that starts
gets
the interface vnet0, the second machine that starts gets vnet1, and so on.
ps aux | sort -k3 ==> sort the third column of the output
to use it:http://localhost/inst
symbolic link (as racourcis) if you delete origine , you lose link (ln -s)
Exemple:
rm conf
#ln -s conf_1 conf
command to help
#whatis ls
Adressage:
==========
A 1.1.1.0 127.255.255.255
B 128.0.0.0 191.255.255.255
C 192.0.0.0 223.255.255.255
D 224.0.0.0 239.255.255.255
E 240.0.0.0 255.255.255.255
===============network==============
� notation CIDR � (Classless Inter-Domain Routing). Elle donne le num�ro du r�seau
suivi par une barre oblique (ou slash, � / �)
et le nombre de bits � 1 dans la notation binaire du masque de sous-r�seau. Le
masque 255.255.224.0,
�quivalent en binaire � 11111111.11111111.11100000.00000000, sera donc repr�sent�
par /19 (19 bits � la valeur 1, suivis de 13 bits 0).
Private network addresses are addresses that are for use in internal networks only:
10.0.0.0/8 ( a single Class A network)
172.16.0.0/12 (16 Class B networks)
192.168.0.0/16 (256 Class C networks)
#cd /etc/sysconfig/network-scripts
to change network configuration , there are 3 ways : nmcli command & ip command
use network manager service to configure interfaces
#host hostname_server
#dig hostname_server
=================================
all commands executed using sudo are logged by default to : /var/log/secure.
sudo command based on the setting in /etc/sudoers file
to edit /etc/sudoers use: visudo command
Any "user" should belong to groupe "wheel" to be able to use sudo to run all
administration commands.
/etc/default/useradd configuration file used to set the default location for all
new user home directories.
to modify the /etc/shadow file, use ===>> vipw -s
To edit the contents of the /etc/group ==> vigr
/etc/passwd:
/etc/group :
groupename:password:GID:list of users in this group
Some defaults,such as the range of valid UID numbers and default password aging
rules, are read from : /etc/login.defs
If when creating user accounts you tell your server to add a home directory as well
(for instance, by using useradd -m ),
skeleton directory is /etc/skel
default values are set in two configuration files:
/etc/login.defs
/etc/default/useradd
-c, --comment COMMENT Add a value, such as a full name, to the GECOS field.
-g, --gid GROUP Specify the primary group for the user account.
-G, --groups GROUPS Specify a list of supplementary groups for the user account.
-a, --append Used with the -G option to append the user to the
supplemental groups mentioned without removing the user from other
groups.
-d, --home HOME_DIR Specify a new home directory for the user account.
-m, --move-home Move a user home directory to a new location. Must be used with the
-d option.
-s, --shell SHELL Specify a new login shell for the user account.
In Red Hat Enterprise Linux 7 the useradd command assigns new users the first
free UID number available in the range starting from UID 1000 or above
unless one ,is explicitly specified with the -u UID option
Notice that bob now owns all files that prince once owned. Depending on the
situation, one solution to this problem is to remove all "unowned" files from the
system when the user that created them is deleted. Another solution is to manually
assign the "unowned" files to a different user. The root user can find "unowned"
files
and directories by running:
UID ranges
==========
UID 201 -999 is a range of "system users" used by system processes that do not own
files on
the file system. They are typically assigned dynamically from the available pool
when the
software that needs them is installed. Programs run as these "unprivileged" system
users in
order to limit their access to just the resources they need to function.
Note
=====
Prior to Red Hat Enterprise Linux 7, the convention was that UID 1-499 was used for
system users and UID 500+ for regular users. Default ranges used by useradd and
groupadd can be changed in the /etc/login.defs file.
The -r option will create a system group using a GID from the range of valid system
GID
numbers listed in the /etc/login.defs file.
groupmod : modifies existing groups .The -n option is used to specify a new name.
A group may not be removed if it is the primary group of any existing user. As with
userdel,
check all file systems to ensure that no files remain owned by the group.
Note /!\ Without -a , the user would be removed from all other supplementary
groups.
/etc/shadaw
name:password:1astchange:minage:maxage:warning:inactive:expire:b1ank
The login name. This must be a valid account name on the system.
The encrypted password. A password field which starts with a exclamation mark means
that the password is locked.
The date of the last password change, represented as the number of days since
1970.01.01.
The minimum number of days before a password may be changed, where O means "no
minimum age requirement."
The maximum number of days before a password must be changed.
The warning period that a password is about to expire. Represented in days, where 0
means "no warning given."
The number of days an account remains active after a password has expired.A user
may still log into the system and change the password during this period.
After the specified
number of days, the account is locked, becoming inactive.
The account expiration date, represented as the number of days since 1970.01.01.
This blank field is reserved for future use.
====
To construct the user environment, a few files play a role:
/etc/profile: Used for default settings for all users when starting a login shell
/etc/bashrc: Used to define defaults for all users when starting a subshell
~/.profile: Specific settings for one user applied when starting a login shell
~/.bashrc: Specific settings for one user applied when starting a subshell
Options:
-d, --lastday LAST_DAY set last password change to LAST_DAY
-E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-h, --help display this help message and exit
-I, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-l, --list show account aging information
-m, --mindays MIN_DAYS set minimum number of days before password
change to MIN_DAYS
-M, --maxdays MAX_DAYS set maximim number of days before password
change to MAX_DAYS
-W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS
# chage - m 0 - M 90 -W 7 - I 14 username
Note linux
===========
goupmemes -g groupename -l
In Linux, if write and the sticky bit are both set on a directory, then only the
user that owns a file or subdirectory in the directory may delete it
When using this option, be sure to use the X permissions instead of the x
permission to indicate that execute permissions should only be set on
directories, and not regular files
The owner of the group can be changed with the chown command
If you want to use the chown command use a . or : in front of the group name to
change the groupe.
Special permissions
===================
u+s (suid)
Effect on files : File executes as the user that owns the file, not the user that
ran the file.
Effect on directories : No effect.
g+s (sgid)
Effect on files : File executes as the group that owns the file
Effect on directories : Files newly created in the directory have their group owner
set to match the group owner of the directory.
o+t (sticky)
Effect on files : No effect.
Effect on directories : Users with write on the directory can only remove files
that they own; they
cannot remove or force saves to files owned by other users.
default permission:
file: � 666 �
folder: �777�
#umask
022
The system default umask values for Bash shell users are defined in the
/etc/profile and
/etc/bashrc files. Users can override the system defaults in their . bash_profile
and .bashrc files.
then :
========================Process
run jobs in background exemple:
Description State
#nohup commande
#getfacl filename
[Fri Dec 30 15:30:39 - omar.el_alami@psgmscadr001 ~]$ getfacl filename
# file: filename
# owner: omar.el_alami
# group: ldapusers
user::rw-
group::---
mask::---
other::---
Important
==========
To set a default ACL, you just have to add the option d after the option -m (order
does matter!). So, use setfacl -m d:g:sales:rx /data if you want group sales to
have
read and execute on everything that will ever be created in the /data directory.
If you want others not to get any permissions on anything that is created in
/data, for example, use setfacl -m d:o::- /data .
TIP ACLs
for rh7
rsyslogd:
in /etc/rsyslog.conf
$ModLoad imuxsock
$OmitLocalLogging off
In /etc/rsyslog.d/listend.conf
$SystemLogSockerName /run/systemd/journal/syslog
in /etc/rsyslog.conf
$ModLoad omjournal
*.*:omjournal:
systemd-------------->journald
process-------------->rsyslog
or --------->internal like (apache process)
# systemctl -u slapd
=============== logrotate
# cd /etc | ls -ltr
logrotate.conf logrotate.d/
# view logrotate.conf
#df -h
#dh -hs (espace utiliser)
#journalctl_COMM=su -o verbose
===============LDAP
for DNS:
server.rehatsertification.com
cn.dc.dc
for LDAP:
lisa.rehatcertification.com
cn=lisa,dc=rehatcertification,dc=com
========base context=======
#which login
#ldd /bin/login
#cd /etc/pam.d/ | ls
#vi login
senario
=====
login (libpam.so)
auth requisite (pam_ldap.so)
/etc/nslcd.conf (here the ldap server definition)
=====ssh======
#ssh -p 2022 remote_server (specify -p 2022 cause in this case listen to port 2022
insted of 22)
in remote server:
#cat /etc/ssh/sshd_config (change port, how can connect......)
authenticate with ssh key instead password: we should create public key and private
key
.ssh/id_rsa
.ssh/id_rsa.public
After copying over the public key to the remote host, it will be written to the
~/.ssh/authorized_keys file on that host
systemctl status sshd ==> This should show you that the sshd process is currently
up and running.
ssh 192.168.122.220 -l root ==>This connects to the sshd process on server2 and
opens a root shell.
As root, open the configuration file /etc/ssh/ssh_config and make sure it includes
the following line:
ForwardX11 yes
====
======shell
$ TEST=abbcd
echo $TEST
abbcd
echo ${TEST}
TEST
echo ${TEST%d}
abbc
echo ${TEST%%b}
a
===========boucle while
case "$choix" in
no) echo "negative"
;;
yes) echo "ok"
exit
;;
*) echo "pas bon choix"
exit 2
;;
esac
done
==============chiffre
#chiffre=$(($1 $3 $2))
((chiffre=$1 $3 $2))
How to register and subscribe a system to the Red Hat Customer Portal using Red Hat
Subscription-Manager
Unregistering a system
======================
# subscription-manager remove --all
# subscription-manager unregister
# subscription-manager clean
install docker:
private:
/etc/docker-registry.yml
/etc/sysconfig/docker-registry
/var/lib/docker-registry (find all docker image pull )
#docker images
exemple:
man docker-run
NB=== pour eviter la creation des images qui cause saturation d espace avec le
temps il faut utiliser :
#docker images --filter "dangling=true" ( les images updater qui peut etre
suprimer )
Pour les suprimer:
#docker rmi ${docker images -q --filter "dangling=true"}
==== editer la configuration d un container===
...
...
/etc/sysconfig/httpd (not the most important)
/etc/httpd/httpd.conf (most important)
#vi /etc/httpd/httpd.conf
DocumentRoot "/var/www/html"
#touch index.html
#vi /var/www/html/index.html
<blink>hello</blink>
#elinks http://localhost
hello
======m plusieurs hosts==== (site web)
<virtuelHost *:80>
ServerAdmin webmaster@account.example.com
DocumentRoot /web/account
ServerName account.example.com
ErrorLog logs/account.example.com-error_log
CustomLog logs/account.example.com-access_log common
</virtuelHost>
Steps:
======
192.168.22.10 account.example.com
#mkdir /web/account
#vi index.html
welcome to account site
===== vi
:%s/avant/apres/g
MBR Master boot record (fdisk) support 4 primary partition limit 2 TiB
GPT GUID Patition table (gdisk)
m : help
n :new
p: primary
e:extended
w:to save
d: to delete
q:to quit
+size { K , M , G}
exemple: +512M
Run the partprobe command with the disk device name as an argument to force a re-
read
of its partition table.
[root@serverx -]# partprobe /dev/vdb
#gdisk /dev/vdb (option same as fdisk just not for code partition )
The dump flag is used with the dump command to make a backup of the contents of the
device.
The fsck order field determines if the fsck should be run at boot time
an administrator should verify that the entry is valid by unmounting the new file
system and using mount -a, which reads /etc/fstab
create swap => with fdisk just define type partition :as 82 Linux swap.
format device:
[root@serverX -]# mkswap /dev/vdbl
Activate a swap space :
[root@serverX -]# swapon /dev/vdbl to deactive [root@serverX -]# swapoff
/dev/vdbl
Note /!/ By default, swap spaces are used in series, meaning that the first
activated swap space
will be used until it is full, then the kernel will start using the second swap
space. Swap
space priorities are displayed with swapon -s
Note /i/ Different tools will display the logical volume name using either the
traditional
name, /dev/vgname/lvname, or the kernel device mapper name, /dev/mapper/vgname-
lvname.
# mkdir /mnt/hercules
There are four steps needed to remove all logical volume components:
====================================================================
Move all data that must be kept to another file system, then use umount to unmount
the file
system.
Do not forget to remove any /etc/fstab entries associated with this file system.
Physical volumes :
[root@serverX -]# pvdisplay /dev/vda2
Volume groups:
[root@serverX -]# vgdisplay vg -alpha
Logical volumes:
[root@serverX -]# lvdisplay /dev/vg-alpha/hercules
Note: pvmove is used to relocate any physical extents used on the physical
volume to other PVs in the VG.
This is only possible if there are enough free extents in the VG and if all of
those
come from other PVs.
Use the PV device name for which the PEs will be moved as the argument to the
command.
=======racourcis clavier=====
============SELinux =========
#sestatus (display seeting)
#getenforce
#getsebool -a
# ls /ps / cp -Z (-Z to display or set Seelinux context)
#setenforce
usage : setenforce [ Enforcing I| Permissive | 1 | 0 ]
#cat /etc/selinux/config
TWO SERVERS: A B
B# ping A ==> ok
#iptables -R INPUT 1
to see :
#cat /etc/sysconfig/iptables
*Configure an NTP client and set the time via the pool.ntp.org servers.
*configure ssh to not allow root logins
*Display firewall rules from BASH for the firewalld public zone
*Use iptable to allow inbound SSH traffic
*Configure a logging server that records log messages from others hosts.
#cat /etc/ntp.conf | less (to display content )
#service ntpd start (the service should be started)
# ntpq -p (to see time server sources)
the active one begin with *
#iptables -F
#iptables -L -v
#firewall-cmd --get-zones
#firewall-cmd --get-services
#firewall-cmd --get-default-zones
#ls /ect/firewald/services
sander.xml
exercice:
#firewall-cmd --get-default-zones
home
#firewall-cmd --set-default-zones dmz
success
#firewall-cmd --permanent --add-service=ssh
success
#firewall-cmd --permanent --add-service=ntp
success
#firewall-cmd --permanent --add-service=ftp
success
#firewall-cmd --permanent --add-service=vnc-server
success
#firewall-cmd --permanent --add-service=http (for apache)
*******************crontab:
Answer: # cd /etc/syscofig/network-scripts/
# ls
# vim ifcfg-eth0 (Configure IP Address, Gateway and DNS)
IPADDR=172.24.40.40
GATEWAY=172.24.40.1
DNS1=172.24.40.1
# vim /etc/sysconfig/network
(Configure Host Name)
HOSTNAME= station.domain40.example.com
OR
Graphical Interfaces:
System->Preference->Network Connections (Configure IP Address, Gateway and DNS) Vim
/etc/sysconfig/network
(Configure Host Name)
OR
# system-config-users
Create a catalog under /home named admins. Its respective group is requested to be
the admin
group. The group users could read and write, while other users are not allowed to
access it. The
files created by users from the same group should also be the admin group.
Answer: # cd /home/
# mkdir admins /
# chown :admin admins/
# chmod 770 admins/
# chmod g+s admins/
Configure a task: plan to run echo hello command at 14:23 every day.
Answer: #
#which echo
# crontab -e
23 14 * * * /bin/echo hello
# crontab -l (Verify)
Answer: # cd /opt/
# mkdir dir
# find / -user harry -exec cp -rfp {} /opt/dir/ \;
Find the rows that contain abcde from file /etc/testfile, and write it to the
file/tmp/testfile, and the
sequence is requested as the same as /etc/testfile.
Create a user named alex, and the user id should be 1234, and the password should
be alex111.
Answer: # useradd -u 1234 alex
# passwd alex
alex111
alex111
OR
echo alex111|passwd -stdin alex
Install a FTP server, and request to anonymous download from /var/ftp/pub catalog.
(it needs you
to configure yum direct to the already existing file server. )
Answer:
# cd /etc/yum.repos.d
# vim local.repo
[local]
name=local.repo
baseurl=file:///mnt
enabled=1
gpgcheck=0
# yum makecache
# yum install -y vsftpd
# service vsftpd restart
# chkconfig vsftpd on
# chkconfig --list vsftpd
# vim /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
Answer:
# yum install -y httpd
# chkconfig httpd on
# cd /var/www/html
# wget http://ip/dir/example.html
# cp example.com index.html
# vim /etc/httpd/conf/httpd.conf
NameVirtualHost 192.168.0.254:80
<VirtualHost 192.168.0.254:80>
DocumentRoot /var/www/html/
ServerName station.domain40.example.com
</VirtualHost>
Configure the verification mode of your host account and the password as LDAP. And
it can
ldapuser40. The password is set as "password". And the certificate login
successfully through
can be downloaded from http://ip/dir/ldap.crt. After the user logs on , the user
has no host directory
unless you configure the autofs in the following questions.
Answer:
#system-config-authentication
LDAP Server: ldap//instructor.example.com (In domain form, not write IP)
OR
# yum groupinstall directory-client (1.krb5-workstation 2.pam-krb5 3.sssd)
# system-config-authentication
1.User Account Database: LDAP
2.LDAP Search Base DN: dc=example,dc=com
3.LDAP Server: ldap://instructor.example.com (In domain form, not write IP)
4.Download CA
Certificate
5.Authentication Method: LDAP password
6.Apply
getent passwd ldapuser40
Graphical Interfaces:
System-->Administration-->Date & Time
OR
# system-config-date
Change the logical volume capacity named vo from 190M to 300M. and the size of the
floating
range should set between 280 and 320. (This logical volume has been mounted in
advance.)
Answer:
# vgdisplay
(Check the capacity of vg, if the capacity is not enough, need to create pv ,
vgextend , lvextend)
# lvdisplay (Check lv)
# lvextend -L +110M /dev/vg2/lv2
# resize2fs /dev/vg2/lv2
mount -a
(Verify)
==================(Decrease lvm)
# umount /media
# fsck -f /dev/vg2/lv2
# resize2fs -f /dev/vg2/lv2 100M
# lvreduce -L 100M /dev/vg2/lv2
# mount -a
# lvdisplay (Verify)
OR
# e2fsck -f /dev/vg1/lvm02
# resize2fs -f /dev/vg1/lvm02
# mount /dev/vg1/lvm01 /mnt
# lvreduce -L 1G -n /dev/vg1/lvm02
# lvdisplay (Verify)
Create a volume group, and set 16M as a extends. And divided a volume group
containing 50
extends on volume group lv, make it as ext4 file system, and mounted automatically
under
/mnt/data.
Answer:
# groupadd -g 600 admin
Copy /etc/fstab to /var/tmp name admin, the user1 could read, write and modify it,
while user2
without any permission.
Answer:
# cp /etc/fstab /var/tmp/
# chgrp admin /var/tmp/fstab
# setfacl -m u:user1:rwx /var/tmp/fstab
# setfacl -m u:user2:--- /var/tmp/fstab
# ls -l
-rw-rw-r--+ 1 root admin 685 Nov 10 15:29 /var/tmp/fstab
=============================Exam REdhat7
To enables automatic start of a virtual machine called vm.example.com:
# virsh autostart vm.example.com
command checks that the ntpd service has already been started:
# systemctl is-active ntpd
Which command(s) to remove the user named tom, his home directory and mail spool?
# userdel -r tom
How do you write a loop in bash to display the three names foo, bar and bat?
for a in foo bar bat
do echo $a
done
How to send standard output and error to the same file, here called err?
# program >err 2>&1
Which nmcli command(s) to add the 8.8.8.8 DNS server to the static connection
called net-eth0?
Which nmcli command to change the net-eth0 IP address and default gateway
respectively to 192.168.2.10/24 and 192.168.2.1?
# nmcli con mod net-eth0 ipv4.addresses 192.168.2.10/24
# nmcli con mod net-eth0 ipv4.gateway 192.168.2.1
# nmcli con mod net-eth0 ipv4.method manual
# nmcli con up net-eth0
Which command do you use to copy the key.pub public key to the authorized_keys file
of the me user located on the server.example.com server?
# ssh-copy-id -i key.pub me@server.example.com
Which nmcli commands to ignore the DNS configuration coming with DHCP for a
connection called net-eth0?
# nmcli con mod net-eth0 ipv4.ignore-auto-dns yes
# nmcli con up net-eth0
Which command installs the vsftpd package and keeps the history updated?
# yum install /root/vsftpd-3.0.2-9.el7.x86_64.rpm
How do you put the gzip command that you just launched at the bash prompt in the
background?
CTRL-Z
# bg
* -rw,nfs4 nfsserver.example.com:/home/guests/&
Which of these commands creates a user member of the supplementary group called
team with a home directory called /opt/user?
# useradd -G team -b /opt user
How do you check that a bash script accepts only two parameters?
if [ $# -ne 2 ]; then
echo "Syntax error: 2 required parameters"
fi
Which command to copy all the files owned by tom into the /opt directory?
# find / -user tom -exec cp -p {} /opt \;
You are about to configure a http server with a working directory under /opt.
Which command do you use to assign the correct SELINUX configuration to the /opt
directory?
# semanage fcontext -a -t httpd_sys_content_t "/opt(/.*)?"
Which command sets the GRUB2 second entry as the default one?
# grub2-set-default 1
# sealert -a /var/log/audit/audit.log
Which of these commands displays the SELinux boolean list with description of each
of them?
# semanage boolean -l
Which command tells you which package (with its precise version) was installed the
most recently?
# yum history info
Which command to update the configuration without stopping any existing connection?
# firewall-cmd --reload
Which of these commands creates a volume group with physical extent size of 4MB?
# vgcreate -s 4M vg /dev/vdb
Which of these commands sets an acl with read and write permissions for user tom on
a file?
# setfacl -m u:tom:rw file
Which command to use to transfer the memo file from the local directory to a remote
server called remote.example.com as user bob?
# scp memo bob@remote.example.com:memo
Which directive do you put in the /etc/sysctl.conf file to allow a server to act as
an IPv4 router?
net.ipv4.ip_forward = 1
Which nmcli command to assign the following configuration to a new network
interface called eth0?
IP address: 192.168.1.10/24
default gateway: 192.168.1.1
# nmcli con add ifname eth0 type ethernet ip4 192.168.1.10/24 gw4 192.168.1.1
Which command to remove the user mary from a secondary group called team?
# gpasswd -d mary team
Which command to kill the httpd service and all its associated processes (CGI
scripts included)?
# systemctl kill httpd
Which command sets the GRUB2 second entry as the default one?
# grub2-set-default 1
Which of these commands extends a logical volume and its associated file system by
2GB?
# lvextend -L +2G -r /dev/vg/lv_vol
Which command to update the index database used by the locate command?
# updatedb
Which of these commands reduces a logical volume and its associated file system by
2GB?
# lvreduce -L -2G -r /dev/vg/lv_vol
Which command tells you which package (with its precise version) was installed the
most recently?
# yum history info
Which command to temporarily disable the HAProxy service from the public zone?
# firewall-cmd --remove-service=haproxy --zone=public
Which of these commands searches for a package name containing a specific command
called semanage?
# yum whatprovides */semanage
Which of these commands adds a supplementary group called team to a user named tom?
# usermod -aG team tom
Which directory is used to store the firewall configuration of the main services?
/usr/lib/firewalld/services
Due to a disk problem, you need to go in rescue mode.
Which command do you use?
# systemctl isolate rescue
===============Notes:
[root@server1 ~]# systemctl -t help
Available unit types:
service
socket
target
device
mount
automount
snapshot
timer
swap
path
slice
scope
Depending on your host operating system, you have the choice of the following
recommended native hypervisors:
#
# chmod +x /usr/local/bin/docker-machine-driver-kvm
#mkdir -p ~/bin
#cp dk-3.1.0-1-minishift-linux-amd64 ~/bin/minishift
# chmod +x ~/bin/minishift
#export PATH=$PATH:$HOME/bin
# echo 'export PATH=$PATH:$HOME/bin' >> ~ /.bashrc
$ minishift setup-cdk
https://192.168.42.215:8443
....
...
...
# virsh list
id===Name=============State
1 minishift running
add oc command to minishift:
#minishift oc-env
# vi .bashrc
export PATH="/home/user/.minishift/cache/oc/v3.9.14/linux:$PATH"
# oc version
# vi .bahsrc
export ....
export ....
export ....
# source .bashrc
# openshift console
or #
check:
https://192.168.42.215:8443
developer
developer
RHEL7 redhat.repo:
[rhel-7-server-optional-rpms]
name = Red Hat Enterprise Linux 6 Server - Optional (RPMs)
baseurl =
https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/optional/os
enabled = 1