瀏覽代碼

Install web server

Bob Mottram 10 年之前
父節點
當前提交
e980b04aec
共有 1 個文件被更改,包括 20 次插入0 次删除
  1. 20
    0
      install-freedombone.sh

+ 20
- 0
install-freedombone.sh 查看文件

1359
   fi
1359
   fi
1360
 }
1360
 }
1361
 
1361
 
1362
+function install_web_server {
1363
+  if grep -Fxq "install_web_server" $COMPLETION_FILE; then
1364
+      return
1365
+  fi
1366
+  # remove apache
1367
+  apt-get -y remove --purge apache2
1368
+  if [ -d /etc/apache2 ]; then
1369
+    rm -rf /etc/apache2
1370
+  fi
1371
+  # install nginx
1372
+  apt-get -y --force-yes install nginx php5-fpm git
1373
+  # install a script to easily enable and disable nginx virtual hosts
1374
+  cd $INSTALL_DIR
1375
+  git clone https://github.com/perusio/nginx_ensite
1376
+  cd $INSTALL_DIR/nginx_ensite
1377
+  cp nginx_* /usr/sbin
1378
+  echo 'install_web_server' >> $COMPLETION_FILE
1379
+}
1380
+
1362
 function install_final {
1381
 function install_final {
1363
   if grep -Fxq "install_final" $COMPLETION_FILE; then
1382
   if grep -Fxq "install_final" $COMPLETION_FILE; then
1364
       return
1383
       return
1410
 dynamic_dns_freedns
1429
 dynamic_dns_freedns
1411
 #create_private_mailing_list
1430
 #create_private_mailing_list
1412
 import_email
1431
 import_email
1432
+install_web_server
1413
 install_final
1433
 install_final
1414
 echo 'Freedombone installation is complete'
1434
 echo 'Freedombone installation is complete'
1415
 exit 0
1435
 exit 0