User Tools

Site Tools


tech:linux:centos:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tech:linux:centos:start [2019/10/14 21:41]
rk4n3
tech:linux:centos:start [2022/01/31 17:14] (current)
rk4n3
Line 12: Line 12:
     * Set ''​repo_ca_cert''​ to: ''​%(ca_cert_dir)sredhat-uep.pem''​     * Set ''​repo_ca_cert''​ to: ''​%(ca_cert_dir)sredhat-uep.pem''​
     * Set ''​full_refresh_on_yum''​ to: ''​0''​     * Set ''​full_refresh_on_yum''​ to: ''​0''​
-  * Enabling repositories +  * Enabling repositories:<​code>​ 
-    * ''​subscription-manager list --available''​ +subscription-manager list --available 
-    * ''​subscription-manager attach --pool=pool_id''​ +subscription-manager attach --pool=pool_id 
-    * ''​subscription-manager list --consumed''​ +subscription-manager list --consumed 
-    * ''​subscription-manager repos --list''​ +subscription-manager repos --list 
-    * ''​subscription-manager repos --enable repository''​+subscription-manager repos --enable repository</​code>​
  
 ===== Details to intialize for a new instance ===== ===== Details to intialize for a new instance =====
Line 25: Line 25:
  
 ==== If Starting with a Minimal Install ==== ==== If Starting with a Minimal Install ====
-  * yum install wget rsync git vim xterm gvim dejavu-sans-mono-fonts+  * yum install ​-y wget rsync git vim curl bzip2 zip unzip xz sharutils 
 +  * yum install -y xterm gvim dejavu-sans-mono-fonts
   * yum install java-1.8.0-openjdk-devel   * yum install java-1.8.0-openjdk-devel
   * yum groupinstall "X Window System"​   * yum groupinstall "X Window System"​
Line 34: 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 ====
 +  * ''​yum install gcc make perl kernel-devel''​
 +  * Install the VirtualBox Guest Additions
 +  * Shared folder mounted like: ''​mount -t vboxsf -o uid=1000,​gid=1000 sharename /​home/​you/​some/​folder''​
  
 ==== If using Docker ==== ==== If using Docker ====
Line 53: 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 86: 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 100: Line 113:
 hostnamectl set-hostname Your-New-Host-Name-Here --static hostnamectl set-hostname Your-New-Host-Name-Here --static
 hostnamectl set-hostname Your-New-Host-Name-Here --transient</​code>​ hostnamectl set-hostname Your-New-Host-Name-Here --transient</​code>​
 +
 +==== ulimit ====
 +In ''/​etc/​security/​limits.conf'',​ create a file like ''​20-nofile.conf'':​
 +<​code>​
 +*        hard    nofile ​   4096
 +*        soft    nofile ​   1024
 +@users ​  ​soft ​   nofile ​   2048
 +rk4n3    hard    nofile ​   81920
 +rk4n3    soft    nofile ​   8192
 +</​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 ====
 +  * In ''/​etc/​rsyslog.d/​yourapp.conf''<​code>​
 +# Separate yourapp logging into its own file
 +if $programname == '​yourapp'​ then /​var/​log/​yourapp.log
 +& stop</​code>​
 +  * In ''/​etc/​logrotate.d/​yourapp'':<​code>​
 +/​var/​log/​yourapp.log {
 +  missingok
 +  weekly
 +  size 2G
 +  copytruncate
 +  rotate 12
 +  notifempty
 +}</​code>​
 +
 ==== Wildfly ==== ==== Wildfly ====
   * Wildfly likes to live at ''/​opt/​wildfly'',​ so create a symbolic link at that location to the actual installation directory   * Wildfly likes to live at ''/​opt/​wildfly'',​ so create a symbolic link at that location to the actual installation directory
Line 133: 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. \\
tech/linux/centos/start.1571107290.txt.gz · Last modified: 2019/10/14 21:41 by rk4n3