如何手动配置一台 VPS 运行网站

目前还是一篇备忘式的草稿:

采集多方建议,选择了 VULTR,有一个100以内充多少送多少的活动:
https://www.vultr.com/coupons/

第一步,需要一些基础知识
例如 SSH,命令行使用...

第二步,配置好服务器、设置 SSH
使用 SSH 登录: ssh root@ip

安装 LEMP:
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-7

基本配置:
https://www.digitalocean.com/community/tutorials/additional-recommended-steps-for-new-centos-7-servers
如果你还是觉得离不开 FTP
安装 VSFTPD:https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-on-centos-6--2
配置:https://www.centos.org/forums/viewtopic.php?t=39485
(建立用户组,用户,给对应文件夹授予权限)
权限设置需特别注意,root 相关需配置(降低安全性)
allow_writeable_chroot=YES

如何让网站能够访问:
DNS 配置
在 nginx 中配置:
http://www.servermom.org/how-to-add-new-site-into-your-nginx-based-centos-server/610/

21世纪了,还是用 git 来部署吧:
https://www.digitalocean.com/community/tutorials/how-to-install-git-on-centos-7

相关资料:
COMPLETE NEWBIE GUIDE TO BUILD CENTOS SERVER TO HOST WEBSITES
http://www.servermom.org/complete-newbie-guide-to-build-centos-server-to-host-websites/

CentOS7上MYSQL的安装配置:
https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-centos-7
如果在 Secure 安全配置上遇到问题,可采用办法:

mysql_upgrade --force -uroot -p

(https://stackoverflow.com/questions/43846950/column-count-of-mysql-user-is-wrong-expected-42-found-44-the-table-is-probabl)

如何在 Nginx 环境安装 Phpmyadmin:https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-with-nginx-on-a-centos-7-server
文章缺少一部分关于如何修改 Phpmyadmin 配置,可参考这个 Apache 版的教程:
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-with-apache-on-a-centos-7-server
暂时尝试失败,访问 IP/phpadmin 报错403,参考这个讨论,估计是安全性访问限制的设置问题:
https://askubuntu.com/questions/483297/why-do-i-always-get-a-403-error-with-phpmyadmin

如何在 CentOS 编辑 Mysql 配置:
http://www.inmotionhosting.com/support/website/general-server-setup/edit-mysql-my-cnf

命令行使用 Mysql 的基本操作:
https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial

如何开启 Mysql 远程链接:
https://stackoverflow.com/questions/8348506/grant-remote-access-of-mysql-database-from-any-ip-address

Comments
Write a Comment