欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

yum安装搭建wordpress博客
yum安装搭建wordpress博客
yum安装搭建wordpress博客
yum安装搭建wordpress博客
yum安装搭建wordpress博客

如上,WordPress基础已经配置完成了
yum安装搭建wordpress博客

上传文件我们这里更改为50M:

vim /etc/php.ini

upload_max_filesize = 50M
post_max_size = 50M

systemctl restart httpd
yum安装搭建wordpress博客

相关标签: confluence,jira等