yum安装搭建wordpress博客
程序员文章站
2022-06-04 10:05:26
...
安装l[a/n]mp环境:
安装lamp:
yum install httpd mariadb mariadb-server php php-mysql -y
yum -y install php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel
echo "<?php phpinfo(); ?>" >> /usr/share/nginx/html/phpinfo.php
systemctl restart httpd.service
安装lnmp:
yum install nginx mariadb-server php-fpm php-mysql -y
开启nginx代理php动态资源:
vim /etc/nginx/nginx.conf
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
echo "<?php phpinfo(); ?>" >> /usr/share/nginx/html/index.php
systemctl restart nginx
创建数据库:
CREATE DATABASE wordpressdb;
CREATE USER wordpressuser@localhost IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON wordpressdb.* TO wordpressuser@localhost;
FLUSH PRIVILEGES;
#安装WordPress中文版
wget https://cn.wordpress.org/wordpress-4.5.1-zh_CN.tar.gz
#解压
tar xzvf wordpress-4.5.1-zh_CN.tar.gz
cd wordpress/
mv * /var/www/html/
cd /var/www/html/
chmod 777 -R wp-content/
#启动httpd
systemctl restart httpd
如上,WordPress基础已经配置完成了
上传文件我们这里更改为50M:
vim /etc/php.ini
upload_max_filesize = 50M
post_max_size = 50M
systemctl restart httpd
上一篇: CentOS7安装ELK
下一篇: 寿司饭的做法?快学起来,好吃极了
推荐阅读
-
在CentOS系统上从零开始搭建WordPress博客的全流程记录,centoswordpress
-
centos下yum搭建安装linux+apache+mysql+php环境的方法
-
【wordpress for sae】安装完以后博客首页出现数据库错误
-
搭建 Hexo 博客,部署到腾讯云和 coding,并从 WordPress 迁移到 Hexo
-
搭建MHA时 yum 安装perl模块提示 baseurl 错误
-
CentOS下搭建PHP环境与WordPress博客程序的全流程总结
-
LNMP系列教程之 SSL安装WordPress博客(程序下载与安装)
-
LNMP小项目搭建,Centos7.6环境搭建Linux+nginx+mysql+php,wordpress个人博客的搭建(完整搭建步骤)
-
cPanel面板搭建WordPress博客有多快?安装步骤分享
-
centos下yum搭建安装linux+apache+mysql+php环境教程