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

Commit

Permalink
融合install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirito committed Oct 22, 2016
1 parent b21cf4e commit ae93607
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 57 deletions.
60 changes: 56 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,63 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#Install Nginx via Oneinstack(https://github.com/lj2007331/oneinstack)
cd /root
wget http://mirrors.linuxeye.com/oneinstack.tar.gz && tar -xf oneinstack.tar.gz && cd oneinstack/
rm -rf install.sh && wget http://download.ipatrick.cn/ghost/install.sh && chmod +x install.sh
./install.sh
#rm -rf install.sh && wget http://download.ipatrick.cn/ghost/install.sh && chmod +x install.sh
#./install.sh


# get pwd
sed -i "s@^oneinstack_dir.*@oneinstack_dir=`pwd`@" ./options.conf

. ./versions.txt
. ./options.conf
. ./include/color.sh
. ./include/check_os.sh
. ./include/check_dir.sh
. ./include/download.sh
. ./include/get_char.sh

# Check if user is root
[ $(id -u) != "0" ] && { echo "${CFAILURE}Error: You must be root to run this script${CEND}"; exit 1; }

mkdir -p $wwwroot_dir/default $wwwlogs_dir
[ -d /data ] && chmod 755 /data


# get the IP information
IPADDR=`./include/get_ipaddr.py`
PUBLIC_IPADDR=`./include/get_public_ipaddr.py`
IPADDR_COUNTRY_ISP=`./include/get_ipaddr_state.py $PUBLIC_IPADDR`
IPADDR_COUNTRY=`echo $IPADDR_COUNTRY_ISP | awk '{print $1}'`
[ "`echo $IPADDR_COUNTRY_ISP | awk '{print $2}'`"x == '1000323'x ] && IPADDR_ISP=aliyun

# check download src
. ./include/check_download.sh
checkDownload 2>&1 | tee $oneinstack_dir/install.log

# init
. ./include/memory.sh
if [ "$OS" == 'CentOS' ];then
. include/init_CentOS.sh 2>&1 | tee -a $oneinstack_dir/install.log
[ -n "`gcc --version | head -n1 | grep '4\.1\.'`" ] && export CC="gcc44" CXX="g++44"
elif [ "$OS" == 'Debian' ];then
. include/init_Debian.sh 2>&1 | tee -a $oneinstack_dir/install.log
elif [ "$OS" == 'Ubuntu' ];then
. include/init_Ubuntu.sh 2>&1 | tee -a $oneinstack_dir/install.log
fi



. include/nginx.sh
Install_Nginx 2>&1 | tee -a $oneinstack_dir/install.log

# index example
. include/demo.sh
DEMO 2>&1 | tee -a $oneinstack_dir/install.log


mkdir /usr/local/nginx/conf/vhost/
cd /root

#Clean useless things.
rm -rf /root/oneinstack-1.4
rm -rf /root/V1.4.tar.gz
rm -rf /root/oneinstack
rm -rf /root/oneinstack.tar.gz
53 changes: 0 additions & 53 deletions installoneinstack.sh

This file was deleted.

0 comments on commit ae93607

Please sign in to comment.