SSH安装kloxo(自定义mysql以及中文语言包)

特点:识别服务器是否已经安装mysql,kloxo,不重复安装mysql,kloxo,自动添加中文语言包以及一些网络上通用kloxo的优化解决方案。

wget http://www.yishanhome.com/wp-content/uploads/2011/04/kloxo_with_chinese_language.sh;sh kloxo_with_chinese_language.sh

#!/bin/sh
clear
printf "
#This is a Shell-Based tool
# Author: yishan
# Website: http://www.yishanhome.com
"
# Create new soft download dir
mkdir -p $HOME/backup/kloxo;
cd $HOME/backup/kloxo;
# Install mysql
mysql_root_pwd="yishanhome"
  echo ""
  echo "Please input the root password of Mysql:"
  read -p "(Default password: $mysql_root_pwd):" temp
  if [ "$temp" != "" ]; then
    mysql_root_pwd=$temp
  fi
install_mysql()
{
  echo "+--------------------------------------+"
  echo "+       Check install mysql            +"
  echo "+--------------------------------------+"
  ret=`rpm -qa|grep mysql|wc -l`
  ret1=`service mysql stop|wc -l`
if [ $ret = "0" ] || [ $ret1 = "0" ]; then
    cd $wd_work
    yum install -y mysql-server mysql
    chkconfig mysqld on
    service mysqld restart
    mysqladmin -u root password $mysql_root_pwd 
  fi
}
install_mysql
service mysql start
# Install kloxo
install_kloxo()
{
  echo "+--------------------------------------+"
  echo "+       Check install kloxo            +"
  echo "+--------------------------------------+"
  ret=`service kloxo stop|wc -l`
if [ $ret = "0" ] ; then
cd $HOME
# disable selinux
setenforce 0
# Remove exists softs
yum -y remove php mysql httpd;   
wget http://download.lxcenter.org/download/kloxo/production/kloxo-install-master.sh
sh ./kloxo-install-master.sh --db-rootpassword=$mysql_root_pwd
 
  fi
}
install_kloxo
echo "This process takes a long time to wait, go back outside to run 10 laps .By Google Translate"
/etc/init.d/kloxo start
# Install the Chinese language package
cd /usr/local/lxlabs/kloxo/httpdocs/lang;
wget http://www.yishanhome.com/wp-content/uploads/2011/04/kloxo_cn.zip;
unzip kloxo_cn.zip;
# Change the default charset from UTF-8 to off
sed -i 's/UTF-8/Off/g' /etc/httpd/conf/httpd.conf
# Install the php-mbstring for phpMyAdmin and other php scripts
yum -y install php-mbstring php-bcmath php-mhash nmap
echo 'extension=mbstring.so' >> /usr/local/lxlabs/ext/php/etc/php.ini
 
# Change localtime to Shanghai time
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
cd $HOME
wget http://www.yishanhome.com/wp-content/uploads/2011/04/kloxo_cn.sql;
mysql -u root -p$mysql_root_pwd< kloxo_cn.sql;
# Restart kloxo
/etc/init.d/kloxo restart
# skip-innodb and skip-bdb for mysql, if you don't want skip them, delete this line
sed -i "s/# Disabling symbolic-links/skip-innodb\nskip-bdb\n#Disabling symbolic-links/g" /etc/my.cnf 
service mysqld restart
# Stop not necessary servces to release memory and avoid email spam:
 
service named stop
service qmail stop
service courier-imap stop
 
chkconfig named off
chkconfig qmail off
chkconfig courier-imap off
 
# Install unrar 
wget  http://dag.wieers.com/rpm/packages/unrar/unrar-3.6.8-1.el5.rf.i386.rpm;
rpm -Uvh unrar-3.6.8-1.el5.rf.i386.rpm;
 
# Check runing services and ports
nmap localhost
 
YOURIP=`hostname -i`;
echo '';
echo '';
echo '';
echo '';
echo '*********************************************************';
echo '****                                                 ****';
echo '****    How to switch to Chinese, note and upgrade   ****';
echo '****                                                 ****';
echo '****            http://www.yishanhome.com            ****';
echo '****                                                 ****';
echo '****                                                 ****';
echo '****       How to add domain/website from Kloxo      ****';
echo '****                                                 ****';
echo '****                                                 ****';
echo '****                                                 ****';
echo '****              How to unzip rar file              ****';
echo '****                                                 ****';
echo '****                                                 ****';
echo '****                                                 ****';
echo '****           +++++ LOGIN DETAILS +++++             ****';
echo '****                                                 ****';
echo '****    ## How to login to Kloxo control panel ##    ****';
echo '****                                                 ****';
echo "****             http://${YOURIP}:7778/              ****";
echo '****                                                 ****';
echo '****     (Username: admin  Password: admin)          ****';
echo '****                                                 ****';
echo '****                                                 ****';
echo '*********************************************************';
echo '';
echo '';

官方文档:http://wiki.lxcenter.org/Kloxo+Installation+Guide

  1. 2011年4月19日08:51

    非常有用

    Google Chrome 10.0.648.204 Windows Vista
  2. Jamz
    2011年11月18日17:02

    貌似现在这个用不了了,装上出错了,以前不会出错啊! 博主检查下哇

    Firefox 8.0 Windows 7 x64 Edition

返回顶部