本文首发于 烂泥 行天下 ,由 秀依林枫 提供友情赞助。 看到文章的标题,你就有可能发笑了。现在建一个网站或者博客还需要使用IIS吗? 说了不怕各位笑话,我到目前为止对IIS还真的不怎么了解呢。今天刚刚好,趁着这个机会搭建一个以SQLServer为数据库、IIS为
本文首发于烂泥行天下,由秀依林枫提供友情赞助。
看到文章的标题,你就有可能发笑了。现在建一个网站或者博客还需要使用IIS吗?
说了不怕各位笑话,我到目前为止对IIS还真的不怎么了解呢。今天刚刚好,趁着这个机会搭建一个以SQLServer为数据库、IIS为web容器的ASP博客。该博客使用的Zblog的程序代码。
要建立此博客,我们需要做三部分工作。
1、相关环境的配置
2、SQLServer数据库的安装及配置
3、IIS的配置
4、Zblog的安装及配置
第一部分、相关环境的配置
对相关的环境的配置,我们所需要做的不多。此次实验我们是在虚拟机中进行的,所以我们搭建成功后,通过域名访问时会提示出错。
在此我们使用的ilanni.com这个域名进行访问的,所以我们需要在虚拟机的hosts文件中添加相迎的记录即可。如下图:
除此之外,我还需要交代几点。我们博客的根目录的D盘,如下图:
而ilanni.com这个博客的源码是存在的ilanni这个文件夹下的,如下图:
好了,以上就是我们对于环境所需要做的工作。接下来,我们要对数据库进行操作了。
第二部分、SQLServer数据库的安装及配置
由于ZBlog博客程序即可使用ACCESS作为数据库,也可以使用SQLServer作为数据库,所以我们再次选用的SQLServer作为数据库。而对于SQLServer数据库,我选用的是SQLServer2000免安装版。如下图:
SQLServer数据库启动成功后。我们就要建立相应的博客数据库,如下图:
数据库建好后,我们可以通过数据库客户端进行连接看看是不是能正常使用。我在此使用的是Navicat for SQLServer这个软件践行测试的,如下图:
其中需要注意的是,在主机名出填写时。如果现在的数据库的端口号没有修改的话,直接填写IP地址即可,如果修改过的话,那就要填写:“IP,端口号”的形式。而我们现在使用的绿色版的数据库使用的是7788这个端口号。所以我的填写如上图所示。
正确连接数据库的截图。
第三部分、IIS的配置
有关IIS的安装,我就不做多演示了。如果是Server 2003那你就需要安装IIS组件了。如果你是Server 2008那么安装就更简单了。我此次的演示是在Server 2003上进行的。安装完毕后的截图如下:
下面开始进行配置,因为ZBlog使用的ASP语言,所以我们要在Web服务扩展中启用一些选项,如下图:
配置完成IIS后,我们就需要ZBlog的安装。
第四部分、Zblog的安装及配置
在安装Zblog之前,我们要建立相应的网站。启动IIS,“网站”右键,新建-网站,如下图:
在描述中,我们可以随意填写。
在这个界面里面,有点需要我们注意的。“网站IP地址”建议选择全部为分配,而网站端口号建议还是使用默认的80端口,要不然你访问网站时,还要在域名后面加端口号。
而主机头这个可以填写,也可以不填写。如果这台服务器只是建立一个网站的话,就不需要填写了。但是如果有多个网站在这台服务器上,而且使用的都是80端口的,那建议填写的。有关主机头的问题,我还会单独写一篇博客的。
在此选择网站所在的路径。
网站的访问权限。
网站建立完毕后,我们点击浏览的话。会出现如下的错误截图:
我们现在需要做的是,就右键“网站”-“属性”,如下图:
然后点击“主目录”―“配置”-“选项”,把“启用父路径”勾选上即可,如下图:
此时,我们再次点击,浏览时,就正常了。如下图:
浏览正常了,我们也就可以进行ZBlog的安装了。但是正式安装Zblog之前,我们还有件事情,要做,那就是权限的分配。右键网站―“权限”,如下图:
我们要给USERS这个用户组所有的权限,要不然等会我们在安装Zblog时,会一直提示安装Zblog。
权限分配完毕后,我们就可以Zblog的安装了。如下图:
这个是检查Zblog的安装环境及相关的权限。
这个地方需要注意了。数据库的类型我们选择“MSSQL”,也就是Sqlserver。数据库主机填写本地的地址即可。因为我使用的数据是经过修改端口号的,所以填写就上就加了端口号。而其他的就需要自己填写了。
安装完毕。
已经可以正式访问了。
本次实验所使用的软件下载地址如下:
SQLServer 2000绿色免安装版:
http://pan.baidu.com/share/link?shareid=2751295335&uk=3104283265
Navicat for SQLServer绿色安装版:
http://pan.baidu.com/share/link?shareid=2748637692&uk=3104283265
烂泥行天下

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

Key metrics for EXPLAIN commands include type, key, rows, and Extra. 1) The type reflects the access type of the query. The higher the value, the higher the efficiency, such as const is better than ALL. 2) The key displays the index used, and NULL indicates no index. 3) rows estimates the number of scanned rows, affecting query performance. 4) Extra provides additional information, such as Usingfilesort prompts that it needs to be optimized.

Usingtemporary indicates that the need to create temporary tables in MySQL queries, which are commonly found in ORDERBY using DISTINCT, GROUPBY, or non-indexed columns. You can avoid the occurrence of indexes and rewrite queries and improve query performance. Specifically, when Usingtemporary appears in EXPLAIN output, it means that MySQL needs to create temporary tables to handle queries. This usually occurs when: 1) deduplication or grouping when using DISTINCT or GROUPBY; 2) sort when ORDERBY contains non-index columns; 3) use complex subquery or join operations. Optimization methods include: 1) ORDERBY and GROUPB

MySQL/InnoDB supports four transaction isolation levels: ReadUncommitted, ReadCommitted, RepeatableRead and Serializable. 1.ReadUncommitted allows reading of uncommitted data, which may cause dirty reading. 2. ReadCommitted avoids dirty reading, but non-repeatable reading may occur. 3.RepeatableRead is the default level, avoiding dirty reading and non-repeatable reading, but phantom reading may occur. 4. Serializable avoids all concurrency problems but reduces concurrency. Choosing the appropriate isolation level requires balancing data consistency and performance requirements.

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

The MySQL learning path includes basic knowledge, core concepts, usage examples, and optimization techniques. 1) Understand basic concepts such as tables, rows, columns, and SQL queries. 2) Learn the definition, working principles and advantages of MySQL. 3) Master basic CRUD operations and advanced usage, such as indexes and stored procedures. 4) Familiar with common error debugging and performance optimization suggestions, such as rational use of indexes and optimization queries. Through these steps, you will have a full grasp of the use and optimization of MySQL.

MySQL's real-world applications include basic database design and complex query optimization. 1) Basic usage: used to store and manage user data, such as inserting, querying, updating and deleting user information. 2) Advanced usage: Handle complex business logic, such as order and inventory management of e-commerce platforms. 3) Performance optimization: Improve performance by rationally using indexes, partition tables and query caches.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version
Visual web development tools

Atom editor mac version download
The most popular open source editor