Elementary OS安装PHP测试环境 lnmp一键安装包

作者:Matrix 被围观: 1,817 次 发布时间:2016-12-30 分类:零零星星 | 无评论 »

安装环境

2016-12-2202

按照ubuntu正常安装的时候却报错:
Lnmp Unable to get linux distribution name, or do NOT support the current di

原因是因为 /etc/issue 中记录的是linux发行版本:elementary OS Loki
lnmp脚本无法识别出为ubuntu的系统内核

修改main.sh文件

文件路径:/lnmp1.3/include/main.sh
搜索关键字Get_Dist_Name()查找该方法替换为一下内容:

Get_Dist_Name()
{
    if grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
        DISTRO='CentOS'
        PM='yum'
    elif grep -Eqi "Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "Red Hat Enterprise Linux Server" /etc/*-release; then
        DISTRO='RHEL'
        PM='yum'
    elif grep -Eqi "Aliyun" /etc/issue || grep -Eq "Aliyun" /etc/*-release; then
        DISTRO='Aliyun'
        PM='yum'
    elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
        DISTRO='Fedora'
        PM='yum'
    elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
        DISTRO='Debian'
        PM='apt'
    elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
        DISTRO='Ubuntu'
        PM='apt'
    elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
        DISTRO='Raspbian'
        PM='apt'
    elif grep -Eqi "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
        DISTRO='Deepin'
        PM='apt'
    else
        DISTRO='Ubuntu'
        PM='apt'
    fi
    Get_OS_Bit
}

或者下载main.sh覆盖:http://pan.baidu.com/s/1hsyVSw8
然后再执行install.sh脚本安装就可以了

%e5%b1%8f%e5%b9%95%e6%88%aa%e5%9b%be-2016-12-22

本文固定链接:https://www.hhtjim.com/elementary-school-os-php-installation-test-environment-lnmp-a-key-installation-package.html
Matrix
本文章由 Matrix 于2016年12月30日发布在零零星星分类下,目前没有通告,你可以至底部留下评论。
转载请注明:Elementary OS安装PHP测试环境 lnmp一键安装包-HHTjim'S 部落格
关键字:, ,

添加新评论 »

 😛 👿 😳 😀 😯 😮 😕 😎 😆 😡 😈 😉 💡 😐 😥

NOTICE: You should type some Chinese word (like “你好”) in your comment to pass the spam-check, thanks for your patience!