Home  >  Q&A  >  body text

shell - apt-get install lamp-server^ 是什么个情况

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

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

迷茫迷茫2720 days ago830

reply all(3)I'll reply

  • 黄舟

    黄舟2017-04-21 10:59:09

    It’s quite interesting. I googled it myself and learned a few things. Posting this, it may be helpful to the original poster.

    1,
    Found this official tutorial via 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. What does this ^ mean? Why is it pointed out in particular?

    I tried it on my machine. I can’t find this thing without adding or replacing *.

    Summon google "apt-get install caret" again

    Found this

    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, Oh, this lamp-server^ turns out to be related to the taskel program.

    Google taskel again, 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.
    

    Well, the answer to lz’s question is ready to come out:

    lamp-server^ Is this package authoritative?

    1, It’s not a package. It’s a task
    2. I don’t know what the definition of authority is. Anyway, all software comes from apt-get source.


    I won’t go into additional questions. There are too many. Just give me a keyword and google it yourself

    nginx mysql php install shell bash

    reply
    0
  • ringa_lee

    ringa_lee2017-04-21 10:59:09

    Owner, let me answer some additional questions for you

    I remember there is a thing called lnmp, which is linux+nginx+mysql+php, which enables one-click installation of these things. I don’t know if this is what the original poster wants.
    There is another thing called PredictionIO, which is written in python. Its installation script vendors.sh automatically installs mongoDB+hadoop. You can also refer to it

    #!/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" ]
    }
    
    

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 10:59:09

    Remember that when using fedora, there was an option to install a set of software with a certain function. It feels like it would be the same.

    reply
    0
  • Cancelreply