NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#!/bin/bash
#
echo '========================================================='
echo 'V-Smart Platform Installation Script '
echo 'ver 1.0 '
echo '========================================================='
echo
echo "Installing MySQL Server"
echo 'mysql-server-5.5 mysql-server/root_password password vsmart' | debconf-set-selections
echo 'mysql-server-5.5 mysql-server/root_password_again password vsmart' | debconf-set-selections
apt-get -y install mysql-client mysql-server-5.5

echo "Installing PHP Components"

apt-get -y install php5-mysql apache2 php5 php5-cli php5-dev php5-gd php5-curl php-apc php5-mcrypt php5-sqlite php5-mysql php5-memcached php5-intl php5-tidy libpcre3-dev unzip zip libapache2-mod-proxy-html libapache2-mod-xsendfile
apt-get -y install git
apt-get -y install nodejs
apt-get -y install npm

npm install forever express socket.io mysql -g

echo 'Installing PhalconPHP Framework PHP Extension'

srcdir=`mktemp --tmpdir -d cphalcon.XXXXXX`

# Clone the repo
git clone --depth=1 https://github.com/phalcon/cphalcon.git ${srcdir}
cd ${srcdir}

# Get our HEADs to test is an update is necessary
touch /var/phalcon-head
INSTALLED_HEAD=$(cat /var/phalcon-head)
REPO_HEAD=$(cat .git/refs/heads/master)

if [ "$INSTALLED_HEAD" == "$REPO_HEAD" ]; then
# Nothing to do here
echo
echo 'PHP extension for Phalcon is up to date'
echo
else
# Install/Update Phalcon
echo
echo 'Building Phalcon'
echo

# Run build script
cd build
./install
wait

# write ini config
if ! (php --ri phalcon &>/dev/null); then
if [ -d "/etc/php.d" ]; then #centos, etc
echo 'extension=phalcon.so' > /etc/php.d/phalcon.ini
elif [ -d "/etc/php5/mods-available" ]; then #debian-like
echo 'extension=phalcon.so' > /etc/php5/mods-available/phalcon.ini
[ -d '/etc/php5/cli' ] && ln -s /etc/php5/mods-available/phalcon.ini /etc/php5/cli/conf.d/phalcon.ini
[ -d '/etc/php5/apache2' ] && ln -s /etc/php5/mods-available/phalcon.ini /etc/php5/apache2/conf.d/phalcon.ini
[ -d '/etc/php5/fpm' ] && ln -s /etc/php5/mods-available/phalcon.ini /etc/php5/fpm/conf.d/phalcon.ini
elif [ -d "/etc/php5/conf.d" ]; then #debian-like old way
echo 'extension=phalcon.so' > /etc/php5/conf.d/phalcon.ini
else
echo 'Warning: can not find php modules config dir. You should write phalcon.ini manually' >&2
fi
fi

# Update the file that contains the installed HEAD
cd ../
cat .git/refs/heads/master > /var/phalcon-head

echo
echo 'PHP extension for Phalcon has been updated'
echo
fi

rm -rf ${srcdir}

php5enmod mcrypt phalcon curl intl

chmod -R 777 /tmp

if [ ! -h /var/www ];
then
# Add www-data to vsmart group
usermod -a -G vsmart www-data

echo
echo "Enabling Apache 2 Services"
echo
a2enmod rewrite
a2enmod headers
a2enmod proxy_http
a2enmod xsendfile
fi

# If phpmyadmin does not exist
if [ ! -f /etc/phpmyadmin/config.inc.php ];
then
echo
echo "Installing PHPMyAdmin"
echo
# Used debconf-get-selections to find out what questions will be asked
# This command needs debconf-utils
# Handy for debugging. clear answers phpmyadmin: echo PURGE | debconf-communicate phpmyadmin
echo 'phpmyadmin phpmyadmin/dbconfig-install boolean false' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/app-password-confirm password vsmart' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/mysql/admin-pass password vsmart' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/password-confirm password vsmart' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/setup-password password vsmart' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/database-type select mysql' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/mysql/app-pass password vsmart' | debconf-set-selections
echo 'dbconfig-common dbconfig-common/mysql/app-pass password vsmart' | debconf-set-selections
echo 'dbconfig-common dbconfig-common/mysql/app-pass password' | debconf-set-selections
echo 'dbconfig-common dbconfig-common/password-confirm password vsmart' | debconf-set-selections
echo 'dbconfig-common dbconfig-common/app-password-confirm password vsmart' | debconf-set-selections
echo 'dbconfig-common dbconfig-common/app-password-confirm password vsmart' | debconf-set-selections
echo 'dbconfig-common dbconfig-common/password-confirm password vsmart' | debconf-set-selections
apt-get -y install phpmyadmin
fi

# Restart apache or php5-fpm and nginx
echo
echo 'Restarting web services'
echo
service php5-fpm status &>/dev/null && service php5-fpm restart
service php-fpm status &>/dev/null && service php-fpm restart
service nginx status &>/dev/null && service nginx restart
service apache status &>/dev/null && service apache restart
service apache2 status &>/dev/null && service apache2 restart
service httpd status &>/dev/null && service httpd restart

cd /home/`whoami`

echo '========================================================='
echo
echo 'Congratulations! V-Smart Pre-Requisites installed successfully!'
echo 'You may now proceed on installing V-Smart Platform solution.'
echo
echo '========================================================='

     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.