zoukankan      html  css  js  c++  java
  • Newo_docker_lamp

    mkdir -p /opt/vol/{mysql,html}

    docker run  --privileged --name c1 -d -it -v /opt/vol/mysql:/var/lib/mysql -v /opt/vol/html:/var/www/html centos:7 /usr/sbin/init

    docker exec -it c1 /bin/bash

    yum install -y lftp wget

    cd  /etc/yum.repos.d/

    rm -rf ./*

    cat > /etc/yum.repos.d/ftp.repo<<EOF
    [ftp]
    name=ftpbase
    baseurl=ftp://172.17.0.1/pub
    enabled=1
    gpgcheck=0
    EOF

    cd

    wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

    rpm -ivh mysql-community-release-el7-5.noarch.rpm

    yum install -y vim net-tools openssh-server* httpd php php-mysql wget mysql-server mysql
    sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config
    sed -i "s/#UseDNS.*/UseDNS no/g" /etc/ssh/sshd_config
    sed -i "s/GSSAPIAuthentication.*/GSSAPIAuthentication no/g" /etc/ssh/sshd_config
    echo \` |passwd  root --stdin
    systemctl restart mysqld sshd httpd&
    查看数据库初始化密码
    mysql_secure_installation或者下面初始化(高级版本)
    grep "password" /var/log/mysqld.log
    set global validate_password_policy=0;(密码复杂程度降低)
    set global validate_password_length=1;(密码复杂程度降低)
    ALTER USER 'root'@'localhost' IDENTIFIED BY '123qwe';
     测试php
    cat /var/www/http/index.php
    <?
    phpinfo();
    ?>
     
    vim /etc/httpd/conf/httpd.conf 改UTF-8为GB2312或者GBK
    systemctl restart httpd
     
     
     
  • 相关阅读:
    面向对象 :类的创建以及应用
    面向对象(1)
    HTML 表单和验证事件2
    HTML 表单和验证事件
    html的导航制作
    静态网页的window.document对象
    JavaScript的DOM操作
    Java Script基础
    静态网页的格式布局
    构造函数
  • 原文地址:https://www.cnblogs.com/Leaders543/p/12624135.html
Copyright © 2011-2022 走看看