• apt-get -y install mariadb-server mariadb-client apache2 php7.2 libapache2-mod-php7.2 php7.2-mysql php7.2-curl php7.2-gd php7.2-intl php-pear php-imagick php7.2-imap php-memcache  php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl php7.2-mbstring php-gettext  php7.2-opcache php-apcu
    
    
    mysql_secure_installation
    
    ## 新建用户给予权限
    
    CREATE USER 'admin'@'localhost' IDENTIFIED BY 'howtoforge';
    GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    exit
    
    ## certbot 证书
    
    apt-get install software-properties-common
    add-apt-repository universe
    add-apt-repository ppa:certbot/certbot
    
    apt-get install certbot python3-certbot-apache
    
    certbot --apache

    Ubuntu 18.04 (LTS) LAMP server tutorial with Apache, PHP 7.2, and MySQL

    Certbot – Ubuntubionic Apache