Skip to content

Instantly share code, notes, and snippets.

@tavy315
Last active February 6, 2020 20:36
Show Gist options
  • Save tavy315/fe2b5d3fb1354ccb573db36dd249ff82 to your computer and use it in GitHub Desktop.
Save tavy315/fe2b5d3fb1354ccb573db36dd249ff82 to your computer and use it in GitHub Desktop.
CentOS Utils
# PICO
yum -y install nano
ln -s /usr/bin/nano /usr/bin/pico
export EDITOR="pico"
# NTP
dnf install chrony
systemctl start chronyd
systemctl status chronyd
systemctl enable chronyd
#FirewallD
dnf install firewalld
#Apache
dnf install httpd mod_ssl mod_http2 httpd-tools httpd-filesystem
systemctl enable httpd
systemctl start httpd
#Hide the Server Version and OS from httpd.conf
ServerTokens Prod
ServerSignature Off
#Disable the HTTP TRACE Method from httpd.conf
TraceEnable Off
#PHP 7.4
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module reset php
dnf module install php:remi-7.4
yum update
dnf install php-bcmath php-gd php-intl php-opcache php-pecl-zip php-pear php-pdo php-mysqlnd php-cli php-process php-pecl-mcrypt php-zts
#Hide PHP Version (X-Powered-By) from php.ini
expose_php = Off
#MariaDB
sudo tee /etc/yum.repos.d/MariaDB.repo<<EOF
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos8-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
sudo dnf install boost-program-options
sudo dnf install MariaDB-server MariaDB-client --disablerepo=AppStream
sudo systemctl enable --now mariadb
sudo systemctl status mariadb
sudo mysql_secure_installation
#certbot
sudo dnf install certbot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment