#!/bin/bash sudo apt -y update sudo apt-get install -y apache2 cd /var/www sudo chmod -R 0777 html cd html git clone http://gitea.beetai.com/dongpd/BiFace_Server_Lite.git sudo chmod -R 0777 BiFace_Server_Lite sudo apt-get install -y libapache2-mod-php php php-common php-curl php-dev php-gd php-pear php-imagick php-mysql php-xsl php-sqlite3 php-zip echo " # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost #DocumentRoot /var/www/html DocumentRoot /var/www/html/BiFace_Server_Lite/web Options Indexes FollowSymLinks AllowOverride All Require all granted # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf # vim: syntax=apache ts=4 sw=4 sts=4 sr noet " > /etc/apache2/sites-available/000-default.conf sudo a2enmod rewrite sudo service apache2 restart sudo echo "* * * * * php /var/www/html/BiFace_Server_Lite/yii sync" >> /var/spool/cron/crontabs/root # cd /root git clone http://gitea.beetai.com/dongpd/BiFace_Server_Config_API.git sudo apt-get install -y nodejs npm sudo apt-get install -y nodejs-dev node-gyp libssl1.0-dev sudo apt install -y npm cd BiFace_Server_Config_API npm install exit 0