服务器 安装系统 然后更新源
apt update && apt upgrade
安装ssh server端
apt install openssh-server
然后ps -e | grep ssh 查看是否安装成功 (linux基本操作)
修改配置文件(vim的使用)
vim /etc/ssh/sshd-config
{
1.把PermitRootLogin without-password 前加#
2.PermitRootLogin yes
}
然后 利用ssh 用户名@ip 登陆
登陆后换源
/etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
安装vsftpd
apt install vsftpd
在etc/vsftpd.conf中把LISTEN改为YES write_enable改为yes
然后可以ftp连接到服务器(不能用root)
win10需要关闭被动模式
然后安装lamp
apt install lamp-server^ 直接一键安装完lamp然后网页的默认目录为www
mysql默认密码为空 mysql -u root -p 然后直接回车
重新设置密码
set password for root@localhost = password(‘dddd’);
下载wordpress https://cn.wordpress.org/download/
根据手册安装 https://wordpress.org/support/article/how-to-install-wordpress/
为 wordpress 创建一个叫 wordpress 的数据库:
CREATE DATABASE wordpress;
为 这个数据库设置一个用户为 wordpressuser:
CREATE USER wordpressuser;
为这个用户配置一个密码为 password123:
SET PASSWORD FOR wordpressuser= PASSWORD("password123");
为这个用户配置数据库的访问权限:
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser IDENTIFIED BY"password123";
生效这些配置
FLUSH PRIVILEGES;
然后退出 mysql
exit;
然后登陆ip配置wordpress
tar -xvf 1.tar