linux安装wordpress

linux安装wordpress

apache server

1
2
3
4
5
6
7
8
9
yum -y install httpd
vi /etc/httpd/conf/httpd.conf
Require all granted

systemctl start httpd.service //启动
systemctl restart httpd.service //停止
systemctl status httpd.service //查看状态
systemctl restart httpd.service //重启
systemctl enable httpd.service //开机启动

ftp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
yum -y install vsftpd
systemctl start vsftpd.service
systemctl enable vsftpd.service

vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO //不允许匿名访问
local_enable=YES //允许使用本地帐户进行FTP用户登录验证
chroot_local_user=YES //启用限定用户在其主目录下
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list //当chroot_list_enable=YES,chroot_local_user=YES时,在/etc/vsftpd.chroot_list文件中列出的用户,可以切换到其他目录;未在文件中列出的用户,不能切换到其他目录,如果/etc/vsftpd/chroot_list不存在,则需要创建该文件
allow_writeable_chroot=YES //如果启用了限定用户在其主目录下需要添加这个配置
ascii_upload_enable=YES
ascii_download_enable=YES // 设定支持ASCII模式的上传和下载功能

useradd -d /home/ftpuser -g ftp -s /sbin/nologin ftpuser
passwd ftpuser

msyql

1
2
3
4
5
6
7
8
yum -y install mariadb mariadb-server
systemctl start mariadb.service
mysqladmin -u root password 'password'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'password' WITH GRANT OPTION; //配置任意IP远程访问

flush privileges; //刷新权限
systemctl restart mariadb.service //重启服务
systemctl enable mariadb.service //开机启动

php

1
yum -y install php php-mysql

wordpress

1
chown -R apache www

phpmyadmin

1
2
3
4
5
6
7
8
yum -y install phpMyAdmin
vi /etc/httpd/conf.d/phpMyAdmin.conf

#Require ip 127.0.0.1
#Require ip ::1
Require all granted

systemctl restart httpd.service