Skip to content

Instantly share code, notes, and snippets.

View w3servicesdotnet's full-sized avatar

W3SERVICES w3servicesdotnet

View GitHub Profile
@Trogvars
Trogvars / readme.md
Last active April 3, 2024 18:33
Centos 7 upgrade to 8, Migrate to Stream or Rocky Linux.

Doing upgrade of Centos 7 server to Centos 8. Step to step guide.

1. Migrating backup of working system to virtual guest or another server.

Preparation of test image. Boot from Centos 7 CD into troubleshoot mode and skip to shell. Prepare disks of guest machine. Make partitions and filesystems.

Sda2 - boot - ext2

Copy/ Move CyberPanel Backup Archive(s) using Bash Script with/ without Crontab/ Systemd Timer

  • NO LONGER MAINTAINED!
  • These scripts will copy/ move CyberPanel backup archive(s) from /home/domain/backup directory to a specified directory by the user.

Script Requirements

How to Use it?

  1. There are two scripts to work with. One is cpbac_a.sh another one is cpbac_m.sh. If you want to use it with crontab/ systemd timer then cpbac_a.sh is suitable for you. If you want to use it manually with prompt (running it by yourself) then cpbac_m.sh is suitable for you.
@minhazulOO7
minhazulOO7 / 0-Upgrade CyberPanel using Bash Script-readme.md
Last active October 2, 2020 04:20
A Shell Script to Upgrade CyberPanel

Upgrade CyberPanel using Bash Script

  • NO LONGER MAINTAINED!
  • This script will check for internet availability and then upgrade CyberPanel. Cyberpanel's own upgrade system is too much tedious for many users. That's why made this script.

Script Requirements

How to Use it?

Put the cpupg.sh file to anyhwere you like. E.g., /home/scripts.

  • Open terminal.
@gene1wood
gene1wood / install-duplicati-on-centos6.sh
Created January 8, 2018 06:14
How to install Duplicati on CentOS 6
# Install mono
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
yum-config-manager --add-repo http://download.mono-project.com/repo/centos6/
yum install mono-complete
# Install duplicati, ignoring dependencies
wget https://updates.duplicati.com/beta/duplicati-2.0.2.1-2.0.2.1_beta_20170801.noarch.rpm
rpm -ivh --nodeps duplicati-2.0.2.1-2.0.2.1_beta_20170801.noarch.rpm
# Create init script and enable the service
@worldadventurer
worldadventurer / change-ssh-port.sh
Last active January 15, 2024 07:13
Change SSH Port - prompts on command line for new port number
#!/bin/bash
# Copied from https://github.com/FreePBXHosting/freepbx-scripts/tree/master/sshport
#
# To run the script, login as root via SSH and run the following command:
# bash <(curl -Ls https://gist.github.com/worldadventurer/842f1a10762cba0ce27dc8f99a835377/raw)
#
#############################################
# FreePBXHosting.com - @freepbxhosting #
# VERSION 1.6 UPDATED JUN 25 2015 #
# DESC: CHANGES SSH PORT AND RESTARTS SSH #
@alrik11es
alrik11es / manage-etc-hosts.sh
Last active April 27, 2021 12:29 — forked from stvvt/manage-etc-hosts.sh
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/usr/bin/env bash
set -eu
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# PATH TO YOUR HOSTS FILE
@Repox
Repox / swap.sh
Created April 27, 2016 06:49
Shell script for adding swap to Linux
#!/bin/sh
# size of swapfile in megabytes
swapsize=1024
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
@CarsonF
CarsonF / composer.sh
Last active January 19, 2024 11:10
Global Composer Setup
#!/usr/bin/env bash
# As root
# Make config and data dirs
mkdir /etc/composer -p || exit 1
mkdir /var/lib/composer -p
# Set composer home dir to global location
cat << EOF > /etc/profile.d/composer.sh
#!/usr/bin/env bash
@mattmezza
mattmezza / vhost.sh
Last active November 30, 2023 08:30
bash script to create virtual host vhost with apache httpd and CentOs 7
#!/bin/bash
# This script is used for create virtual hosts on CentOs.
# Created by alexnogard from http://alexnogard.com
# Improved by mattmezza from http://you.canmakethat.com
# Feel free to modify it
# PARAMETERS
#
# $usr - User
# $dir - directory of web files
# $servn - webserver address without www.
@hzbd
hzbd / haproxy.config
Created May 4, 2013 17:34
Sample HAProxy config with logging.
global
pidfile /var/run/haproxy.pid
log 127.0.0.1 local0 info
ulimit-n 65536
defaults
mode http
clitimeout 600000 # maximum inactivity time on the client side
srvtimeout 600000 # maximum inactivity time on the server side