Skip to content

Commit

Permalink
Updated install script and nginx configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sivachidambaram. S committed Nov 6, 2015
1 parent 11bcfa7 commit 6a86331
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion restyaboard.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ server {
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "upload_max_filesize = 300M \n post_max_size=301M";
Expand Down
16 changes: 8 additions & 8 deletions restyaboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
echo "Setup script will install version ${RESTYABOARD_VERSION} and create database ${POSTGRES_DBNAME} with user ${POSTGRES_DBUSER} and password ${POSTGRES_DBPASS}. To continue enter \"y\" or to quit the process and edit the version and database details enter \"n\" (y/n)?"
read answer
case "${answer}" in
[Yy]|[Yy][eE][sS])
[Yy])

echo "Checking PHP..."
if ! hash php 2>&-; then
echo "PHP is not installed!"
echo "Do you want to install PHP (y/n)?"
read answer
case "${answer}" in
[Yy]|[Yy][eE][sS])
[Yy])
echo "Installing PHP..."
yum install -y epel-release
yum install -y php-fpm php-cli
Expand Down Expand Up @@ -57,7 +57,7 @@
echo "Do you want to install nginx (y/n)?"
read answer
case "${answer}" in
[Yy]|[Yy][eE][sS])
[Yy])
echo "Installing nginx..."
yum install -y epel-release
yum install -y zip curl cron nginx
Expand All @@ -73,7 +73,7 @@
echo "Do you want to install PostgreSQL (y/n)?"
read answer
case "${answer}" in
[Yy]|[Yy][eE][sS])
[Yy])
echo "Installing PostgreSQL..."
if [ $(getconf LONG_BIT) = "32" ]; then
yum install http://yum.postgresql.org/9.4/redhat/rhel-6.6-i386/pgdg-centos94-9.4-1.noarch.rpm
Expand All @@ -99,7 +99,7 @@
echo "Do you want to install ElasticSearch (y/n)?"
read answer
case "${answer}" in
[Yy]|[Yy][eE][sS])
[Yy])
echo "Installing ElasticSearch..."
sudo yum install java-1.7.0-openjdk -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.10.noarch.rpm
Expand Down Expand Up @@ -161,12 +161,12 @@
$dir/server/php/R/config.inc.php
sed -i "s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g" \
$dir/server/php/R/config.inc.php

echo "Setting up cron for every 5 minutes to update ElasticSearch indexing..."
echo '*/5 * * * * php $dir/server/php/R/shell/cron.php' >> /var/spool/cron/root

echo "Starting services..."
/etc/init.d/php-fpm restart
/etc/init.d/nginx restart
esac
} | tee -a restyaboard_install.log

echo "Installation completed. Please enter to exit shell script"
} | tee -a restyaboard_install.log

0 comments on commit 6a86331

Please sign in to comment.