-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathsetup-ubuntu.sh
executable file
·64 lines (48 loc) · 1.73 KB
/
setup-ubuntu.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
REL="2.5.1"
IP=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# First install all the dependencies for eyeOS 2.5.
apt-get update
apt-get -y install wget
apt-get -y install apache2
apt-get -y install mysql-server libapache2-mod-auth-mysql php5-mysql
apt-get -y install php5 libapache2-mod-php5 php5-mcrypt
# Install PHP extensions required by eyeOS
apt-get -y install php5-gd
apt-get -y install php5-curl
apt-get -y install php5-mcrypt
# Install zip, unzip, exiftool, python, python uno, etc.
apt-get -y install python
apt-get -y install zip
apt-get -y install unzip
apt-get -y install exif
apt-get -y install openoffice.org
apt-get -y install libimage-exiftool-perl
# Reload Apache2 to enable php modules
/etc/init.d/apache2 restart
# Enable mod_rewrite apache
a2enmod rewrite
/etc/init.d/apache2 restart
####### (NEEDS FIXING) Automatically create MySQL user and database for eyeos. Grant perms. ######
#
#mysql
#CREATE USER 'eyeos'@'localhost' IDENTIFIED BY 'password';
#CREATE DATABASE eyeos;
#GRANT ALL PRIVILEGES ON eyeos.* TO 'eyeos'@'localhost';
#FLUSH PRIVILEGES;
# Automatically wget and copy eyeos to www root directory; fix permissions
wget https://github.com/dhamaniasad/eyeos/archive/$REL.zip
unzip $REL.zip
rm -rf eyeos-$REL/README.md
tar xvzf eyeos-$REL/eyeos-$REL.tar.gz
rm -rf $REL.zip
rm -rf eyeos-$REL.zip
mv * /var/www/
rm -rf /var/www/index.html
chown -R www-data /var/www/
echo "To finish your installation, go to http://$IP/install"
echo "You might get warnings about SQLite Extension and PDO SQLite Driver not being installed, but you may ignore them as we are using MySQL instead of SQLite"