forked from szepeviktor/debian-server-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fa9455
commit 8bc78ed
Showing
13 changed files
with
144 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Fastly mirror | ||
deb http://cdn-fastly.deb.debian.org/debian jessie main contrib non-free | ||
|
||
# Security updates | ||
deb http://security.debian.org/ jessie/updates main contrib non-free | ||
|
||
# Updates | ||
deb http://cdn-fastly.deb.debian.org/debian jessie-updates main contrib non-free | ||
|
||
# Backports | ||
deb http://cdn-fastly.deb.debian.org/debian jessie-backports main contrib non-free |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
# Packet: http://mirror.ewr1.packet.net/debian | ||
# Linode: http://mirrors.linode.com/debian | ||
# OVH: http://debian.mirrors.ovh.net/debian | ||
# server4you: http://debian.intergenia.de/debian | ||
# PCextreme: http://debian.apt-get.eu/debian | ||
# Closest mirror: http://http.debian.net/debian | ||
# National mirror: http://ftp.COUNTRY-CODE.debian.org/debian | ||
# Fastest mirror: netselect-apt -c de stable | ||
deb @@MIRROR@@ jessie main contrib non-free | ||
# Packet: http://mirror.ewr1.packet.net/debian | ||
# Linode: http://mirrors.linode.com/debian | ||
# OVH: http://debian.mirrors.ovh.net/debian | ||
# server4you: http://debian.intergenia.de/debian | ||
# PCextreme: http://debian.apt-get.eu/debian | ||
# Fastly/CloudFront: http://deb.debian.org/debian | ||
# Closest mirror: http://http.debian.net/debian | ||
# National mirror: http://ftp.COUNTRY-CODE.debian.org/debian | ||
# Fastest mirror: netselect-apt -c de stable | ||
deb @@MIRROR@@ stable main contrib non-free | ||
|
||
# Security | ||
deb http://security.debian.org/ jessie/updates main contrib non-free | ||
# Security updates | ||
deb http://security.debian.org/ stable/updates main contrib non-free | ||
|
||
# Updates | ||
# (previously known as 'volatile') | ||
deb @@MIRROR@@ jessie-updates main contrib non-free | ||
deb @@MIRROR@@ stable-updates main contrib non-free | ||
|
||
# Backports | ||
# http://backports.debian.org/changes/jessie-backports.html | ||
deb @@MIRROR@@ jessie-backports main contrib non-free | ||
# http://backports.debian.org/changes/stable-backports.html | ||
deb @@MIRROR@@ stable-backports main contrib non-free |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<h3><a name="ZZ">World-wide</a></h3> | ||
Site: <tt>mirror</tt><br> | ||
Type: leaf | ||
<br>Packages over HTTP: <tt><a rel="nofollow" href="@@MIRROR@@">/debian/</a> | ||
</tt><br>Includes architectures: amd64 i386 | ||
<br>Update frequency: once a day | ||
<br><br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# Create mirror list for netselect-apt | ||
cat mirror-urls.txt | xargs -I % bash -c "sed -e 's|@@MIRROR@@|%|' mirror-list.tpl" > netselect-apt.infile | ||
|
||
# Select best mirror | ||
netselect-apt --infile netselect-apt.infile | ||
rm -f netselect-apt.infile sources.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
http://mirror.ewr1.packet.net/debian | ||
http://mirrors.linode.com/debian | ||
http://debian.mirrors.ovh.net/debian | ||
http://debian.intergenia.de/debian | ||
http://debian.apt-get.eu/debian | ||
http://deb.debian.org/debian | ||
http://http.debian.net/debian | ||
http://ftp.debian.org/debian | ||
http://ftp.hu.debian.org/debian | ||
http://ftp.de.debian.org/debian | ||
http://ftp.cz.debian.org/debian | ||
http://cdn-fastly.deb.debian.org/debian | ||
http://cdn-aws.deb.debian.org/debian | ||
http://cloudfront.debian.net/debian | ||
http://debian-archive.trafficmanager.net/debian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
# | ||
# nano upcloud-init.sh | ||
# | ||
# bash -x upcloud-init.sh | ||
|
||
# http://deb.debian.org/debian/pool/contrib/g/geoip-database-contrib/ | ||
GEOIP_VERSION="1.19" | ||
|
||
Auto_country() { | ||
apt-get clean | ||
apt-get update | ||
apt-get install -qq -y geoip-bin netselect-apt | ||
wget -nv "http://deb.debian.org/debian/pool/contrib/g/geoip-database-contrib/geoip-database-contrib_${GEOIP_VERSION}_all.deb" | ||
dpkg -i geoip-database-contrib_*_all.deb | ||
|
||
IP="$(ifconfig|sed -ne '0,/^\s*inet addr:\([0-9\.]\+\)\b.*$/s//\1/p')" | ||
test -n "$IP" | ||
COUNTRY="$(geoiplookup -f /usr/share/GeoIP/GeoIP.dat "$IP"|sed -ne 's|^GeoIP Country Edition: \(..\),.*$|\1|p')" | ||
test -n "$COUNTRY" | ||
netselect-apt -c "$COUNTRY" stable | ||
MIRROR="$(sed -ne '0,/^deb \(http\S\+\) .*$/s//\1/p' sources.list)" | ||
test -n "$MIRROR" | ||
rm -f geoip-database-contrib_*_all.deb sources.list | ||
|
||
wget -nv -O- "https://github.com/szepeviktor/debian-server-tools/raw/master/package/apt-sources/sources.list" \ | ||
| sed -e "s|@@MIRROR@@|${MIRROR}|" > /etc/apt/sources.list | ||
} | ||
|
||
set -e | ||
|
||
# Change to home directory | ||
cd || exit 100 | ||
|
||
# LeaseWeb sources | ||
wget -nv -O /etc/apt/sources.list \ | ||
"https://github.com/szepeviktor/debian-server-tools/raw/master/package/apt-sources/jessie-for-upcloud.list" | ||
#Auto_country | ||
|
||
apt-get clean | ||
apt-get update | ||
# Prevent kernel update | ||
#apt-mark hold linux-image-amd64 "linux-image-[0-9].*-amd64" | ||
apt-get dist-upgrade -y | ||
|
||
# docker | ||
apt-get install -qq -y apt-transport-https | ||
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 2C52609D | ||
echo "deb https://apt.dockerproject.org/repo debian-jessie main" \ | ||
> /etc/apt/sources.list.d/docker.list | ||
apt-get update | ||
apt-get install -qq -y docker-engine | ||
docker version | ||
|
||
# pip | ||
apt-get install -qq -y python3-dev | ||
wget -nv "https://bootstrap.pypa.io/get-pip.py" | ||
python3 get-pip.py | ||
pip3 --version | ||
rm -f get-pip.py | ||
|
||
echo "OK." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters