如何搭建个人博客

有不少朋友想要搭建个人博客,这里以我的个人网站为例说说吧。 搭建类似本站的博客,你需要以下东西:域名、空间和网页程序。 域名 zoufeng.net这个域名是在西部数码购买的。国内比较有名的是新网、西部数码等代理商,国外的是godaddy。对于E文不好的同学,这里推荐选择国内的代理商。 1.注册用户 这个就没什么好说了,到某个域名代理网站按说明注册用户就好。 2.选择并购买域名 输入你喜欢的域名,点击查询。如下图,你就可以看到哪些域名你可以注册。对于建站来说,域名是挺便宜的,现在.com等主流域名首年只需要40+块,续费的话也不过是90+元/年。 点击注册按钮后,会填写域名注册的相关资料,按你的实际情况填写就可以。 3.域名解析。 购买成功后,打开你的管理中心,选择域名管理,会在列表里看到你的域名。 下图可以看到我有两个已经解析的记录。分别是一级域名(这里用@表示)和二级域名www。两个都作A记录指向我的主机IP,关于主机,下文会提及。你还可以添加多条记录,解析类型一般是A记录和CNAME(别名)记录。我买的主机是有提供IP的,所以我选择A记录就行,但有些主机商提供给你的是一个二级或三级域名,此时就需要你选择CNAME记录了。 至此,你就完成了域名解析,只要DNS服务器更新后(几分钟-几小时不等),你就可以用域名访问你的网站了。怎么知道是否解析成功呢?打开CMD,用ping命令。下图看到已经可以解析为指定的IP了。 空间 1.购买空间 空间用来存放网站程序。你可选择虚拟主机、VPS或者云服务器。发表本文章时,本站是挂在美国VPS里的。现已挂在国内主机。 三种空间各有优势,本文就不分析了。对于网络上免费的空间(像主机屋啥的),这里不推荐大家使用,除非你是用于普通学习,没打算保存数据。 阿里之前是有ACE云引擎(可以看做空间)免费体验的,现在免费账号貌似不提供了。 2015年4月阿里ACE已实现按量付费,这意味着你可以购买使用了。 如果你和我一样没什么钱,建议买一个便宜VPS。关于我的VPS,可以参看这篇文章 /posts/move-to-vps/。 2.绑定域名(搭建好LAMP环境后操作) 还记得刚刚将域名解析为主机IP了吗?那只是做了将域名解析为IP的部分,当我在浏览器输入域名或IP的时候,谁来做出响应呢?此时就需要在主机绑定域名了。 如果你购买的是虚拟主机或云服务器,你可以在你购买的网站打开管理主机或服务器的面板,将域名绑定。 如果你买的是VPS,假设你安装的是Linux,那么你需要在你的web服务器配置文件(例如Apache的httpd.conf文件)配置绑定你的域名。 安装网页程序 目前主流的个人博客程序是用PHP写的WordPress。当然如果你喜欢折腾,自己写一个只属于你自己的博客也未尝不可。 1.配置环境 安装此程序前,如果你买的是VPS,需要先搭建好LAMP环境,请参考这篇文章 /posts/lnmp-lamp-lnmpa-install-by-one-press/ 虚拟主机不需要配置环境,提供商已经配置好了。 2.下载WP 首先到官网下载最新版本的WordPress,下载后是一个压缩包。 3.将WP文件上传到主机 如果你的是虚拟主机且不支持解压操作,那么你先在本地解压。再利用FTP上传工具上传到主机。VPS的话,为了提高上传效率,直接将zip包通过FTP上传到指定目录,然后用unzip命令解压就可以。FTP工具,这里推荐使用FileZilla.

2015-05-06 · 1 分钟 · 35 字

在Namecheap解析邮箱

我是一个游游荡荡,经常被互联网上的各种链接引得跳来跳去的人。今天的引导流是这样的: 学习PHP的PDO -> 到博客写个相关的技术文章 -> WP后台再次注意到可以升级版本 ->先去万网备份数据 ->万网首页再次看到关于企业邮箱的注册 ->注册时,要让指定的域名解析MX和其他记录到万网邮箱 -> 前往Namecheap Ok,以上就是我今天的时光流。 话说到我登录了Namecheap,看到如往常一样龊的管理面板。但在记录解析处没有看到MX类型,百度之,看到某网友在11年也遇到类似我的问题,是在线和客服解决的。哥不要搜索引擎了,哥就是要和在线客服用我的烂渣英文对话!!!于是就有了本文最下面的谈话记录。 不墨迹了,说正事。首先找到你的域名管理面板。你会找到你熟悉的解析面板 然而。MAIL SETTINGS就在下面的地方。 选择 User (Mail Server’s Host Name Required) 下面的 I will specify my own MX records。然后保存就会出现下面的填写表单了。 附上我的烂E文对白~~ Your Question: Where is the domain MX RECORD,I can’t find this.Thx in advance Please wait, an operator will be with you shortly. You are now chatting with Alexandra Kr. - Domains Support 16:36Alexandra Kr.:Hello Foam! Thank you for contacting our Live Chat Support! Would you please provide me with the domain name? 16:36foam chou:zoufeng.me 16:36Alexandra Kr.:Thank you for the provided information. Please hold on. 16:36foam chou:ok 16:37Alexandra Kr.:As far as I see, your domain has the following MX records: 16:37Alexandra Kr.:zoufeng.me. 1800 IN MX 10 mx1.privateemail.com. zoufeng.me. 1800 IN MX 10 mx2.privateemail.com. 16:38foam chou:I wanna modify this 16:39foam chou:because I start the service of private mail by mistake,just now 16:39foam chou:how can I close the service of private mail? 16:40Alexandra Kr.:Please hold on, Foam. 16:42Alexandra Kr.:In order to set your custom MX records, you need to refer to the following article –https://www.namecheap.com/support/knowledgebase/article.aspx/322/78/how-can-i-setup-mx-record-for-my-domain 16:42Alexandra Kr.:As for private email, do you want to cancel it or you use a free trial private email? 16:43foam chou:I want to cancel it 16:44foam chou:Can I use the private mail by othername.zoufeng.me rather mail.zoufeng.me ? 16:44Alexandra Kr.:Please let me transfer our chat session to our Hosting department for further assistance. 16:45foam chou:OK Eugene St. has joined the conversation. 16:45Eugene St.:Hello, I will assist you further 16:45Eugene St.:Please give me a few minutes to check your previous conversation. Alexandra Kr. has left the conversation. 16:45foam chou:Thx for your coming 16:47Eugene St.:Thank you for your patience 16:49Eugene St.:So, as I understand you would like to remove Private Email MX records and moreover cancel the subscription, am I right? 16:49foam chou:Yes 16:50Eugene St.:Ler me verify your account ownership before I can cancel the subscription 16:50Eugene St.:Please provide me with your Namecheap username and your Support PIN. You can find it here: https://manage.www.namecheap.com/myaccount/modify-profile-supportsettings.aspx 16:50foam chou:select the radio “User (Mail Server’s Host Name Required) “,right? 16:51Eugene St.:Would you like to set different MX records? 16:52foam chou:yes,I wanna transer it to other mail server 16:53Eugene St.:In this case please select I will specify my own MX records radio button 16:53Eugene St.:Also, please provide the verification details so I can cancel the subscription 16:54foam chou:I want to what is the subscription?private mail? 16:54foam chou:I want to know what is the subscription?private mail? 16:57Eugene St.:Yes, email account created with Private Email service is called subscription 16:58foam chou:My Support Pin is 3298 16:59foam chou:my username is foam 17:00Eugene St.:Thank you, please give me 5-7 minutes to cancel the subscription 17:00foam chou:Okay 17:01Eugene St.:The subscription has been canceled. 17:01Eugene St.:The subscription has been canceled. 17:01Eugene St.:The subscription has been canceled. 17:01Eugene St.:The subscription has been canceled. 17:03foam chou:thx for your help :)

2015-04-01 · 3 分钟 · 468 字