forked from qupb/oneindex
-
Notifications
You must be signed in to change notification settings - Fork 93
/
install.sh
25 lines (20 loc) · 842 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
apt-get update
apt-get install -y spawn-fcgi libfcgi0ldbl fcgiwrap p7zip-full nginx
apt-get install -y php5 php5-cgi php5-curl
#apt-get install -y redis-server php5-redis
wget https://github.com/0oVicero0/oneindex/archive/master.zip
7z x master.zip -o/tmp
mv -f /tmp/oneindex-master /var/www/oneindex
chmod -R 755 /var/www/oneindex
[ -d /etc/nginx.bak -a ! -d /etc/nginx.bak0 ] && mv -f /etc/nginx.bak /etc/nginx.bak0
[ -d /etc/nginx ] && cp -raf /etc/nginx /etc/nginx.bak
cp -raf /var/www/oneindex/nginx/* /etc/nginx
ln -sf /etc/nginx/fcgiwrap-php /etc/init.d/fcgiwrap-php
update-rc.d -f fcgiwrap-php defaults
chown -R www-data:www-data /var/www/oneindex
rm -rf /var/www/oneindex/nginx
rm -rf /var/www/oneindex/README*
rm -rf /var/www/oneindex/install.sh
bash /etc/init.d/fcgiwrap-php restart
bash /etc/init.d/nginx restart