// 买的是腾讯云 轻量应用服务器// 切换到根目录cd //** * 安装node * * 查看所有node包 https://nodejs.org/dist/ **/ sudo wget https://nodejs.org/dist/v16.17.0/node-v16.17.0-linux-x64.tar.xzsudo tar xf node-v16.17.0-linux-x64.tar.xzcd node-v16.17.0-linux-x64 export PATH=$PATH:/node-v16.17.0-linux-x64/bin/*** 安装 mysql**/sudo yum install mysql-serversudo systemctl enable mysqldsudo systemctl start mysqldsudo systemctl status mysqld// 无密码登录sudo mysql// 改密码ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '117304@Jie';FLUSH PRIVILEGES;// 使用密码登录sudo mysql -uroot -p/**** 文件上传* 通过ftp* ftp不支持文件夹上传**/sudo yum -y install ftpput /Users/aqiu/Desktop/Work/project/e_c/packages/backend/dist/index.js /home/lighthouse//**** scp 上传文件**/scp /Users/aqiu/Desktop/Work/project/e_c/packages/backend/dist/index.js root@43.139.155.19:/home/lighthouse/// Permission denied// vim /etc/ssh/sshd_config 修改 sshd_config文件中 PasswordAuthentication yessodo service sshd restart/*** mysql 重启***/lsof -i:3000kill -9 [PID] // 安装gitsudo yum install git/**** nvm 安装***/ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bashsource ~/.bash_profilenvm install 16.18.1nvm listnvm use 16.18.1/**** nginx 安装**/sudo yum install nginxsudo systemctl enable nginxsudo systemctl start nginxsudo systemctl status nginx// 项目目录/home/lighthouse/// 静态文件目录/usr/share/nginx/htmlecho "hello aqiu.com" | sudo tee /usr/share/nginx/html/index.html// 创建测试文件echo "你好 阿秋" | sudo tee /usr/share/nginx/html/index.html// 添加文件sudo vim /etc/nginx/conf.d/aqiu.vip.conf// 文件内容server { listen 80; server_name aqiu.vip www.aqiu.vip; root /home/lighthouse; index index.html; access_log /var/log/nginx/aqiu.vip.access.log; error_log /var/log/nginx/aqiu.vip.error.log;}// 测试nginx是否oksudo nginx -t// 映射 aqiu.vip 到 本地环境echo "127.0.0.1 aqiu.vip" | sudo tee -a /etc/hosts// 重启 nginxsudo systemctl restart nginx// 查看nginx安装目录ps -ef | grep nginx