lnmp安装wordpress
发布时间:2022-06-21 13:03 所属栏目:61 来源:互联网
导读:#epel 源 yum install epel-release #nginx yum install nginx -y #开机自动启动 chkconfig nginx on #mariadb/mysql变体 yum install mariadb mariadb-server #开机自动启动 systemctl enable mariadb #启动 service mariadb start #db 安全配置 mysql_secu
#epel 源 yum install epel-release #nginx yum install nginx -y #开机自动启动 chkconfig nginx on #mariadb/mysql变体 yum install mariadb mariadb-server #开机自动启动 systemctl enable mariadb #启动 service mariadb start #db 安全配置 mysql_secure_installation #进入db并创建数据库 mysql -uroot --password= CREATE DATABASE wordpress; exit #php yum install php php-fpm php-bcmatch php-gd php-mbstring php-mcrypt php-mysql -y #启动 service php-fpm start #开机 chkconfig php-fpm on #下载wordpress cd /var/www/ wget http://wordpress.org/latest.tar.gz tar-xzvf latest.tar.gz cp wordpress/wp-config-sample.php wordpress/wp-config.php nano wordpress/wp-config.php define('DB_NAME','wordpress'); define('DB_USER','root'); define('DB_PASSWORD',''); #nginx配置 cp /etc/nginx/nginx.conf.default /etc/nginx/nginx.conf nano /etc/nginx/nginx.conf server 部分变为: upstream php { #server unix:/tmp/php-cgi.socket; #指向到fpm的默认9000端口, server 127.0.0.1:9000; } server { listen 80 ; listen [::]:80 ; server_name www.domain.com; root /var/www/wordpress/; index index.php; location ~ \.php$ { #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini include fastcgi.conf; fastcgi_intercept_errors on; fastcgi_pass php; } # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; } #加载配置并重启 nginx -t service nginx restart #浏览器打开 http://localhost/wp-admin/install.php。 (编辑:ASP站长网) |
相关内容
网友评论
推荐文章
热点阅读