如何利用vps
8611
- cnly19872015-10-23论坛元老76630
- 本帖最后由 cnly1987 于 2015-10-24 00:00 编辑 *
vps-hosting有个奇葩的地方,安装win之后硬盘会变成60G,注意这是SSD~~~~
今天折腾了一天,成功搞定linux也用上这写硬盘。没错,就是用vmware端口映射
步骤就是:
1、先安装win2008(我这里的配置是1G内存,2CPU,10G硬盘【11刀资源】)2、安装vmware精简版并且安装。
下载地址:http://104.233.64.16/tool/
精简版本只有50多M 节约硬盘资源~~~~~~~3、下载linux镜像,按照自己的爱好,我这里用的是debian7
下载地址:http://104.233.64.16/4、vmware安装linux~~
这个就不多说了。选择vmware网络连接方式nat~~~5、配置vmware端口映射,
主机80--虚拟机80
主机22--虚拟机22
主机--虚拟机
如果主机要开web访问,在apache或者nginx等服务器上配置非80端口,比如我配置的是10086~6、配置2008的防火墙出入站规则,放行这些端口,完工。
然后利用SSH 登录一看~~~ 我虚拟机设置的硬盘大小的40G(留点给windows~)
- Filesystem 1K-blocks Used Available Use% Mounted on
- rootfs 40252800 742976 37465104 2% /
- udev 10240 0 10240 0% /dev
- tmpfs 51440 224 51216 1% /run
- /dev/disk/by-uuid/5d1ede7d-5b3b-4032-952c-9e3868b2c509 40252800 742976 37465104 2% /
- tmpfs 5120 0 5120 0% /run/lock
- tmpfs 311960 0 311960 0% /run/shm复制代码
这是我虚拟机的配置(新母鸡,上了个好点的U):
- root@debian:~# cat /proc/cpuinfo
- processor : 0
- vendor_id : GenuineIntel
- cpu family : 6
- model : 23
- model name : Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
- stepping : 10
- microcode : 0xa0b
- cpu MHz : 2500.088
- cache size : 6144 KB
- fdiv_bug : no
- hlt_bug : no
- f00f_bug : no
- coma_bug : no
- fpu : yes
- fpu_exception : yes
- cpuid level : 13
- wp : yes
- flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss nx constant_tsc up arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf pni ssse3 sse4_1 x2apic xsave hypervisor dtherm
- bogomips : 5000.17
- clflush size : 64
- cache_alignment : 64
- address sizes : 40 bits physical, 48 bits virtual
- power management:复制代码
- root@debian:~# free -m
- total used free shared buffers cached
- Mem: 502 77 425 0 6 47
- -/+ buffers/cache: 23 478
- Swap: 1020 0 1020
- 复制代码