SSH安装之EmpireCMS

2011年3月14日 | 分类: Linux | 标签: , , , , , , , , ,

环境:CentOS 5.5+LNMP

wget http://www.yishanhome.com/wp-content/uploads/2011/03/EmpireCMS.sh;sh EmpireCMS.sh

EmpireCMS.sh代码如下

?Download EmpireCMS.sh
#!/bin/bash
array=(http://www.phome.net/ecms65/download/EmpireCMS_6.5os_SC_GBK.zip http://www.phome.net/ecms65/download/EmpireCMS_6.5os_SC_UTF8.zip http://www.phome.net/ecms65/download/EmpireCMS_6.5os_TC_BIG5.zip http://www.phome.net/ecms65/download/EmpireCMS_6.5os_TC_UTF8.zip)
length=${#array[@]}
usage()
{
clear
printf "
#This is a Shell-Based tool
# Author: yishan
# Website: http://www.yishanhome.com
"
for ((i=0; i<$length; i++))
do
let "m = $i + 1"
echo "$m. ${array[$i]}"
done
echo ""
option=0
read -p "Please input your option:" option
let "option = $option + 0"
  if [ "$option" -eq "0" ] || [ "$option" -gt "$length" ] ; then
    usage
  fi
}
 
check_source()
{
  echo "checking $1"
  httpvalue=`wget -nv --spider $1 2>&1|sed q|awk '{print $1}'`
  if [ -z $httpvalue ]; then
    echo "OK!"
  else
    echo "NOT accessible, please check"
    exit
  fi
}
 
check_source()
{
  echo "checking $1"
  httpvalue=`wget -nv --spider $1 2>&1|sed q|awk '{print $1}'`
  if [ -z $httpvalue ]; then
    echo "OK!"
  else
    echo "NOT accessible, please check"
    exit
  fi
}
 
input_domain()
{
  read -p "Please input domain:" domain
  if [ "$domain" = "" ]; then
  input_domain
  fi
}
www_dir=/home
usage
let "option = $option - 1"
down_url=${array[$option]}
down_file=$(echo $down_url | awk -F\/ '{print $NF}')
sitecode=$(echo $down_file | awk -F\. '{print $1}')
check_source $down_url
mkdir $HOME/$sitecode
mkdir $www_dir/$sitecode
mkdir /usr/local/nginx/conf/vhost
input_domain
wget $down_url
 
if echo $down_file|grep -q .zip;then
unzip $down_file -d $HOME/$sitecode
fi
 
if echo $down_file|grep -q .tar.gz;then
tar -zxvf $down_file -C $HOME/$sitecode
fi
 
mv $HOME/$sitecode/upload/* $www_dir/$sitecode/
cd $www_dir/$sitecode/
chmod 777 $www_dir/$sitecode
chmod 777 -R d
chmod 777 -R s
chmod 777 -R search
chmod 777 index.html
chmod 777 -R html
chmod 777 -R e/admin/ebak/bdata
chmod 777 -R e/admin/ebak/zip
chmod 777 e/class/config.php
chmod 777 e/class/user.php
chmod 777 -R e/data
chmod 777 -R e/install
chmod 777 e/member/iframe/index.php
chmod 777 e/member/login/loginjs.php
chmod 777 e/pl/more/index.php
chmod 777 e/sch/index.php
chmod 777 -R e/tool/feedback/temp
chmod 777 e/tool/gbook/index.php
cat > /usr/local/nginx/conf/vhost/$domain.conf <<EOF
server
        {
                listen       80;
                server_name $domain;
                index index.html index.htm index.php default.html default.htm default.php;
                root  $www_dir/$sitecode;
                location ~ .*\.(php|php5)?$
                        {
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                fastcgi_index index.php;
                                include fcgi.conf;
                        }
 
                location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
                        {
                                expires      30d;
                        }
 
                location ~ .*\.(js|css)?$
                        {
                                expires      12h;
                        }
 
                access_log off;
        }
EOF
 
/usr/local/nginx/sbin/nginx -s reload

以上执行完毕登录http://你的域名/e/install/index.php 开始数据库安装,具体详细的设置请参考官方资料http://www.phome.net/doc/ecmsedu/rm/install.htm 最后防止重复安装,请删除

rm -f -R /home/EmpireCMS_6/e/install

预览首页

演示地址:http://empirecms.yishanhome.com/

  1. 2011年3月14日17:05

    这是哪个CMS ,怎么没听说过呀

    Internet Explorer 8.0 Windows 7
  2. 2011年4月1日09:48

    学习了

    Internet Explorer 8.0 Windows XP
  3. 2013年5月6日23:53

    онлайн покер на андроид бесплатно или покер jar скачать через торрент.

    Opera 12.10 Windows XP

返回顶部