This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tech:linux:centos:start [2020/02/14 17:54] rk4n3 |
tech:linux:centos:start [2022/01/31 17:14] (current) rk4n3 |
||
---|---|---|---|
Line 35: | Line 35: | ||
* yum install gcc-c++ | * yum install gcc-c++ | ||
* yum install mariadb-devel | * yum install mariadb-devel | ||
+ | * yum install centos-release-scl | ||
==== If VirtualBox VM Guest ==== | ==== If VirtualBox VM Guest ==== | ||
Line 59: | Line 60: | ||
==== If using ZFS ==== | ==== If using ZFS ==== | ||
See [[https://github.com/zfsonlinux/zfs/wiki/RHEL-and-CentOS|official documentation]] for further details | See [[https://github.com/zfsonlinux/zfs/wiki/RHEL-and-CentOS|official documentation]] for further details | ||
- | * ''yum install epel-release -y'' | + | * ''dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm'' |
* ''yum install kernel-devel'' | * ''yum install kernel-devel'' | ||
* ''yum install http://download.zfsonlinux.org/epel/zfs-release.el7_4.noarch.rpm'' | * ''yum install http://download.zfsonlinux.org/epel/zfs-release.el7_4.noarch.rpm'' | ||
Line 92: | Line 93: | ||
* java-1.8.0-openjdk-devel | * java-1.8.0-openjdk-devel | ||
* gd-devel | * gd-devel | ||
+ | |||
+ | |||
+ | ==== Update a specific repository ==== | ||
+ | ''yum --disablerepo="*" --enablerepo="epel" update'' | ||
+ | |||
==== Enable TCP listen for X ==== | ==== Enable TCP listen for X ==== | ||
// ... to be added ... // | // ... to be added ... // | ||
+ | |||
==== Add firewall rule for HTTP ==== | ==== Add firewall rule for HTTP ==== | ||
Line 107: | Line 114: | ||
hostnamectl set-hostname Your-New-Host-Name-Here --transient</code> | hostnamectl set-hostname Your-New-Host-Name-Here --transient</code> | ||
- | ==== ulimits ==== | + | ==== ulimit ==== |
In ''/etc/security/limits.conf'', create a file like ''20-nofile.conf'': | In ''/etc/security/limits.conf'', create a file like ''20-nofile.conf'': | ||
<code> | <code> | ||
- | * soft nofile 8192 | + | * hard nofile 4096 |
- | * hard nofile 8192 | + | * soft nofile 1024 |
+ | @users soft nofile 2048 | ||
+ | rk4n3 hard nofile 81920 | ||
+ | rk4n3 soft nofile 8192 | ||
</code> | </code> | ||
------ | ------ | ||
===== Some Application Trivia ===== | ===== Some Application Trivia ===== | ||
+ | |||
+ | ==== Routine CLI ==== | ||
+ | * Duplicate SElinux attributes: ''chcon %%--%%reference=oldfileordir newfileordir'' | ||
+ | * Update from specific repo only: ''yum %%--%%disablerepo="*" %%--%%enablerepo="my-repo" update'' | ||
+ | |||
==== rsyslog & logrotate ==== | ==== rsyslog & logrotate ==== | ||
* In ''/etc/rsyslog.d/yourapp.conf''<code> | * In ''/etc/rsyslog.d/yourapp.conf''<code> | ||
Line 161: | Line 176: | ||
===== Some Issues -> Solutions ===== | ===== Some Issues -> Solutions ===== | ||
+ | |||
+ | ==== Raw network/socket access ==== | ||
+ | * Allow a program (i.e. ''/usr/bin/ping''): ''setcap cap_net_raw+p /path/to/command'' | ||
+ | |||
+ | ==== systemd journal ==== | ||
+ | * Clear out journal(s): ''journalctl -m --vacuum-time=1s'' | ||
+ | |||
==== Upgrading ==== | ==== Upgrading ==== | ||
CentOS will typically require accepting license agreement (again) after a significant upgrade. \\ | CentOS will typically require accepting license agreement (again) after a significant upgrade. \\ |