shell - apt-get install lamp-server^ 是什么个情况
迷茫
迷茫 2017-04-21 10:57:09
0
3
908

我想,apt-get做为一个包管理器,lamp-server^这个包中包涵了其它包的安装。
那么,我想问的是:
lamp-server^这个包权威吗?有没有关于它的详细资料

附加问题,
这否有这样的SHELL文件,执行这个文件就自动部署LAMP环境(或者其它),用来借鉴,来写自己的自动部署SHELL脚本

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

全部回复(3)
黄舟

挺有意思的, 自己google下了, 学到一点东西. 贴上来,可能对楼主有所帮助.

1,
通过google "apt-get install lamp-server^" 找到了这个官方教程

https://help.ubuntu.com/community/ApacheMySQLPHP

sudo apt-get install lamp-server^

Mind the caret (^) at the end.

2, 这个 ^ 究竟是什么意思,为什么还特别指出来?

在自己的机子上试了下, 不加,或换上* 都找不到这个东东.

再次召唤google "apt-get install caret"

找到这个

http://askubuntu.com/questions/211912/whats-the-caret-mean-in-apt-get

Well, the answer is that the caret symbol is a short form for performing a task that otherwise the program “tasksel” would have done with the given package name. tasksel is a program to ease the installation of commonly used things that go together for a particular use.

3, 哦, 这个lamp-server^原来跟taskel这个程序有关.

再次google taskel, https://help.ubuntu.com/community/Tasksel

Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated "task" onto your system.

恩, lz问题的答案就呼之欲出了:

lamp-server^这个包权威吗?

1, 不是包. 是个task
2, 不知权威啥定义. 反正所有的软件都是来自 apt-get源.


附加问题就不说了, 太多了, 给个关键词, 自己google去

nginx mysql php install shell bash

左手右手慢动作

楼主我给你回答下附加问题哈

记得有个东西叫lnmp 就是linux+nginx+mysql+php,实现了这些东西的一键安装,不知道是不是楼主想要的。
还有个东西叫PredictionIO,是python写的,它的安装脚本vendors.sh自动安装了mongoDB+hadoop,也可以参考下

#!/usr/bin/env sh

# PredictionIO Third Party Software Utilities

# Third party software
VENDORS_PATH="$BASE/vendors"
VENDOR_HADOOP_PATH="$VENDORS_PATH/hadoop-1.2.1"
VENDOR_MONGODB_PATH="$VENDORS_PATH/mongodb-linux-x86_64-2.4.6"

VENDOR_HADOOP_NAME="Apache Hadoop 1.2.1"
VENDOR_MONGODB_NAME="MongoDB 2.4.6 (64-bit Linux)"

# Utilities
command_exists () {
    command -v "" >/dev/null 2>&1
}

process_exists () {
    echo $(ps -ef | grep "" | grep -v "grep" | wc -l)
}

install_mongodb () {
    echo "Going to download and install $VENDOR_MONGODB_NAME..."
    local VENDORS_PATH=
    mkdir -p $VENDORS_PATH
    cd $VENDORS_PATH
    curl -O http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.6.tgz
    tar zxvf mongodb-linux-x86_64-2.4.6.tgz
}

install_hadoop () {
    while true; do
        read -p "Please supply the absolute path to your Java installation: " JAVA_HOME
        if [ $JAVA_HOME ] && [ -d $JAVA_HOME ] && [ -x "$JAVA_HOME/bin/java" ] ; then
            echo "Using directory $JAVA_HOME as your Java installation..."
            break
        else
            echo "Please provide a valid Java installation directory"
        fi
    done
    echo "Going to download and install $VENDOR_HADOOP_NAME..."
    local VENDORS_PATH=
    mkdir -p $VENDORS_PATH
    cd $VENDORS_PATH
    curl -O http://archive.apache.org/dist/hadoop/common/hadoop-1.2.1/hadoop-1.2.1-bin.tar.gz
    tar zxvf hadoop-1.2.1-bin.tar.gz
    echo "Configuring Hadoop in pseudo-distributed mode..."
    cp ../conf/hadoop/* $VENDOR_HADOOP_PATH/conf
    echo "export JAVA_HOME=$JAVA_HOME" >> $VENDOR_HADOOP_PATH/conf/hadoop-env.sh
    echo "Configuring PredictionIO to use Hadoop in vendors area..."
    echo "io.prediction.commons.settings.hadoop.home=$VENDOR_HADOOP_PATH" >> ../conf/predictionio.conf
    echo "Trying to format HDFS..."
    $VENDOR_HADOOP_PATH/bin/hadoop namenode -format
}

start_mongodb () {
    echo "Going to start MongoDB..."
    mkdir -p "$VENDORS_PATH/mongodb/data"
    mkdir -p "$VENDORS_PATH/mongodb/logs"
    $VENDOR_MONGODB_PATH/bin/mongod --config conf/mongodb/mongodb.conf >/dev/null 2>&1 &
}

start_hadoop () {
    echo "Going to start Hadoop..."
    $VENDOR_HADOOP_PATH/bin/start-all.sh
}

stop_hadoop () {
    echo "Going to stop Hadoop..."
    $VENDOR_HADOOP_PATH/bin/stop-all.sh
}

vendor_mongodb_exists () {
    [ -e "$VENDOR_MONGODB_PATH/bin/mongod" ]
}

vendor_hadoop_exists () {
    [ -e "$VENDOR_HADOOP_PATH/bin/hadoop" ]
}

Ty80

记得用fedora的时候,有安装某个功能的一组软件的选项,感觉会是同样的道理。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板