第一个Linx博客搭建

具体视频教程:http://mooc.study.163.com/learn/2001345000?tid=2001500002#/learn/content

第一个Linux系统的博客搭建过程

1.下CentOS7的系统镜像文件

2.下载并安装 VMware虚拟机

3.在虚拟机中安装CentOS7的系统

选在第一项,并按Tab键,之后敲入空格 输入

net.ifnames=0 biosdevname=0

之后回车安装程序

设置相关系统配置

  选择语言

设置网络

网络相关文章链接:http://www.cnblogs.com/justuntil/p/7879748.html

关闭 SECURITY POUCY


关闭 KDUMP


选择最小安装


5.修改yum元


curl -o /etc/yum.repos.d/CentOs-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

 6.安装常用插件

yum install -y vim wget tree bash-completion bash-completion-extras

 7.安装LNMP

yum install -y nginx mariadb-server mariadb php php-fpm php-mysql

 8.修改 nginx配置

cat >/etc/nginx/nginx.conf<<EOF
worker_processes 1;
events{
  worker_connections 1024;
}
http{
  include mime.types;
  default_type application/octet-stream;
  sendfile on;
  keepalive_timeout 65;
  server {
     listen 80;
     server_name blog.etiantian.org;
     location / {
        root html;
       index index.php index.html index.htm;
     }
     location ~ .*\.(php|php5)?\$ {
        root html;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi.conf;
     }
   }
}
EOF

9.创建php测试文件

cat >/usr/share/nginx/html/test_info.php<<EOF
 <?php phpinfo();?>
EOF

10.创建Mariadb数据库

mysql<<EOF
create database wordpress;
grant all on wordpress.* to wordpress@’localhost’ identified by ‘wordpress’;
flush privileges;
EOF

11.获取linux下workprocess的下载地址 https://cn.wordpress.org/wordpress-4.9.4-zh_CN.tar.gz  使用 wget 下载地址下载文件

12.tar xf xxxxx.gz 解压文件 ,并将解压目录复制到 /usr/share/nginx/html下

13 执行命令

chown -R apache.apache /usr/share/nginx

14 重启服务并查看状态

systemctl restart php-fpm nginx mariadb
systemctl status php-fpm nginx mariadb

15 关闭防火墙和SELinux

systemctl stop firewalld.service
systemctl disable firewalld.service
setenforce 0
vi /etc/selinux/config  编辑文件,
改变为注释的第二行文件 ,值为:disabled


16在浏览器中安装workprocess

具体请观看 李老师的视频教程:http://mooc.study.163.com/learn/2001345000?tid=2001500002#/learn/content

猜你喜欢

转载自blog.csdn.net/qq_28254093/article/details/80304493
今日推荐