-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlinode-stackscript-centos-webpanel.txt
41 lines (33 loc) · 1.24 KB
/
linode-stackscript-centos-webpanel.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# This is a Linode StackScript for CentOS Web Panel setup on CentOS 7.
# The GitHub location: https://github.com/davisdre/Linode-StackScript-Centos-WebPanel
#
#
# This block defines the variables the user of the script needs to input
# when deploying using this script.
#
#<UDF name="hostname" label="The hostname for the new Linode.">
# HOSTNAME=
#
#<UDF name="fqdn" label="The new Linode's Fully Qualified Domain Name">
# FQDN=
# This sets the variable $IPADDR to the IP address the new Linode receives.
IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')
# This updates the packages on the system from the distribution repositories.
yum -y update
# This section sets the hostname.
hostnamectl set-hostname $HOSTNAME
# This section sets the Fully Qualified Domain Name (FQDN) in the hosts file.
echo $IPADDR $FQDN $HOSTNAME >> /etc/hosts
# Centos Web Panel - Preparing Server
yum -y install wget
# Centos Web Panel - Server Update
yum -y update
# Centos Web Panel - MARIA-DB 10-latest
cd /usr/local/src
wget http://centos-webpanel.com/cwp-latest
sh cwp-latest
# Centos Web Panel - Installation
cd /usr/local/src
wget http://centos-webpanel.com/cwp-el7-latest
sh cwp-el7-latest