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

我想,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的時候,有安裝某個功能的一組軟體的選項,感覺會是同樣的道理。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板