实验准备
一台阿里云服务器
二个域名(IP与域名已经建立解析关系)
Linux关于web架构的知识
实验步骤
1.用crt远程登录阿里云服务器
2.安装nginx,mysql,php
建议使用lnmp一键安装包安装,方便快捷
获取lnmp一键安装包链接
找到下载页面选择最新的复制其链接。
写此文时最新版本信息如下:
LNMP 1.4 测试版
http://soft.vpser.net/lnmp/lnmp1.4beta.tar.gz (131KB)
安装 163源
[root@linfan ~]# cd /etc/yum.repos.d/
[root@linfan yum.repos.d]# mv * /tmp/
[root@linfan yum.repos.d]# curl -o 163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1572 100 1572 0 0 13343 0 --:--:-- --:--:-- --:--:-- 13435
[root@linfan yum.repos.d]# sed -i 's/\$releasever/7/g' 163.repo
[root@linfan yum.repos.d]# sed -i 's/^enabled=.*/enabled=1/g' 163.repo
[root@linfan yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base centosplus extras updates
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
[root@linfan yum.repos.d]# yum -y install epel-release
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
centosplus | 3.4 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/5): base/x86_64/group_gz | 166 kB 00:00:00
(2/5): extras/x86_64/primary_db | 187 kB 00:00:00
(3/5): centosplus/x86_64/primary_db | 2.9 MB 00:00:01
(4/5): updates/x86_64/primary_db | 5.2 MB 00:00:02
(5/5): base/x86_64/primary_db | 5.9 MB 00:00:02
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================
Packa