阿里云

和朋友双十一弄个阿里云服务器,最便宜的那种,就是个玩嘛,ubuntu 18.04 64位的php

有pem密钥,一时没有ssh专门登录工具,用的intellij里的ssh,也能用python

照这篇文章弄系统安装对应软件 https://blog.csdn.net/qq_18335837/article/details/82187807mysql

查看已安装 apt list --installedweb

安装PHP7.0插件sudo apt-get install libapache2-mod-php7.0  出现问题,没有找到对应的包sql

使用apt-cache search libapache2-mod 查看有哪些包apache

libapache2-mod-apparmor - changehat AppArmor library as an Apache module
libapache2-mod-auth-mellon - SAML 2.0 authentication module for Apache
libapache2-mod-auth-pgsql - Module for Apache2 which provides PostgreSQL authentication
libapache2-mod-auth-plain - Module for Apache2 which provides plaintext authentication
libapache2-mod-perl2 - Integration of perl with the Apache2 web server
libapache2-mod-perl2-dev - Integration of perl with the Apache2 web server - development files
libapache2-mod-perl2-doc - Integration of perl with the Apache2 web server - documentation
libapache2-mod-php - server-side, HTML-embedded scripting language (Apache 2 module) (default)
libapache2-mod-php7.2 - server-side, HTML-embedded scripting language (Apache 2 module)
libapache2-mod-python - Python-embedding module for Apache 2
libapache2-mod-python-doc - Python-embedding module for Apache 2 - documentation
libapache2-mod-wsgi - Python WSGI adapter module for Apache
libapache-mod-jk-doc - Documentation of libapache2-mod-jk package
libapache2-mod-apreq2 - generic Apache request library - Apache module
libapache2-mod-auth-cas - CAS authentication module for Apache2
libapache2-mod-auth-gssapi - GSSAPI Authentication module for Apache2
libapache2-mod-auth-kerb - apache2 module for Kerberos authentication
libapache2-mod-auth-ntlm-winbind - apache2 module for NTLM authentication against Winbind
libapache2-mod-auth-openid - OpenID authentication module for Apache2
libapache2-mod-auth-openidc - OpenID Connect authentication module for Apache
libapache2-mod-auth-pubtkt - key-based single-sign-on authentication module for Apache
libapache2-mod-auth-radius - Apache 2.x module for RADIUS authentication
libapache2-mod-auth-tkt - lightweight single-sign-on authentication module for Apache
libapache2-mod-authn-sasl - SASL authentication backend provider for Apache
libapache2-mod-authn-webid - WebID FOAF+SSL authentication module for Apache
libapache2-mod-authn-yubikey - Yubikey authentication provider for Apache
libapache2-mod-authnz-external - authenticate Apache against external authentication services
libapache2-mod-authnz-pam - PAM authorization checker and PAM Basic Authentication provider
libapache2-mod-authz-securepass - Apache2 module for authorizing SecurePass users
libapache2-mod-authz-unixgroup - access control based on on unix group membership for Apache
libapache2-mod-bw - bandwidth limiting module for apache2
libapache2-mod-dacs - Distributed Access Control System (DACS) - Apache Module
libapache2-mod-defensible - module for Apache2 which provides DNSBL usage
libapache2-mod-dnssd - Zeroconf support for Apache 2 via avahi
libapache2-mod-encoding - Apache2 module for non-ascii filename interoperability
libapache2-mod-evasive - evasive module to minimize HTTP DoS or brute force attacks
libapache2-mod-fcgid - FastCGI interface module for Apache 2
libapache2-mod-fcgid-dbg - debugging symbols for mod_fcgid
libapache2-mod-form - Apache module to decode data submitted from Web forms
libapache2-mod-form-dev - Apache module to decode data submitted from Web forms (development files)
libapache2-mod-geoip - GeoIP support for apache2
libapache2-mod-gnutls - Apache module for SSL and TLS encryption with GnuTLS
libapache2-mod-intercept-form-submit - Apache module to intercept login form submission and run PAM authentication
libapache2-mod-jk - Apache 2 connector for the Tomcat Java servlet engine
libapache2-mod-ldap-userdir - Apache module that provides UserDir lookups via LDAP
libapache2-mod-ldap-userdir-dbg - Debugging symbols for mod_ldap_userdir
libapache2-mod-lisp - An Apache2 module that interfaces with Lisp environments
libapache2-mod-log-slow - Apache module for logging of slow requests handling
libapache2-mod-log-sql - Use SQL to store/write your Apache queries logs - Base
libapache2-mod-log-sql-dbi - Use SQL to store/write your Apache queries logs - DBI interface
libapache2-mod-log-sql-mysql - Use SQL to store/write your Apache queries logs - MySQL interface
libapache2-mod-log-sql-ssl - Use SQL to store/write your Apache queries logs - SSL extension
libapache2-mod-lookup-identity - Apache module to retrieve additional information about the authenticated user
libapache2-mod-mapcache - tile caching server - Apache module
libapache2-mod-md - ACME certificate support for apache2
libapache2-mod-mime-xattr - Apache2 module to get MIME info from filesystem extended attributes
libapache2-mod-mono - Apache module for running ASP.NET applications on Mono
libapache2-mod-musicindex - Browse, stream, download and search through MP3/Ogg/FLAC/MP4 files
libapache2-mod-neko - Apache module for running server-side Neko programs
libapache2-mod-netcgi-apache - OCaml application-level Internet libraries - netcgi2 Apache2 connector
libapache2-mod-nss - NSS-based SSL module for Apache2
libapache2-mod-parser3 - Parser 3, HTML-embedded scripting language (Apache2 module)
libapache2-mod-passenger - Rails and Rack support for Apache2
libapache2-mod-proxy-msrpc - Apache module for Outlook Anywhere support in reverse proxy setups
libapache2-mod-proxy-uwsgi - uwsgi proxy module for Apache2 (mod_uwsgi)
libapache2-mod-proxy-uwsgi-dbg - debugging symbols for Apache2 mod_proxy_uwsgi
libapache2-mod-qos - quality of service module for the apache2
libapache2-mod-r-base - server-side R integration with Apache 2
libapache2-mod-removeip - Module to remove IP from apache2's logs
libapache2-mod-rivet - Server-side Tcl programming system combining ease of use and power
libapache2-mod-rivet-doc - Documentation for Rivet, a server-side Tcl programming system
libapache2-mod-rpaf - module for Apache2 which takes the last IP from the 'X-Forwarded-For' header
libapache2-mod-ruid2 - suexec module for Apache 2
libapache2-mod-ruwsgi - uwsgi module for Apache2 (mod_Ruwsgi)
libapache2-mod-ruwsgi-dbg - debugging symbols for Apache2 mod_Ruwsgi
libapache2-mod-scgi - Apache module implementing the SCGI protocol
libapache2-mod-security2 - Tighten web applications security for Apache
libapache2-mod-shib2 - Federated web single sign-on system (Apache module)
libapache2-mod-svn - Apache Subversion server modules for Apache httpd
libapache2-mod-upload-progress - upload progress support for the Apache web server
libapache2-mod-uwsgi - uwsgi module for Apache2 (mod_uwsgi)
libapache2-mod-uwsgi-dbg - debugging symbols for Apache2 mod_uwsgi
libapache2-mod-vhost-ldap - Apache 2 module for Virtual Hosting from LDAP
libapache2-mod-watchcat - Process monitoring Apache module
libapache2-mod-webauth - Apache module for WebAuth authentication
libapache2-mod-webauthldap - Apache module for WebAuth LDAP lookup and authorization
libapache2-mod-webkdc - Apache modules for a WebAuth authentication KDC
libapache2-mod-wsgi-py3 - Python 3 WSGI adapter module for Apache
libapache2-mod-xforward - Apache module implements redirection based on X-Forward response header
libapache2-mod-xsendfile - Serve large static files efficiently from web applications

发现有php7.2,可我已经安装了php7.0,晕,下次安装前要先把对应的包都看下是否能够正确安装,而后在执行ubuntu

刚才看了下php版本,发现原来是php7.2的版本api

PHP 7.2.24-0ubuntu0.18.04.1 (cli) (built: Oct 28 2019 12:07:07) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.24-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies

这样就好,安装 sudo apt-get install libapache2-mod-php7.2服务器

sudo apt-get install mysql-server-5.7php7

sudo apt-get install mysql-client-5.7  这部操做不用,ubuntu自带了mysql client 

mysql-client-5.7 is already the newest version (5.7.27-0ubuntu0.18.04.1).
mysql-client-5.7 set to manually installed.

sudo apt-get install php7.2-mysql

这样准备工做差很少了,能够搞dz上去了

参考 https://blog.csdn.net/dinglinuX/article/details/54142346

$ mkdir -p /data/www
$ cd /data/www
$ wget http://download.comsenz.com/DiscuzX/3.3/Discuz_X3.3_SC_UTF8.zip
$ yum install unzip -y
$ unzip Discuz_X3.3_SC_UTF8.zip
$ mv upload/* .
$ rm -rf Discuz_X3.3_SC_UTF8.zip upload/ utility/ readme/

安装dz的时候碰上两个问题,一个是权限,一个是xml模块

若是出现下图所示的状况,是权限问题,运行”chmod -R 777 /data/www”更改权限,刷新页面便可继续。

这里写图片描述

该函数须要 PHP 支持 XML。请联系空间商,肯定开启了此项功能 安装xml插件

sudo apt-get install php7.2-xml

安装后仍是不行,郁闷。

 

 

附录:

create user 'wp'@'localhost' identified by 'qweasd';

admin UxyNLXUR3NE5gJLL4l