SSH安装XAMPP(选择版本,防止覆盖,自动启动)

2011年4月8日 | 分类: Linux | 标签: , , , , , , , , , , ,

1,引导界面提示可选择两个比较通用的版本安装:1.71使用的php5.2,可以兼容zend_extension_ts、zend_extension_manager.optimizer_ts 、zend_optimizer.enable_loader、zend_optimizer.optimization_level,而1.74使用的php5.3,则不可以,建议使用1.71,详细可以看后面的附录;
2,安装前将自动检查服务器是否存在XAMPP的目录(/opt/lampp),防止覆盖原先的安装过的XAMPP,以免造成不必要的损失;
3,安装完成后将XAMPP注册成为系统服务,以方便系统自动运行。

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

附录:
XAMPP for Linux 1.7.4 This version of XAMPP includes: – Apache 2.2.17 – MySQL 5.5.8 – PHP 5.3.5 – Perl 5.10.1 – ProFTPD 1.3.3d – phpMyAdmin 3.3.9 – OpenSSL 1.0.0c – GD 2.0.1 – Freetype 2.1.7 – libjpeg 6b – libpng 1.2.12 – gdbm 1.8.0 – zlib 1.2.3 – expat 1.95.2 – Sablotron 1.0 – libxml 2.7.6 – libxslt 1.1.26 – Ming 0.4.3 – Webalizer 2.21-02 – pdf class 009e – ncurses 5.7 – mod_perl 2.0.4 – FreeTDS 0.63 – gettext 0.17 – IMAP C-Client 2007e – OpenLDAP (client) 2.4.21 – mhash library 0.8.18 – mcrypt library 2.5.7 – cURL 7.21.0 – SQLite 2.8.17 (for PHP4 + PHP5) – SQLite 3.6.16 (for PHP5 PDO SQLite) – libapreq 2.12 – eAccelerator 0.9.6.1 – FPDF 1.6 – bzip2 (library) 1.0.5 – PBXT 1.0.11-6-pre-ga – PBMS 0.5.15 (but disabled) – PBMSlib 0.5.15 – ICU4C Library 4.2.1

XAMPP for Linux 1.7.1 This version of XAMPP includes:  – Apache 2.2.11 – MySQL 5.1.33 – PHP 5.2.9 – Perl 5.10.0 – ProFTPD 1.3.2 – phpMyAdmin 3.1.3.1 – OpenSSL 0.9.8k – GD 2.0.1 – Freetype 2.1.7 – libjpeg 6b – libpng 1.2.12 – gdbm 1.8.0 – zlib 1.2.3 – expat 1.95.2 – Sablotron 1.0 – libxml 2.7.2 – libxslt 1.1.22 – Ming 0.3 – Webalizer 2.01 – pdf class 009e – ncurses 5.3 – mod_perl 2.0.4 – FreeTDS 0.63 – gettext 0.11.5 – IMAP C-Client 2007e – OpenLDAP (client) 2.3.11 – mhash library 0.8.18 – mcrypt library 2.5.7 – cURL 7.19.3 – SQLite 2.8.17 (for PHP4 + PHP5) – SQLite 3.3.17 (for PHP5 PDO SQLite) – phpSQLiteAdmin 0.2 – libapreq 2.08 – eAccelerator 0.9.5.3 – FPDF 1.6 – bzip2 (library) 1.0.5 – PBXT (1.0.07-rc) – PBMS (0.5.08-alpha)

Service lampp支持的命令
start        Start XAMPP (Apache, MySQL and eventually others)
startapache  Start only Apache
startssl     Start only SSL support
startmysql   Start only MySQL
startftp     Start only ProFTPD
stop         Stop XAMPP (Apache, MySQL and eventually others)
stopapache   Stop only Apache
stopssl      Stop only SSL support
stopmysql    Stop only MySQL
stopftp      Stop only ProFTPD
reload       Reload XAMPP (Apache, MySQL and eventually others)
reloadapache Reload only Apache
reloadmysql  Reload only MySQL
reloadftp    Reload only ProFTPD
restart      Stop and start XAMPP
security     Check XAMPP’s security
php5         Activate PHP5
phpstatus    Which version of PHP is active?
backup       Make backup file of your XAMPP config, log and data files
panel        Starts graphical XAMPP control panel

?Download xampp.sh
#!/bin/bash
if [ -d /opt/lampp ]; then
echo '/opt/lampp existence of this directory  --Google translate'; 
else
array=(http://softlayer.dl.sourceforge.net/project/xampp/XAMPP%20Linux/1.7.1/xampp-linux-1.7.1.tar.gz http://nchc.dl.sourceforge.net/project/xampp/XAMPP%20Linux/1.7.4/xampp-linux-1.7.4.tar.gz)
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
}
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}')
wget $down_url
tar xvfz $down_file -C /opt
/opt/lampp/lampp security
ret=`service xampp stop|wc -l`
if [ $ret = "0" ] ; then
cp /opt/lampp/lampp /etc/init.d/
cd /etc/init.d/
chmod +x lampp
cd /etc/rc3.d/
ln -sf ../init.d/lampp ./S99lampp
chkconfig lampp on
fi
service lampp
service lampp start
echo "xampp installation successful"
fi

官方文档 http://www.apachefriends.org/zh_cn/xampp-linux.html

目前还没有任何评论.

返回顶部