编写网站架构 网站架构的搭建_编写网站架构

先配置IP地址

--vi   /etc/sysconfig/network-scripts/ifcfg-eno16777736 

重启网络

--service  network  restart

关闭防火墙

iptables -F
iptables -x
iptables -X
iptables -L
setenfore 0

修改主机名,让名字临时生效

hostname openstack-001
houstname

查看

cat /etc/hosts
检测是否成功
ping openstack-001
创建DVD,挂载到DVD下
--mkdir  /opt/dvd
--ls  /opt  (查看挂载上没)
--mount  /dev/sr0  /opt/dvd/
yum clean all,清除缓存
 yum list,列出环境

安装软件包

--yum install httpd httpd-devl mariadb-server mariadb-devel php php-mysql php-devl

启动服务httpd,mysql,一条命令启动俩个服务

--systemctl   restart {httpd,mariadb}

查看是否启动

--systemctl status httpd
--systemctl status mariadb

因第一次启动,要设置密码(mysql)

mysqladmin -u root password 000000

HTTP的端口

ss -tnmlp | grep httpd

加入一个php函数

vi index.php
<?php
  phpinfo();
?>

安装

mv /var/www/html/index.php /mnt/
ls /var/www/html/

解压文件

unzip Discuz_x3.1_sc_UTF8.zip -d /var/www/html/

更改权限

chown -R apache.apache /var/www/html/

编写网站架构 网站架构的搭建_编写网站架构_02