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
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
/home/domain/backup
directory to a specified directory by the user.Put the cpupg.sh
file to anyhwere you like. E.g., /home/scripts
.
# 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 |
#!/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 # |
#!/usr/bin/env bash | |
set -eu | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# PATH TO YOUR HOSTS FILE |
#!/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 |
#!/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. |
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 |
# | |
# Apache/PHP/Drupal settings: | |
# | |
# Protect files and directories from prying eyes. | |
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$"> | |
Order allow,deny | |
</FilesMatch> | |
# Don't show directory listings for URLs which map to a directory. |