commit d4593842583cadf59f39e20076d6862cf4280cf8 Author: Super User Date: Thu Feb 5 06:30:56 2026 +0200 1 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7359113 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +all: + echo OK + +install-squid: install-htop + bash install-squid.sh + +install-htop: + bash install-htop.sh + +install-docker: + bash install-docker.sh + +enable-docker: + systemctl enable --now docker diff --git a/conf/autoindex.conf b/conf/autoindex.conf new file mode 100644 index 0000000..1fe1fc5 --- /dev/null +++ b/conf/autoindex.conf @@ -0,0 +1,188 @@ +# +# Directives controlling the display of server-generated directory listings. +# +# Required modules: mod_authz_core, mod_authz_host, +# mod_autoindex, mod_alias +# +# To see the listing of a directory, the Options directive for the +# directory must include "Indexes", and the directory must not contain +# a file matching those listed in the DirectoryIndex directive. +# + +# +# IndexOptions: Controls the appearance of server-generated directory +# listings. +# +IndexOptions FancyIndexing HTMLTable VersionSort NameWidth=* + +# We include the /icons/ alias for FancyIndexed directory listings. If +# you do not use FancyIndexing, you may comment this out. +# +Alias /fancy-index/ "/var/www/fancy-index/" + + + Options Indexes MultiViews FollowSymlinks + AllowOverride None + Require all granted + + + +AddType image/svg+xml svg svgz +AddEncoding gzip svgz + +# STRONG HTACCESS PROTECTION + + order allow,deny + deny from all + + +# DIRECTORY CUSTOMIZATION + + + # SET INDEX OPTIONS + IndexOptions IgnoreCase FancyIndexing HTMLTable SuppressHTMLPreamble FoldersFirst VersionSort NameWidth=* DescriptionWidth=* XHTML IconHeight=16 IconWidth=16 + + # Other options. + # IconsAreLinks SuppressColumnSorting + + # SET DISPLAY ORDER + IndexOrderDefault Ascending Name + + IndexStyleSheet /fancy-index/style.css + + # SPECIFY HEADER FILE + HeaderName /fancy-index/header.html + + # SPECIFY FOOTER FILE + ReadmeName /fancy-index/footer.html + + # IGNORE THESE FILES + IndexIgnoreReset ON + IndexIgnore .ftpquota .DS_Store .git + + # DEFAULT ICON + DefaultIcon /fancy-index/icons/file-text.svg + + AddIcon /fancy-index/icons/back.svg .. + AddIcon /fancy-index/icons/github.svg .github + AddIcon /fancy-index/icons/nodejs.svg node_modules + AddIcon /fancy-index/icons/file-directory.svg ^^DIRECTORY^^ + + # SPECIFIC FILE ICONS + # https://github.com/file-icons/source + AddIcon /fancy-index/icons/file-binary.svg .com .exe + AddIcon /fancy-index/icons/file-code.svg .c .h .mustache .rust .source .apache .yml .jade + AddIcon /fancy-index/icons/file-media.svg .png .jpg .jpeg .webp .gif .bmp .mp4 .webm .ogv .mov .ico + AddIcon /fancy-index/icons/file-pdf.svg .pdf + AddIcon /fancy-index/icons/file-text.svg .txt .srt README readme Procfile + AddIcon /fancy-index/icons/file-zip.svg .zip .z .gz .Z .tgz .tar.gz .tar .rar + AddIcon /fancy-index/icons/gear.svg .htaccess .env .env-dev .env-production .env-staging + AddIcon /fancy-index/icons/config.svg .conf .ini .cfg .prefs + AddIcon /fancy-index/icons/less.svg .less + AddIcon /fancy-index/icons/css.svg .css + AddIcon /fancy-index/icons/html.svg .html .htm + AddIcon /fancy-index/icons/coffee.svg .coffee + AddIcon /fancy-index/icons/java.svg .java + AddIcon /fancy-index/icons/markdown.svg .markdown .md + AddIcon /fancy-index/icons/eslint.svg *.eslintignore *.eslintrc.js *.eslintrc.json *.eslintrc *.eslintrc.yml + AddIcon /fancy-index/icons/webpack.svg webpack.config.js + AddIcon /fancy-index/icons/rollup.svg rollup.config.js + AddIcon /fancy-index/icons/postcss.svg postcss.config.js *.postcssrc *.postcssrc.json *.postcssrc.js *.postcssrc.yml + AddIcon /fancy-index/icons/grunt.svg gruntfile.js Gruntfile.js + AddIcon /fancy-index/icons/gulp.svg gulpfile.js Gulpfile.js + AddIcon /fancy-index/icons/js.svg .js + AddIcon /fancy-index/icons/composer.svg composer.json composer.lock composer.phar + AddIcon /fancy-index/icons/bower.svg bower.json + AddIcon /fancy-index/icons/npm.svg package.json package-lock.json + AddIcon /fancy-index/icons/settings.svg .json + AddIcon /fancy-index/icons/mustache.svg .mustache + AddIcon /fancy-index/icons/php.svg .php + AddIcon /fancy-index/icons/python.svg .py + AddIcon /fancy-index/icons/ruby.svg .rb + AddIcon /fancy-index/icons/rust.svg .rust + AddIcon /fancy-index/icons/sass.svg .sass + AddIcon /fancy-index/icons/scss.svg .scss + AddIcon /fancy-index/icons/svg.svg .svg .svgx .eps + AddIcon /fancy-index/icons/xml.svg .xml + AddIcon /fancy-index/icons/typescript.svg .ts + AddIcon /fancy-index/icons/vue.svg .vue + AddIcon /fancy-index/icons/yarn.svg yarn.lock + AddIcon /fancy-index/icons/babel.svg *.babelrc + AddIcon /fancy-index/icons/git.svg *.gitignore *.gitattributes + AddIcon /fancy-index/icons/editor-config.svg .editorconfig + AddIcon /fancy-index/icons/shopify.svg .liquid + AddIcon /fancy-index/icons/nunjucks.svg .nunjucks + AddIcon /fancy-index/icons/pug.svg .pug + AddIcon /fancy-index/icons/adobe-photoshop.svg .psd + AddIcon /fancy-index/icons/adobe-illustrator.svg .ai + AddIcon /fancy-index/icons/stylus.svg .styl + AddIcon /fancy-index/icons/terminal.svg .sh .bash + AddIcon /fancy-index/icons/database.svg .sql .mysql .sqlite .dsql .db + AddIcon /fancy-index/icons/vagrant.svg vagrantfile Vagrantfile + AddIcon /fancy-index/icons/file-word.svg .doc .docx + AddIcon /fancy-index/icons/file-excel.svg .xls .xlsx + AddIcon /fancy-index/icons/yaml.svg .yml .yaml + AddIcon /fancy-index/icons/brainfuck.svg .b + AddIcon /fancy-index/icons/cobol.svg .cbl .cob .cpy + AddIcon /fancy-index/icons/docker.svg docker-compose.yml + AddIcon /fancy-index/icons/VirtualBox.svg .ova .vbox + + # FILE DESCRIPTIONS + AddDescription "MPEG Layer 3 Format" .mp3 + AddDescription "MPEG Layer 4 Format" .mp4 + AddDescription "SubRip subtitles format" .srt + AddDescription "GZIP compressed TAR archive" .tgz .tar.gz + AddDescription "GZIP compressed archive" .Z .z .gz .zip + AddDescription "RAR compressed archive" .rar + AddDescription "TAR compressed archive" .tar + AddDescription "ZIP compressed archive" .zip + AddDescription "Windows executable file" .exe + AddDescription "Common Gateway Interface" .cgi + AddDescription "Joint Photographics Experts Group" .jpg .jpeg .jpe + AddDescription "Graphic Interchange Format" .gif + AddDescription "Portable Network Graphic" .png + AddDescription "Vector graphic" .ps .ai .eps + AddDescription "Hypertext Markup Language" .html .shtml .htm + AddDescription "Cascading Style Sheet" .css + AddDescription "DocType Definition" .dtd + AddDescription "Extensible Markup Language" .xml + AddDescription "Win32 compressed HTML help" .chm + AddDescription "Adobe Portable Document Format" .pdf + AddDescription "Plain text file" .txt .nfo .faq .readme + AddDescription "Unix man page" .man + AddDescription "Email data" .eml .mbox + AddDescription "Microsoft Word document" .doc .docx + AddDescription "Microsoft Excel document" .xls .xlsx + AddDescription "PHP: Hypertext Preprocessor script" .php .php3 .php4 + AddDescription "PHP: Hypertext Preprocessor source code" .phps + AddDescription "JavaScript Object Notation" .json + AddDescription "JavaScript" .js + AddDescription "Java code" .java + AddDescription "Unix shell script" .sh .shar .csh .ksh .command + AddDescription "Mac OS X shell script" .command + AddDescription "Configuration file" .conf + AddDescription "Mac OS X terminal" .term + AddDescription "BitTorrent file" .torrent + AddDescription "Windows link" .lnk .url + AddDescription "Scalable Vector Graphic" .svg + AddDescription "OpenDocument Text" .odt + AddDescription "OpenDocument Spreadsheet" .ods + AddDescription "OpenDocument Presentation" .odp + AddDescription "OpenDocument Graphics" .odg + AddDescription "OpenDocument Chart" .odc + AddDescription "OpenDocument Formula" .odf + AddDescription "OpenDocument Database" .odb + AddDescription "OpenDocument Image" .odi + AddDescription "OpenDocument Text Master" .odm + AddDescription "OpenDocument Text Template" .ott + AddDescription "OpenDocument Spreadsheet Template" .ots + AddDescription "OpenDocument Presentation Template" .otp + AddDescription "OpenDocument Graphics Template" .otg + AddDescription "YAML: Yet Another Markup Language" .yaml .yml + AddDescription "SASS: Syntactically Awesome Stylesheets" .sass + AddDescription "SCSS: Sassy Cascading Style Sheet" .scss + AddDescription "Travis configuration" .travis + + # DEFAULT DESCRIPTION + # AddDescription "[Unknown item]" * + diff --git a/conf/autoindex.conf.default b/conf/autoindex.conf.default new file mode 100644 index 0000000..0e487ac --- /dev/null +++ b/conf/autoindex.conf.default @@ -0,0 +1,93 @@ +# +# Directives controlling the display of server-generated directory listings. +# +# Required modules: mod_authz_core, mod_authz_host, +# mod_autoindex, mod_alias +# +# To see the listing of a directory, the Options directive for the +# directory must include "Indexes", and the directory must not contain +# a file matching those listed in the DirectoryIndex directive. +# + +# +# IndexOptions: Controls the appearance of server-generated directory +# listings. +# +IndexOptions FancyIndexing HTMLTable VersionSort + +# We include the /icons/ alias for FancyIndexed directory listings. If +# you do not use FancyIndexing, you may comment this out. +# +Alias /icons/ "/usr/share/httpd/icons/" + + + Options Indexes MultiViews FollowSymlinks + AllowOverride None + Require all granted + + +# +# AddIcon* directives tell the server which icon to show for different +# files or filename extensions. These are only displayed for +# FancyIndexed directories. +# +AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip + +AddIconByType (TXT,/icons/text.gif) text/* +AddIconByType (IMG,/icons/image2.gif) image/* +AddIconByType (SND,/icons/sound2.gif) audio/* +AddIconByType (VID,/icons/movie.gif) video/* +AddIconByType /icons/bomb.gif application/x-coredump + +AddIcon /icons/binary.gif .bin .exe +AddIcon /icons/binhex.gif .hqx +AddIcon /icons/tar.gif .tar +AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv +AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip +AddIcon /icons/a.gif .ps .ai .eps +AddIcon /icons/layout.gif .html .shtml .htm .pdf +AddIcon /icons/text.gif .txt +AddIcon /icons/c.gif .c +AddIcon /icons/p.gif .pl .py +AddIcon /icons/f.gif .for +AddIcon /icons/dvi.gif .dvi +AddIcon /icons/uuencoded.gif .uu +AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl +AddIcon /icons/tex.gif .tex + +AddIcon /icons/back.gif .. +AddIcon /icons/hand.right.gif README +AddIcon /icons/folder.gif ^^DIRECTORY^^ +AddIcon /icons/blank.gif ^^BLANKICON^^ + +# +# DefaultIcon is which icon to show for files which do not have an icon +# explicitly set. +# +DefaultIcon /icons/unknown.gif + +# +# AddDescription allows you to place a short description after a file in +# server-generated indexes. These are only displayed for FancyIndexed +# directories. +# Format: AddDescription "description" filename +# +#AddDescription "GZIP compressed document" .gz +#AddDescription "tar archive" .tar +#AddDescription "GZIP compressed tar archive" .tgz + +# +# ReadmeName is the name of the README file the server will look for by +# default, and append to directory listings. +# +# HeaderName is the name of a file which should be prepended to +# directory indexes. +ReadmeName README.html +HeaderName HEADER.html + +# +# IndexIgnore is a set of filenames which directory indexing should ignore +# and not include in the listing. Shell-style wildcarding is permitted. +# +IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t + diff --git a/disable-selinux.sh b/disable-selinux.sh new file mode 100755 index 0000000..0993676 --- /dev/null +++ b/disable-selinux.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +setenforce 0 + +sed -i -e "s@^SELINUX=.*@SELINUX=disabled@g" /etc/selinux/config + +grubby --update-kernel ALL --args selinux=0 diff --git a/fancy-index.tar.gz b/fancy-index.tar.gz new file mode 100644 index 0000000..ba5ae91 Binary files /dev/null and b/fancy-index.tar.gz differ diff --git a/install-a-root-ca-cert.sh b/install-a-root-ca-cert.sh new file mode 100755 index 0000000..2e6e381 --- /dev/null +++ b/install-a-root-ca-cert.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +CERT_FILENAME="$1" + +if [ ! -f "${CERT_FILENAME}" ] +then + echo "Missing cert file: ${CERT_FILENAME}" + exit 1 +fi + +CERT_CHECKSUM=$(sha256sum "${CERT_FILENAME}"|awk '{ print $1}') +echo "${CERT_CHECKSUM}" +cp "${CERT_FILENAME}" "/etc/pki/ca-trust/source/anchors/${CERT_CHECKSUM}.crt" + +update-ca-trust diff --git a/install-docker.sh b/install-docker.sh new file mode 100755 index 0000000..03fdcd5 --- /dev/null +++ b/install-docker.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +dnf install curl jq -y + +dnf remove podman* -y + +dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo + +dnf remove -y runc + +dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin + +DOCKER_COMPOSE_VERSION=$( curl -s 'https://api.github.com/repos/docker/compose/releases' |jq -r .[0].tag_name) + +if [ -f "docker-compose-linux-x86_64.xz" ];then + unxz docker-compose-linux-x86_64.xz + cp -v docker-compose-linux-x86_64 /usr/bin/docker-compose +else + curl -SL "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64" -o /usr/bin/docker-compose +fi + +chmod +x /usr/bin/docker-compose + diff --git a/install-fancy-index.sh b/install-fancy-index.sh new file mode 100755 index 0000000..c5809a2 --- /dev/null +++ b/install-fancy-index.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +tar xvf fancy-index.tar.gz -C /var/www/ + +rm -fr /var/www/fancy-index/.git + + +cp -vf conf/autoindex.conf /etc/httpd/conf.d/autoindex.conf + +systemctl reload httpd diff --git a/install-freeradius.sh b/install-freeradius.sh new file mode 100755 index 0000000..ff3810a --- /dev/null +++ b/install-freeradius.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +dnf install -y epel-release +crb enable + +dnf install -y freeradius freeradius-ldap freeradius-mysql freeradius-perl freeradius-rest freeradius-sqlite freeradius-utils httpd-tools + +dnf install -y google-authenticator qrencode diff --git a/install-htop.sh b/install-htop.sh new file mode 100755 index 0000000..e7fcf6d --- /dev/null +++ b/install-htop.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +mkdir -p /root/.config/htop + +dnf install epel-release -y +crb enable +dnf install epel-release -y + +dnf install htop -y + diff --git a/install-lamp.sh b/install-lamp.sh new file mode 100755 index 0000000..c447acb --- /dev/null +++ b/install-lamp.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +dnf install -y httpd mod_ssl mariadb-server mariadb php-{common,gmp,fpm,curl,intl,pdo,mbstring,gd,xml,cli,zip,mysqli} diff --git a/install-latest-mariadb.sh b/install-latest-mariadb.sh new file mode 100755 index 0000000..941023a --- /dev/null +++ b/install-latest-mariadb.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -e +set -x + +wget "https://r.mariadb.com/downloads/mariadb_repo_setup" -O "mariadb_repo_setup" +bash mariadb_repo_setup + +dnf remove mariadb-gssapi-server mariadb-connector-c -y +dnf install MariaDB-server MariaDB-backup -y + +set +e +set +x diff --git a/install-ruby.sh b/install-ruby.sh new file mode 100755 index 0000000..1862708 --- /dev/null +++ b/install-ruby.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +dnf install -y ruby ruby-devel rubygem-irb rubygem-mysql2 diff --git a/install-squid.sh b/install-squid.sh new file mode 100755 index 0000000..149bd92 --- /dev/null +++ b/install-squid.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +REPO_FILE_URL="https://www.ngtech.co.il/repo/rocky/ngtech-squid.repo" + +wget "${REPO_FILE_URL}" -O "/etc/yum.repos.d/ngtech-squid.repo" + +dnf install epel-release -y +crb enable + +dnf install epel-release -y + +dnf install iptstate conntrack iptables-services -y + +#systemctl disable --now firewalld + +dnf install squid squid-helpers -y + +#cat </etc/sysctl.d/10-proxy.conf +#net.ipv4.ip_forward=1 +#net.ipv4.conf.all.forwarding=1 +#net.ipv4.ip_forward_use_pmtu=1 +#EOF + +#sysctl --system