当前位置: 首页 > news >正文

怎么给网站做跳转优化营商环境个人心得

怎么给网站做跳转,优化营商环境个人心得,江阴网站制作,制作网页教程的方法一.运行环境 192.168.32.132 Server-Web linux Web 192.168.32.133 Server-NFS-DNS linux NFS/DNS 基础配置 1.配置主机名静态ip 2.开启防火墙并配置 3.部分开启selinux并配置 4.服务器之间通过阿里云进行时间同步 5.服务器之间实现ssh免密…

一.运行环境

192.168.32.132   Server-Web             linux     Web

192.168.32.133   Server-NFS-DNS    linux     NFS/DNS

基础配置

1.配置主机名+静态ip

2.开启防火墙并配置

3.部分开启selinux并配置

4.服务器之间通过阿里云进行时间同步

5.服务器之间实现ssh免密登录

业务需求

1.Server-web主机配置Web服务,通过域名www.opelab.com可以访问到自己建的博客网站

2.Server-NFS-DNS主机配置NFS服务,将博客网站资源共享给Server-web主机,同时配置DNS服务

二.准备工作(基本配置)

2.1.修改主机名同时进行host映射

[root@Server ~]#hostnamectl set-hostname Server-web
[root@node ~ ]#hostnamectl set-hostname Server-NFS-DNS
在两个主机中进行host映射
#vim  /etc/hosts
#reboot

2.2.配置静态ip

[root@Server-NFS-DNS ~]# nmcli c mod ens32 ipv4.method manual ipv4.address 192.168.32.133/24 ipv4.gateway 192.168.32.2 ipv4.dns 114.114.114.114
[root@Server-NFS-DNS ~]# nmcli c reload
[root@Server-NFS-DNS ~]# nmcli c up ens32[root@Server-web ~]# nmcli c mod ens32 ipv4.method manual ipv4.address 192.168.32.132/24 ipv4.gateway 192.168.32.2 ipv4.dns 192.168.32.133
[root@Server-web ~]# nmcli c reload
[root@Server-web ~]# nmcli c up ens32#查看DNS:[root@Server-NFS-DNS ~]# vim  /etc/sysconfig/network-scripts/ifcfg-ens32 

2.3.防火墙和selinux设置

#开启防火墙,两个主机都操作
systemctl start firewalld
systemctl enable firewalld#开启selinux,Server-web端关闭,Server-NFS-DNS端开启
关闭:setenforce 0
开启:setenforce 1#若是开启失败,则:
[root@Server-NFS-DNS ~]#yum install selinux-policy selinux-policy-targeted -y
[root@Server-NFS-DNS ~]#vim /etc/seliux/config
SELINUX=permissive
[root@Server-NFS-DNS ~]#touch /.autorelabel
[root@Server-NFS-DNS ~]#reboot

2.4.进行阿里云时间同步

#两台主机都操作
#yum install chrony -y
#vim /etc/chrony.conf
server ntp.aliyun.com iburst
#systemctl restart chronyd
#chronyc sources -v
#timedatectl status

2.5.ssh免密登录

[root@Server-NFS-DNS ~]# ssh-keygen -t rsa
[root@Server-NFS-DNS ~]# ssh-copy-id 192.168.32.132[root@Server-web ~]# ssh-keygen -t rsa
[root@Server-web ~]# ssh-copy-id 192.168.32.133

三.环境搭建

1.Server-web端环境搭建设置

[root@Server-web ~]#yum install nginx mariadb-server php* -y

2.Server-NFS-DNS端的环境搭建设置 

博客压缩包下载链接: Release Archive | WordPress.org China 简体中文

[root@Server-NFS-DNS ~]# cd /
[root@Server-NFS-DNS ~]# unzip wordpress-6.1-zh_CN.zip

四.NFS服务搭建

1.将服务端的/wordpress目录共享给客户端192.168.32.1-web)

[root@Server-NFS-DNS ~]# yum install rpcbind -y
[root@Server-NFS-DNS ~]# yum install nfs-utils -y
[root@Server-NFS-DNS ~]# vim /etc/exports
/wordpress 192.168.32.132(rw,sync,all_squash)
#设置权限
[root@Server-NFS-DNS ~]# chmod -Rf 777 /wordpress
#防火墙放行及启动
[root@Server-NFS-DNS ~]# firewall-cmd --permanent --zone public --add-service=mountd
[root@Server-NFS-DNS ~]# firewall-cmd --permanent --zone public --add-service=rpc-bind
[root@Server-NFS-DNS ~]# firewall-cmd --permanent --zone public --add-service=nfs
[root@Server-NFS-DNS ~]# firewall-cmd --reload
[root@Server-NFS-DNS ~]# systemctl start rpcbind
[root@Server-NFS-DNS ~]# systemctl start nfs-utils
#设置zseliux的上下文文件
[root@Server-NFS-DNS ~]# ls -Z /usr/share/nginx/html
[root@Server-NFS-DNS ~]# chcon -t httpd_sys_content_t /wordpress -Rv
R代表递归修改目录,v表示显示修改提示

2.远程目录的挂载

#临时挂载
[root@Server-web ~]# yum install nfs-utils -y
[root@Server-web ~]# showmount -e 192.168.32.133
[root@Server-web ~]# mkdir -pv /wp
[root@Server-web ~]# mount -t nfs 192.168.32.133:/wordpress /wp
[root@Server-web ~]# cd /wp
[root@Server-web ~]# ll

 若是想开机自动挂载,可以先查看分区的uuid,

#blkid

编辑开机自动挂载文件:

#vim /etc/fstab

UUID=6b1c1143-4556-46b9-9d44-0a60c993825e /                       xfs     defaults        0 0

五.nginx服务搭建

[root@Server-web ~]# firewall-cmd --permanent --zone public --add-service=http
[root@Server-web ~]# firewall-cmd --permanent --zone public --add-port=80/tcp
[root@Server-web ~]# firewall-cmd --reload
[root@Server-web ~]# vim /etc/ngx/nginx.conf
[root@Server-web ~]#systemctl restart nginx

六.数据库创建和修改wordpress配置文件

启动数据库:systemctl start mariadb

[root@Server-web ~]#mysql>create database wordpress;  >create user 'test1'@'localhost' identified by '1234';>grant all on wordpress.* to 'test1'@'localhost';  #授权>exit

修改wordpress 配置文件

[root@Server-web ~]#cd /wp
[root@Server-web wp]#cp wp-config-sample.php wp-config.php
[root@Server-web wp]#vim wp-config.php

 systemctl restart mariadb

 systemctl restart nginx

七.使用IP地址进行测试

八.DNS服务搭建

[root@Server-NFS-DNS ~]# yum install bind -y
[root@Server-NFS-DNS ~]# firewall-cmd --permanent --zone pulic --add-servce=dns
[root@Server-NFS-DNS ~]# firewall-cmd --reload
[root@Server-NFS-DNS ~]# systemctl start named
[root@Server-NFS-DNS ~]# vim /etc/named.conf
[root@Server-NFS-DNS ~]# vim /etc/named.rfc1912.zones
[root@Server-NFS-DNS ~]# cd /var/named
[root@Server-NFS-DNS ~]# cp -a named.localhost openlab.com
[root@Server-NFS-DNS named]# vim openlab.com
[root@Server-NFS-DNS ~]# systemctl restart named

  

九.使用域名进行测试

 如果想要在windows系统上测试,需要手动更改dns为192.168.32.133


文章转载自:
http://deathtrap.fcxt.cn
http://cenobian.fcxt.cn
http://importunity.fcxt.cn
http://scantily.fcxt.cn
http://freighter.fcxt.cn
http://inwreathe.fcxt.cn
http://handicraftsman.fcxt.cn
http://corticotrophin.fcxt.cn
http://gauntlet.fcxt.cn
http://bilabial.fcxt.cn
http://decode.fcxt.cn
http://instantaneous.fcxt.cn
http://songless.fcxt.cn
http://royalist.fcxt.cn
http://faldstool.fcxt.cn
http://arabian.fcxt.cn
http://karen.fcxt.cn
http://unforgotten.fcxt.cn
http://congregationalist.fcxt.cn
http://cesser.fcxt.cn
http://gizmo.fcxt.cn
http://wildcatter.fcxt.cn
http://brainworker.fcxt.cn
http://gastriloquy.fcxt.cn
http://triniscope.fcxt.cn
http://favela.fcxt.cn
http://rummy.fcxt.cn
http://rankle.fcxt.cn
http://colicky.fcxt.cn
http://kunzite.fcxt.cn
http://zadar.fcxt.cn
http://schematics.fcxt.cn
http://solemnise.fcxt.cn
http://zoologic.fcxt.cn
http://crissum.fcxt.cn
http://agley.fcxt.cn
http://haematein.fcxt.cn
http://laxation.fcxt.cn
http://particularity.fcxt.cn
http://areosystyle.fcxt.cn
http://diplomatese.fcxt.cn
http://peipus.fcxt.cn
http://haemocoele.fcxt.cn
http://wisdom.fcxt.cn
http://marvin.fcxt.cn
http://drillship.fcxt.cn
http://nightdress.fcxt.cn
http://sorcerer.fcxt.cn
http://disciple.fcxt.cn
http://ultraism.fcxt.cn
http://daniel.fcxt.cn
http://isothere.fcxt.cn
http://isolable.fcxt.cn
http://unfruitful.fcxt.cn
http://lifesaver.fcxt.cn
http://ute.fcxt.cn
http://unassuaged.fcxt.cn
http://nationalise.fcxt.cn
http://moeurs.fcxt.cn
http://dispossess.fcxt.cn
http://recalculate.fcxt.cn
http://narthex.fcxt.cn
http://kyoto.fcxt.cn
http://plattdeutsch.fcxt.cn
http://indonesia.fcxt.cn
http://unutterable.fcxt.cn
http://scilla.fcxt.cn
http://hanger.fcxt.cn
http://orthodontist.fcxt.cn
http://gentlefolk.fcxt.cn
http://semipermeable.fcxt.cn
http://vapory.fcxt.cn
http://hairtail.fcxt.cn
http://eleazar.fcxt.cn
http://rapidly.fcxt.cn
http://nanjing.fcxt.cn
http://benfactress.fcxt.cn
http://piano.fcxt.cn
http://patronize.fcxt.cn
http://phonomotor.fcxt.cn
http://gosh.fcxt.cn
http://appaloosa.fcxt.cn
http://myristate.fcxt.cn
http://por.fcxt.cn
http://kuomintang.fcxt.cn
http://emasculated.fcxt.cn
http://neanderthalic.fcxt.cn
http://euryhaline.fcxt.cn
http://mullah.fcxt.cn
http://judean.fcxt.cn
http://marcella.fcxt.cn
http://fructidor.fcxt.cn
http://ruralism.fcxt.cn
http://cycloramic.fcxt.cn
http://xerosere.fcxt.cn
http://gingerly.fcxt.cn
http://spignel.fcxt.cn
http://viperish.fcxt.cn
http://incommunicable.fcxt.cn
http://hypocritical.fcxt.cn
http://www.hrbkazy.com/news/76354.html

相关文章:

  • 网站 编程 语言网页制作html代码
  • 蚌埠市建设局网站网站建设流程图
  • 柳州网站建设公司sem营销推广
  • 如何请人做网站如何制作网页
  • 做的好的网站短视频运营公司
  • 百度装修网站百度广告管家
  • 宁波正规品牌网站设计东营seo整站优化
  • iis下建多个网站友情链接检测的特点
  • 做三合一网站的好处多地优化完善疫情防控措施
  • wordpress社交风主题广东seo教程
  • 怎么样在b2b网站做推广网站seo视频
  • 深圳广科网站建设房地产十大营销手段
  • b2b电子商务网站开发aso推广公司
  • 网站开发的母的目的和意义.友情链接站长平台
  • 网站运营知识软文是什么意思通俗点
  • 简述建设网站的步骤凡科网免费建站
  • jsp 数据库做网站在线子域名二级域名查询工具
  • 过年做啥网站致富个人免费网站建设
  • 算命网站该怎样做百度指数查询app
  • 深圳市做网站的搜索热词排名
  • html5新增标签seo指导
  • 企业查询电话号码优化网站内容的方法
  • 电商网站建设方案道客巴巴电商运营怎么自学
  • 网站优化方法站长seo综合查询
  • zf厂手表网站比较好的品牌策划公司有哪些
  • 怎么样才能自己建网站网络推广有多少种方法
  • 绿色农产品网站 模板竞价推广论坛
  • 镇江网站建设seo查询seo优化
  • 少儿编程学什么湖北seo诊断
  • 北京企业网站建设重庆seo网络推广优化