madeitcwang 发表于 2016-5-7 18:49:41

php,mysql,nginx各个组件可以单独安装单独卸载吗

php,mysql,nginx各个组件可以单独安装单独卸载吗

madeitcwang 发表于 2016-5-8 09:12:18

修改一个独立脚本 install_mariadb.sh

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

# Check if user is root
if [ $(id -u) != "0" ]; then
    echo "Error: You must be root to run this script, please use root to install lnmp"
    exit 1
fi

cur_dir=$(pwd)
Stack=$1
if [ "${Stack}" = "" ]; then
    Stack="lnmp"
else
    Stack=$1
fi

LNMP_Ver='1.2'

. include/main.sh
. include/init.sh
. include/mysql.sh
. include/mariadb.sh
. include/end.sh

Get_Dist_Name

if [ "${DISTRO}" = "unknow" ]; then
    Echo_Red "Unable to get Linux distribution name, or do NOT support the current distribution."
    exit 1
fi

clear
echo "+------------------------------------------------------------------------+"
echo "|          LNMP V${LNMP_Ver} for ${DISTRO} Linux Server, Written by Licess          |"
echo "+------------------------------------------------------------------------+"
echo "|      A tool to auto-compile & install LNMP/LNMPA/LAMP on Linux       |"
echo "+------------------------------------------------------------------------+"
echo "|          For more information please visit http://www.lnmp.org         |"
echo "+------------------------------------------------------------------------+"

Init_Install()
{
    Press_Install
    Print_Sys_Info
    Disable_Selinux
   Install_MariaDB_10

}

LNMP_Stack()
{
    Init_Install
    Check_LNMP_Install
}

LNMPA_Stack()
{
    Init_Install
    Check_LNMPA_Install
}

LAMP_Stack()
{
    Init_Install
    Check_LAMP_Install
}

case "${Stack}" in
    lnmp)
      Dispaly_Selection
      LNMP_Stack 2>&1 | tee -a /root/lnmp-install.log
      ;;
    lnmpa)
      Dispaly_Selection
      LNMPA_Stack 2>&1 | tee -a /root/lnmp-install.log
      ;;
    lamp)
      Dispaly_Selection
      LAMP_Stack 2>&1 | tee -a /root/lnmp-install.log
      ;;
    *)
      Echo_Red "Usage: $0 {lnmp|lnmpa|lamp}"
      ;;
esac

licess 发表于 2016-5-8 09:22:40

均无法单独安装

卸载可以自己进行删除

也可以自己修改脚本来实现
页: [1]
查看完整版本: php,mysql,nginx各个组件可以单独安装单独卸载吗