centos 6.5 搭建WordPress
2017-11-24 11:59
671 查看
CentOS6.5 搭建WordPress
由于公司有需要员工书写技术文章的想法,所以才有了在公司服务器上搭建WordPress的想法。需要的软件&库
WebServer:NginxDataBase:MySQL
RunEnvoriment : php7.5
WordPress
mysql配置
//为WordPress创建对应的数据库即可 create database wordpress;
nginx配置
server { listen 80; server_name xxx.xxx.xxx; root /var/www/html/wordpress; try_files $uri $uri/ /index.php?q=$uri&$args; error_log /imgData/nginx/wordpress/error.log; access_log /imgData/nginx/wordpress/access.log; location / { index index.php index.html index.htm; } location ~ \.php$ { root /var/www/html/wordpress; fastcgi_pass 127.0.0.1:9905; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
php配置
[wordpress] listen = 127.0.0.1:9905 listen.allowed_clients = 127.0.0.1 user = nginx group = nginx pm = dynamic pm.max_children = 50 pm.start_servers = 1 pm.min_spare_servers = 1 pm.max_spare_servers = 35 slowlog = /var/log/php-fpm/www-slow.log php_admin_value[error_log] = /var/log/php-fpm/www-error.log php_admin_flag[log_errors] = on php_value[session.save_handler] = files php_value[session.save_path] = /var/lib/php/session
WordPress配置
/* 主要配置MySQL部分 */ define('DB_NAME', 'wordpress'); /** MySQL database username */ define('DB_USER', 'xxx'); /** MySQL database password */ define('DB_PASSWORD', 'xxx'); /** MySQL hostname */ define('DB_HOST', 'xxx.xxx.xxx.xxx'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');
启动WordPress
chconfig add php-fpm chconfig php-fpm on service php-fpm start
相关文章推荐
- centos 6.5搭建wordpress博客
- CentOS6.5搭建freeradius服务器
- centos 6.5 搭建puppet
- centos6.5 64位下搭建nfs文件共享系统
- yum搭建lnmp环境(CentOS6.5)
- centos6.5环境下redis3.0集群搭建和配置
- shell centos 6.5 开发环境自动搭建
- 3、单机运行环境搭建之 --CentOS-6.5安装配置Tengine
- centos6.5 搭建nginx1.6.0 +gridfs +mongodb2.4..10环境
- CentOS6.5 64位 下 搭建 Java+Apache-Tomcat+MongoDB的环境
- CentOS6.5_64下 nginx+uwsgi+Python +多站点环境搭建
- centos6.5搭建git服务器
- 两台台CentOS release 6.5 (Final)*64服务器搭建nfs——笔记
- CentOS6.5 用yum命令搭建LNMP
- 【linux】centos6.5搭建svn
- CentOS 6.5 源码编译搭建LAMP(两台独立主机实现)
- centos6.5 搭建php5.5+mysql5.5+apache2.4
- centos6.5搭建nginx反向代理Apache服务并实现动静分离