[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 #********************************************************************************* 2 # The contents of this file are subject to the vtiger CRM Public License Version 1.0 3 # ("License"); You may not use this file except in compliance with the License 4 # The Original Code is: vtiger CRM Open Source 5 # The Initial Developer of the Original Code is vtiger. 6 # Portions created by vtiger are Copyright (C) vtiger. 7 # All Rights Reserved. 8 # 9 # ******************************************************************************** 10 11 cd .. 12 export VTIGER_HOME=`pwd` 13 echo "***************************************************************************************************" 14 echo vtigerCRM home: `pwd` 15 echo "**************************************************************************************************" 16 17 mysql_dir='MYSQLINSTALLDIR' 18 mysql_username='MYSQLUSERNAME' 19 mysql_password='MYSQLPASSWORD' 20 mysql_port=MYSQLPORT 21 mysql_socket='MYSQLSOCKET' 22 mysql_bundled='MYSQLBUNDLEDSTATUS' 23 apache_dir='APACHEINSTALLDIR' 24 apache_bin='APACHEBIN' 25 apache_conf='APACHECONF' 26 apache_port='APACHEPORT' 27 apache_bundled='APACHEBUNDLED' 28 29 if [ $apache_bundled == 'true' ];then 30 APACHE_HOME=$apache_dir 31 export APACHE_HOME 32 cd $APACHE_HOME/bin 33 echo "" 34 echo "Starting apache at port $apache_port" 35 echo "" 36 37 ./apachectl -k restart 38 if [ $? -ne 0 ]; then 39 echo "" 40 echo "*******************************************************************************" 41 echo "Unable to start the apache server. Check whether the port $apache_port is free" 42 echo "*******************************************************************************" 43 echo "" 44 exit 45 fi 46 fi 47 48 if [ $apache_bundled == 'false' ];then 49 netstat -an | grep LISTEN | grep -w $apache_port 50 apache_stat=$? 51 if [ $apache_stat -ne 0 ];then 52 echo "" 53 echo "**************************************************************************************" 54 echo "Apache Server is not running. Start the Apache server and then start the vtigerCRM application" 55 echo "**************************************************************************************" 56 echo "" 57 exit 58 else 59 echo "" 60 echo "Apache Server is running" 61 echo "" 62 fi 63 fi 64 65 MYSQL_HOME=$mysql_dir 66 67 export MYSQL_HOME 68 69 cd $MYSQL_HOME 70 echo "" 71 echo MySQL home: `pwd` 72 echo "" 73 74 echo "" 75 echo "Checking whether the MySQL server is already running" 76 echo "" 77 echo "select 1"| ./bin/mysql --user=$mysql_username --password=$mysql_password --port=$mysql_port --socket=$mysql_socket > /dev/null 78 exit_status=$? 79 if [ $exit_status -eq 0 ];then 80 echo " " 81 echo "MySQL server is running" 82 echo " " 83 fi 84 if [ $exit_status -ne 0 ]; then 85 if [ $mysql_bundled == 'false' ];then 86 echo "" 87 echo "**************************************************************************************" 88 echo "Mysql server in the directory $mysql_dir is not running at port $mysql_port. Start the mysql server and then start vtigerCRM application" 89 echo "**************************************************************************************" 90 echo "" 91 92 exit 93 else 94 echo "" 95 echo "Mysql Server is not running. Going to start the mysql server at port $mysql_port" 96 echo "" 97 #chown -R nobody . 98 #chgrp -R nobody . 99 ./bin/mysqld --skip-bdb --log-queries-not-using-indexes --log-slow-admin-statements --log-error --low-priority-updates --log-slow-queries=vtslowquery.log --basedir=$MYSQL_HOME --datadir=$MYSQL_HOME/data --socket=$mysql_socket --tmpdir=$MYSQL_HOME/tmp --user=root --port=$mysql_port --default-table-type=INNODB > /dev/null & 100 sleep 8 101 echo "select 1"| ./bin/mysql --user=$mysql_username --password=$mysql_password --port=$mysql_port --socket=$mysql_socket > /dev/null 102 if [ $? -ne 0 ]; then 103 echo "" 104 echo "****************************************************************************" 105 echo "Unable to start the mysql server. Check whether the port $mysql_port is free" 106 echo "****************************************************************************" 107 echo "" 108 exit 109 fi 110 fi 111 112 fi 113 echo "" 114 echo "Checking if the vtigercrm501 database already exists" 115 echo "" 116 echo "select 1" | ./bin/mysql --user=$mysql_username --password=$mysql_password --port=$mysql_port --socket=$mysql_socket -D vtigercrm501 >/dev/null 117 if [ $? -ne 0 ]; then 118 echo "" 119 echo "Database vtigercrm501 does not exist. Creating database vtigercrm501" 120 echo "" 121 ./bin/mysql --user=$mysql_username --password=$mysql_password --port=$mysql_port --socket=$mysql_socket -e "create database if not exists vtigercrm501" 122 fi 123 124 host=`hostname` 125 echo "*****************************************************************************************************" 126 if [ $apache_bundled == 'false' ];then 127 echo "Please access the product at http://$host}:<apache port>/vtigerCRM5/vtigerCRM" 128 else 129 echo "Please access the product at http://$host}:<apache port>" 130 echo "*****************************************************************************************************" 131 fi 132 cd $VTIGER_HOME 133 exit 0
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |