[root@DBsrv ~]# ll
1d
2rwx
3r-x
4r-x
파일/디렉터리의 허가 수준을 변경할 수 있는 명령어
chmod u|g|o +|- 권한종류
ex) chmod o+r ttd.cnf
[root@DBsrv ~]# touch test
[root@DBsrv ~]# ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
…
-rw-r--r--. 1 root root 0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos
[root@DBsrv ~]# chmod g+w test
[root@DBsrv ~]# ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
…
-rw-rw
-r--. 1 root root 0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos
[root@DBsrv ~]# chmod o-r test
[root@DBsrv ~]# ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
…
-rw-rw--
--. 1 root root 0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos
chmod 777 대상파일
[root@DBsrv ~]# chmod 755 test
[root@DBsrv ~]# ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
…
-rwxr-xr-x
. 1 root root 0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos
[root@DBsrv ~]# ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
…
-rwxr-xr-x. 1 root
root
0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos.
파일/디렉터리에 대한 권한은 대상이 소유자/그룹/그외사용자로 정해져 있으므로 필요한 권한에 따라 필요하다면 적절하게 소유권한을 변경해야 할 경우도 있음.
파일/디렉터리의 소유권을 변경하는 명령어
chown 계정명 파일명
[root@DBsrv ~]# ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
…
-rwxr-xr-x. 1 root
root 0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos
chown oracle test
ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Desktop
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Documents
drwxr-xr-x. 2 root root 53 Dec 15 03:13 Downloads
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Music
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Pictures
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Public
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Templates
-rwxr-xr-x. 1 oracle
root 0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos
파일/디렉터리의 그룹을 변경하는 명령어
chgrp 그룹명 파일명
[root@DBsrv ~]# ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
…
-rwxr-xr-x. 1 oracle root
0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos
[root@DBsrv ~]# chgrp oinstall test
[root@DBsrv ~]# ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
…
-rwxr-xr-x. 1 oracle oinstall
0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos
chown 소유자.그룹 파일명
test 파일의 소유자/그룹을 root로 변경
[root@DBsrv ~]# chown root.root test
[root@DBsrv ~]# ll
total 4
-rw-------. 1 root root 1351 Dec 15 02:36 anaconda-ks.cfg
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Desktop
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Documents
drwxr-xr-x. 2 root root 53 Dec 15 03:13 Downloads
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Music
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Pictures
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Public
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Templates
-rwxr-xr-x. 1 root
root
0 Dec 30 15:03 test
drwxr-xr-x. 2 root root 6 Dec 15 03:11 Videos
rpm -Uvh 패키지명.rpm
-U(대문자)
: 기존 설치된 동일 패키지가 없는 경우 새로 설치를 진행, 동일 패키지가 있는 경우 이를 업그레이드하여 설치를 진행해주는 옵션
v
: 설치 과정을 출력
h
: 화면의 하단에 설치 진행도 바를 표시해주는 옵션
rpm -e 패키지명
e
: 패키지를 삭제할 때 사용하는 옵션
패키지 명으로 현재 설치된 패키지 조회
[root@DBsrv ~]# rpm -qa mysql*
mysql80-community-release-el7-7.noarch
mysql-community-server-8.0.31-1.el7.x86_64
mysql-community-client-plugins-8.0.31-1.el7.x86_64
mysql-community-client-8.0.31-1.el7.x86_64
mysql-community-libs-8.0.31-1.el7.x86_64
mysql-community-libs-compat-8.0.31-1.el7.x86_64
mysql-community-common-8.0.31-1.el7.x86_64
mysql-community-icu-data-files-8.0.31-1.el7.x86_64
[root@DBsrv ~]# rpm -qa *jdk*
java-1.7.0-openjdk-headless-1.7.0.261-2.6.22.2.el7_8.x86_64
java-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64
java-1.8.0-openjdk-headless-1.8.0.352.b08-2.el7_9.x86_64
copy-jdk-configs-3.3-11.el7_9.noarch
java-1.8.0-openjdk-1.8.0.352.b08-2.el7_9.x86_64
[root@DBsrv ~]# rpm -qi mysql-community-server-8.0.31-1.el7.x86_64
Name : mysql-community-server
Version : 8.0.31
Release : 1.el7
Architecture: x86_64
Install Date: Thu 15 Dec 2022 03:17:48 AM KST
Group : Applications/Databases
Size : 308783250
License : Copyright (c) 2000, 2022, Oracle and/or its affiliates. Under GPLv2 license as shown in the Description field.
Signature : RSA/SHA256, Wed 14 Sep 2022 05:31:50 PM KST, Key ID 467b942d3a79bd29
Source RPM : mysql-community-8.0.31-1.el7.src.rpm
Build Date : Wed 14 Sep 2022 04:18:01 AM KST
Build Host : pb2-el7-20.regionaliad02.mysql2iad.oraclevcn.com
Relocations : (not relocatable)
Packager : MySQL Release Engineering <mysql-build@oss.oracle.com>
Vendor : Oracle and/or its affiliates
URL : http://www.mysql.com/
Summary : A very fast and reliable SQL database server
Description :
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. MySQL Server
is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of
Oracle and/or its affiliates
The MySQL software has Dual Licensing, which means you can use the MySQL
software free of charge under the GNU General Public License
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
licenses from Oracle and/or its affiliates if you do not wish to be bound by the terms of
the GPL. See the chapter "Licensing and Support" in the manual for
further info.
The MySQL web site (http://www.mysql.com/) provides the latest news and
information about the MySQL software. Also please see the documentation
and the manual for more information.
This package includes the MySQL server binary as well as related utilities
to run and administer a MySQL server.
yum install 패키지명 -y
yum install rpm패키지.rpm
yum update 패키지명 -y
yum remove 패키지명
yum info 패키지명
yum info mysql-community-server-8.0.31-1.el7.x86_64
[root@DBsrv ~]# yum grouplist
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* epel: mirror-jp.misakamikoto.network
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Installed Environment Groups:
GNOME Desktop
Available Environment Groups:
Minimal Install
Compute Node
Infrastructure Server
File and Print Server
Cinnamon Desktop
MATE Desktop
Basic Web Server
Virtualization Host
Server with GUI
KDE Plasma Workspaces
Development and Creative Workstation
Available Groups:
Cinnamon
Compatibility Libraries
Console Internet Tools
Development Tools
Educational Software
Electronic Lab
Fedora Packager
General Purpose Desktop
Graphical Administration Tools
Haskell
LXQt Desktop
Legacy UNIX Compatibility
MATE
Milkymist
Scientific Support
Security Tools
Smart Card Support
System Administration Tools
System Management
TurboGears application framework
Xfce
Done
yum groupinstall "패키지그룹명"
[root@DBsrv ~]# yum clean all