Skip to content
This repository has been archived by the owner on Feb 4, 2018. It is now read-only.

Update Ubuntu Béta #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

ZPX_VERSION=10.1.1

# UNOfficial ZPanel Automated Installation Script
# Official ZPanel Automated Installation Script
# =============================================
#
# This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -81,7 +81,7 @@ passwordgen() {
# Display the 'welcome' splash/user warning info..
echo -e ""
echo -e "##############################################################"
echo -e "# UNOfficial ZPanel Automated Installation Script BETA 1 #"
echo -e "# Official ZPanel Automated Installation Script BETA 2 #"
echo -e "# Welcome to the Official ZPanelX Installer for Ubuntu #"
echo -e "# Server 14.04.x LTS #"
echo -e "# #"
Expand Down Expand Up @@ -155,21 +155,29 @@ echo -e ""
dpkg --get-selections

# We need to update the enabled Aptitude repositories
echo -ne "\nUpdating Aptitude Repos: " >/dev/tty
echo -ne "\nUpdating Aptitude Repos : " >/dev/tty

mkdir -p "/etc/apt/sources.list.d.save"
cp -R "/etc/apt/sources.list.d/*" "/etc/apt/sources.list.d.save" &> /dev/null
rm -rf "/etc/apt/sources.list/*"
cp "/etc/apt/sources.list" "/etc/apt/sources.list.save"
cat > /etc/apt/sources.list <<EOF
#D�pots main restricted
#D�pots main restricted

deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse

EOF

apt-get -y install software-properties-common
echo "add apache2 and php5 ppa"
add-apt-repository -y ppa:ondrej/php5 &> /dev/null
sleep 10
echo "add php5-suhosin ppa"
add-apt-repository -y ppa:andykimpe/php5-suhosin &> /dev/null
sleep 10
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4F4EA0AAE5267A6C
apt-get update


Expand All @@ -193,7 +201,7 @@ apt-get upgrade -yqq
# We disable the DPKG prompts before we run the software install to enable fully automated install.
export DEBIAN_FRONTEND=noninteractive

apt-get install -qqy at mysql-server mysql-server apache2 libapache2-mod-php5 libapache2-mod-bw php5-common php5-cli php5-mysql php5-gd php5-mcrypt php5-curl php-pear php5-imap php5-xmlrpc php5-xsl zip webalizer build-essential bash-completion dovecot-mysql dovecot-imapd dovecot-pop3d dovecot-common dovecot-managesieved dovecot-lmtpd postfix postfix-mysql libsasl2-modules-sql libsasl2-modules proftpd-mod-mysql bind9 bind9utils
apt-get install -y at mysql-server mysql-server apache2 libapache2-mod-php5 libapache2-mod-bw php5-common php5-cli php5-mysql php5-gd php5-mcrypt php5-curl php-pear php5-imap php5-xmlrpc php5-xsl zip webalizer build-essential bash-completion dovecot-mysql dovecot-imapd dovecot-pop3d dovecot-common dovecot-managesieved dovecot-lmtpd postfix postfix-mysql libsasl2-modules-sql libsasl2-modules proftpd-mod-mysql bind9 bind9utils php5-suhosin

# Generation of random passwords
password=`passwordgen`;
Expand Down Expand Up @@ -236,16 +244,16 @@ chmod +x /etc/zpanel/panel/bin/setso
cp -R /etc/zpanel/panel/etc/build/config_packs/ubuntu_12_04/. /etc/zpanel/configs
## FILES UPDATE ## ZCWORLD
#ubuntu update on the apache / sql and the default Vhost for ZPX!
wget --no-check-certificate https://raw.githubusercontent.com/zcworld/zpanelx/master/modules/apache_admin/hooks/OnDaemonRun.hook.php_u14 -O /etc/zpanel/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php
rm -f /etc/zpanel/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php /etc/zpanel/configs/zpanelx-install/sql/zpanel_core.sql /etc/zpanel/configs/apache/httpd.conf
wget --no-check-certificate https://raw.githubusercontent.com/andykimpe/zpanelx/master/modules/apache_admin/hooks/OnDaemonRun.hook.php_u14 -O /etc/zpanel/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php
wget --no-check-certificate https://raw.githubusercontent.com/zcworld/zpanelx/master/etc/build/config_packs/ubuntu_12_04/zpanelx-install/sql/zpanel_core.sql -O /etc/zpanel/configs/zpanelx-install/sql/zpanel_core.sql
wget --no-check-certificate https://github.com/zcworld/zpanelx/raw/master/etc/build/config_packs/ubuntu_12_04/apache/httpd.conf -O /etc/zpanel/configs/apache/httpd.conf
# Set server tokens (security??)
#ServerTokens Major
wget --no-check-certificate https://github.com/andykimpe/zpanelx/raw/master/etc/build/config_packs/ubuntu_12_04/apache/httpd.conf -O /etc/zpanel/configs/apache/httpd.conf
# set password after test connexion
cc -o /etc/zpanel/panel/bin/zsudo /etc/zpanel/configs/bin/zsudo.c
sudo chown root /etc/zpanel/panel/bin/zsudo
chmod +s /etc/zpanel/panel/bin/zsudo
mkdir -p /usr/lib/php5/extensions
wget --no-check-certificate https://raw.githubusercontent.com/zcworld/ZPX-installer-Beta/master/Ubuntu/14.x/PHP_5.5.9/files/suhosin.ini -O /etc/php5/apache2/conf.d/suhosin.ini
wget --no-check-certificate https://raw.githubusercontent.com/zcworld/ZPX-installer-Beta/master/Ubuntu/14.x/PHP_5.5.9/files/suhosin.so -O /usr/lib/php5/extensions/suhosin.so


# MySQL specific installation tasks...
Expand Down Expand Up @@ -343,8 +351,8 @@ serverhost=`hostname`

# Apache HTTPD specific installation tasks...
if ! grep -q "Include /etc/zpanel/configs/apache/httpd.conf" /etc/apache2/apache2.conf; then echo "Include /etc/zpanel/configs/apache/httpd.conf" >> /etc/apache2/apache2.conf; fi
sed -i 's|DocumentRoot "/var/www/html"|DocumentRoot "/etc/zpanel/panel"|' /etc/apache2/apache2.conf
sed -i 's|Include sites-enabled/||' /etc/apache2/apache2.conf
sed -i 's|DocumentRoot /var/www/html|DocumentRoot /etc/zpanel/panel|' /etc/apache2/sites-enabled/000-default.conf
sed -i 's|<Directory /var/www/>|<Directory /etc/zpanel/panel>|' /etc/apache2/apache2.conf
chown -R www-data:www-data /var/zpanel/temp/
if ! grep -q "127.0.0.1 "$fqdn /etc/hosts; then echo "127.0.0.1 "$fqdn >> /etc/hosts; fi
if ! grep -q "apache ALL=NOPASSWD: /etc/zpanel/panel/bin/zsudo" /etc/sudoers; then echo "apache ALL=NOPASSWD: /etc/zpanel/panel/bin/zsudo" >> /etc/sudoers; fi
Expand Down Expand Up @@ -420,6 +428,15 @@ service bind9 start
service proftpd start
service atd start
php /etc/zpanel/panel/bin/daemon.php
# restart service after daemon
service apache2 restart
service postfix restart
service dovecot restart
service cron restart
service mysql restart
service bind9 restart
service proftpd restart
service atd restart

# We'll now remove the temporary install cache.
cd ../
Expand Down
Loading