Contents
1. Disable SELinux
selinux is a feature that improves auditing and security in Linux, but when it is enabled, it can be quite restrictive in how services work and what settings are available.
Therefore, in many cases, it is basically invalidated. If you build a server while looking at a website and it doesn't work as expected, it may be because this selinux is enabled.
Therefore, remember to disable it after installation.
1 |
# setenforce 0 |
If this is the case, seinux will be enabled again when the server is restarted, so to permanently disable selinux, modify the /etc/sysconfig/selinux file.
1 2 |
# vi /etc/sysconfig/selinux Change "SELINUX=enforcing" to "SELINUX=disabled |
2. Services stopped for system modernization and security measures.
2.1 system updating
1 |
# dnf -y update |
2.2 Services stopped for security measures.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# systemctl stop atd.service # systemctl disable atd.service # systemctl stop auditd.service # systemctl disable auditd.service # systemctl stop kdump.service # systemctl disable kdump.service # systemctl stop lvm2-monitor.service # systemctl disable lvm2-monitor.service # systemctl stop mdmonitor.service # systemctl disable mdmonitor.service # systemctl stop rngd.service # systemctl disable rngd.service # systemctl stop smartd.service # systemctl disable smartd.service # systemctl stop tuned.service # systemctl disable tuned.service # systemctl stop dm-event.socket # systemctl disable dm-event.socket |
3. Adding Repositories
Utilization Method
PowerTools and HighAvailability can be used by updating miraclelinux-repos and enabling the repositories.
Update miraclelinux-repos to 8.4-3.el8 or later.
After the update, the following repository files will be added to /etc/yum.repos.d.
miraclelinux-powertools.repo
miraclelinux-highavailability.repo
1 |
# dnf update miraclelinux-repos |
1 2 |
# dnf config-manager --set-enabled 8-latest-PowerTools # dnf module enable javapackages-tools:201801 |
※ If you want to install istack-commons provided by PowerTools, you need to enable the javapackages-tools module manually beforehand.
Since istack-commons is also a necessary package for the installation of the "MIRACLE LINUX PowerTools" group, we will also activate the javapackages-tools module after activating the PowerTools repository.
②HighAvailability can be used by enabling the repository as follows
1 |
# dnf config-manager --set-enabled 8-latest-HighAvailability |
1 |
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm |
epel.repo
epel-modular.repo
epel-playground.repo
epel-testing-modular.repo
epel-testing.repo
php5.6 php7.0 php7.1 php7.2 php7.3 php7.4 php8.0 php8.1
1 |
# dnf install http://rpms.remirepo.net/enterprise/remi-release-8.rpm |
remi.repo
remi-modular.repo
remi-safe.repo
4. Setting Vim
1 |
# dnf -y install vim-enhanced |
1 2 3 |
# vi ~/.bashrc ●Add an alias to the last line. alias vi='vim' |
1 |
# source ~/.bashrc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# vi ~/.vimrc " Use your own extensions to vim (not compatible with vi) set nocompatible " Specify the character encoding set encoding=utf-8 " Specify file encoding (read from top to bottom until success) set fileencodings=utf-8,iso-2022-jp,sjis,euc-jp " Specify the line feed code to be recognized automatically. set fileformats=unix,dos " Get a backup set backup " Specify the directory to get the backup set backupdir=~/backup " Number of generations to keep search history set history=50 " Search is not case-sensitive. set ignorecase " If you mix capital letters in search terms, the search will distinguish between capital letters. set smartcase " Highlight words that match the search term. set hlsearch " Use incremental search (start searching for matching strings at any time while entering search terms) set incsearch " Display line numbers set number " Visualize line breaks ( $ ) and tabs ( ^I ) set list " Emphasize the corresponding parentheses when entering parentheses set showmatch " Don't put a newline at the end of a file set binary noeol " Enable auto-indent. set autoindent "Color coding for each syntax syntax on "Change the color of the comment text when syntax on highlight Comment ctermfg=LightCyan "Wrap lines by window width set wrap |