首页 > 其他分享 >网站搭建过程

网站搭建过程

时间:2022-12-01 17:04:04浏览次数:64  
标签:1.1 网站 过程 x86 rpm mysql root localhost 搭建

1 Linux建站

1.1 红帽LAMP建站

基础环境

[root@localhost /]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[root@localhost /]# uname -a
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost /]# 

1.1.1、配置好yum环境

具体参考:https://www.cnblogs.com/snow2021/p/16935535.html#_label3

1.1.2 安装lamp环境

[root@localhost /]# yum -y install httpd php php-mysql mysql mysql-server

1.1.3 启动apache和mysql服务

[root@localhost /]# service httpd start
Redirecting to /bin/systemctl start  httpd.service
[root@localhost /]# service mysqld start
Redirecting to /bin/systemctl start  mysqld.service

解决mysql报错问题:参考https://blog.csdn.net/weixin_43303530/article/details/103713915

 centos7默认安装的是mariaDB,而不是mysql,所以先卸载mariaDB。

查看是否安装了mariaDB:

rpm -qa |grep mariadb

卸载已安装的mariadb:
rpm -e --nodeps mariadb-5.5.68-1.el7.x86_64
rpm -e --nodeps mariadb-libs-5.5.68-1.el7.x86_64

查看是否已经成功卸载:
rpm -qa |grep mariadb

下载mysql:
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

安装mysql:

rpm -ivh mysql-community-release-el7-5.noarch.rpm

安装mysql-server:
yum install mysql-server

再次启动mysql,service mysqld start,已经成功。

1.1.4 配置mysql root账号密码,然后登录进去。

[root@localhost /]# mysqladmin -u root password 123123
[root@localhost /]# mysql -uroot -p123123
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.51 MySQL Community Server (GPL)

Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

1.1.5 关闭防火墙和seLinux

[root@localhost /]# iptables -F
[root@localhost /]# setenforce 0

1.1.6 访问测试

浏览器输入虚拟机地址,可以看到测试页面。

 1.1.7 搭建一个网站

网站目录在/var/www/html/,可以把自己的网站源码拷贝到此目录。

1.2 Centos建站

 

2 Windows建站

2.1 Windows Server2008配置

2.2 phpstudy建站

 

标签:1.1,网站,过程,x86,rpm,mysql,root,localhost,搭建
From: https://www.cnblogs.com/snow2021/p/16941940.html

相关文章

  • mysql索引,事务,视图,存储过程,存储引擎
    一,索引1.概念索引:提供指向存储在表的指定列中的数据值的指针,然后根据指定的排序顺序对这些指针排序。数据库使用索引以找到特定值,然后顺指针找到包含该值的行。索引就......
  • 遇到大事件、沉痛悼念时怎么把网站改成黑白
    在html标签增加一个style即可<htmlstyle="filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);-webkit-filter:grayscale(100%);">刚刚查了一下,发......
  • 将 Vue.js 项目部署至静态网站托管,并开启 Gzip 压缩
    摘要:关于使用Nginx开启静态网站Gzip压缩的教程已经有很多了,但是好像没几个讲怎么在对象存储的静态网站中开启Gzip压缩。其实也不复杂,我们一起来看下~本文分享自华为......
  • 将整个网站(包括子页)变为黑白色
    有两种方法,如下:1.将整个网页设为黑白色代码如下:<styletype="text/css">-webkit-filter:grayscale(100%);</style>2.将整个网页在一个时间设为黑白色代码如......
  • 刚写完的一个用户遍历更新的SQL存储过程,分享一下吧
    setANSI_NULLSONsetQUOTED_IDENTIFIERONgo/*填充用户评价等级*/ALTERPROC[dbo].[Fill_Userinfos_BuyerRank_SellerRank]@useridVARCHAR(12)=NULLASB......
  • windows ftp 简单搭建, wget ftp
    事情起因:公司客户一台数据库服务器突然连不上了,一开始以为是密码过期了,联系学校的老师给改了密码之后,还是连不上,然后就怀疑是不是ssh服务有问题。然后发现这台服务器上没......
  • 网站SEO中302和301跳转不能用错
    301和302是最常见的HTTP重定向代码。301永久重定向301重定向是指示链接的目标已永久将URL更改为不同的URL。例如,当seoexample更名为example时,他们将URL从s......
  • Intelij idea 2022.2.3安装过程总结
    参考教程:https://www.exception.site/essay/idea-reset-eval详细安装过程参考了以上教程,本文对博主自己安装时遇到的问题进行总结。1.安装过程概述安装过程参考教程,一直......
  • 【项目管理过程的五个阶段是什么?】
    项目管理过程的五个阶段一般包括:启动、规划、执行、监控、收尾。但很多人对项目管理的全流程只知道这五大过程组。这五大过程组之间的关系是怎样的?项目管理的全流程又是什么......
  • 网站变黑白效果实现兼容ie浏览器
    ​实现的效果:​编辑 1.在公共样式添加:<styletype="text/css">body{-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:......