前言
服务器方面完全小白,碰了很多坑
阿里云服务器购买
第一次用,买了个最便宜的,之前勾选的时候发现没选公网要便宜结果没勾选,一直访问不了,后面选择了弹性ip
选择镜像
选了个安畅的用的人都比较多的,正好学的也是PHP5.6
https://market.aliyun.com/products/53398003/cmjj017179.html?spm=5176.730005-53366009.467896.2.KfEWdi
弹性公网IP
选择免配置费的~就是免费
安全组配置
配置数据库3306,网页80/334,FTP21,30000-30005
服务器运行
这些都配置完成的话本地运行终端
1.连接服务器
输入公网IP(注意,私有的不行哦)回车,输入登录密码(选择镜像的时候自己输入的)
ssh root@公网IP地址
2.进入数据库并修改密码
9766D251-5D6B-45FE-810D-EA575A673A57.png
3.进入phpadmin
IP地址/phpmyadmin/
4.修改ftp密码
[root@tqh ~]# passwd ftpuser
Changing password for user ftpuser.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@tqh ~]#
5.FTP配置
3A345AC2-D516-4CE4-A5C4-D05DB2CD06E5.png
5E85883D-EE4F-477F-AAF6-20C29890BF07.png
6.移动FTP目录里的文件到apache发布目录
//移动
[root@tqh ~]# cd /ftp
[root@tqh ftp]# mv * /webdata
//查看
[root@tqh ftp]# cd /webdata
[root@tqh webdata]# ls
7.效果
公网ip/文件名
image.png












网友评论