阿里云Centos7安装LNMP+wordpress
2016-04-23 09:53
696 查看
#yum install nginx #配置文件处于/etc/nginx #systemctl start nginx #启动nginx #systemctl enable nginx.service # 设置为开机启动 #systemctl status firewalld #检查防火墙,如果为active (running),则 #vim /etc/firewalld/zones/public.xml # 在zone <zone> … <service name=”nginx”/> <zone> #systemctl reload firewalld
测试:http://114.215.172.90/ 114.215.172.90为外网ip地址
2. 安装Mysql(not MariaDB)
#rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm #yum repolist enabled | grep “mysql.*-community.*” #yum -y install mysql-community-server #yum -y install mysql-community-server #安装社区版 #systemctl start mysqld # 启动mysql #mysql_secure_installation # mysql安全安装,输入root密码,一路y
3. 安装PHP
#yum install php-fpm php-mysql #systemctl start php-fpm # 启动php-fpm #systemctl enable php-fpm # 设置开机启动 #mkdir /var/www #chown -R apache:apache /var/www
修改Nginx的配置文件:在 /etc/nginx/conf.d 目录下新建 wordpress.conf
server { listen 8000; # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { root /usr/www; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
#systemctl reload nginx
在/usr/www 目录中创建 phpinfo.php
<?php echo phpinfo(); ?>
外部访问:http://114.215.172.90:8000/phpinfo.php
4. 安装wordpress
从https://cn.wordpress.org/下载 wordpress-4.4.2-zh_CN.tar.gz, 解压到/usr/www
创建wordpress数据库
#mysql -uroot -p #create database wordpress
通过http://114.215.172.90:8000/wordpress访问,并安装提示进行安装,中间需要添加mysql用户名和密码,并制定wordpress相关的用户名和密码,然后创建成功。
http://114.215.172.90:8000/wordpress/ 访问既可,也可以点击页面中的登陆进行页面设置等相关管理工作。
您可能感兴趣的文章:
- CentOS 6.5中利用yum搭建LNMP环境的步骤详解
- centos 7.2下搭建LNMP环境教程
- CentOS7编译安装新版LNMP环境
- 详解CentOS 7.0源码包搭建LNMP 实际环境搭建
- centos7.0之Lnmp和Lamp详细介绍
- CentOS7 LNMP+phpmyadmin环境搭建 第三篇phpmyadmin安装
- CentOS 7配置LNMP开发环境及配置文件管理详解
- CentOS 7.0编译安装lnmp教程(Nginx1.6.0+MySQL5.6.19+PHP5.5.14)
- CentOS6.7系统中配置LNMP环境
- centos7利用yum安装lnmp的教程(linux+nginx+php7.1+mysql5.7)
相关文章推荐
- Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL
- LNMP源码安装(RHEL)
- CentOS6 编译安装LNMP步骤
- wordpress rewrite问题解决
- WordPress升级版本及安装插件出现”Problem with the SSL CA cert”的解决办法
- 详解WordPress中添加和执行动作的函数使用方法
- 优化WordPress的Google字体以加速国内服务器上的运行
- 在WordPress中使用PHP脚本来判断访客来自什么国家
- 使用WordPress发送电子邮件的相关PHP函数用法解析
- 解析WordPress中控制用户登陆和判断用户登陆的PHP函数
- 推荐十款免费 WordPress 插件
- 在Linux系统下一键重新安装WordPress的脚本示例
- WordPress中Gravatar头像缓存到本地及相关优化的技巧
- Wordpress 忘记密码的处理方法
- 关于WordPress的SEO优化相关的一些PHP页面脚本技巧
- 详解WordPress中用于更新和获取用户选项数据的PHP函数
- WordPress中创建用户角色的相关PHP函数使用详解
- 讲解WordPress开发中一些常用的debug技巧
- 编写PHP脚本来实现WordPress中评论分页的功能
- 优化WordPress中文章与评论的时间显示