先按照教程里的...安装 Ubuntu 16.04 64位
而不是最新版的 Ubuntu 20.04 64位
之前花了十多天在断断续续进行deploy的debug 推测是因为各种版本冲突... 说不定这个 Ubuntu
版本也是有影响?
估计因为安装的旧版本 所以安装update时候遇到提示页面
A new version (/tmp/grub.CFT1DyOx4A) of configuration file /etc/default/grub is available, but the version installed currently has been locally │ │ modified.
查了一下,建议说 「There is nothing to "fix". Choose an option you like. I would suggest to keep the local version.」
所以选择后继续安装
一切顺利 注意到安装的ruby版本真古早啊...2.3.1版本
现在2.7都出来了...
rvm list
原来安装了版本控制的「rvm」后 能用这个指令查看版本啊!能清楚的看到 “目前在用版本” “默认版本” 学会了啊啊啊啊
设定安装 Nginx 并整合 Passenger的过程 发现之前无视的提示
Compiling Phusion Passenger(R) works best when you have at least 1024 MB of virtual
memory. However your system only has 942 MB of total virtual memory (942 MB
RAM, 0 MB swap). It is recommended that you temporarily add more swap space
before proceeding.
sudo dd if=/dev/zero of=/swap bs=1M count=1024
sudo mkswap /swap
sudo swapon /swap
See also https://wiki.archlinux.org/index.php/Swap for more information about
the swap file on Linux.
If you cannot activate a swap file (e.g. because you're on OpenVZ, or if you
don't have root privileges) then you should install Phusion Passenger(R) through
DEB/RPM packages. For more information, please refer to our installation
documentation:
查相关的资料去看看到底怎么解决 因为真的报错了哈哈哈 无法正常安装
然后我就懒的释放服务器 想说再练练手看看能不能不扩大就解决 找到官网的
https://www.phusionpassenger.com/library/install/nginx/install/oss/xenial/
就用这个来安装 结果遇到
Edit /etc/nginx/nginx.conf and uncomment include /etc/nginx/passenger.conf;.
不知道怎么弄 就跳过
sudo /usr/bin/passenger-config validate-install
步骤就报错了
sudo nano /etc/nginx/nginx.conf
打开去设置 把 “#” 去掉保存就好
然后还是报错显示会有版本冲突,果然是按照教程安装了一遍 然后按照官网又安装一次导致的啊...想办法去掉一个
输入IP地址 又能正常显示 就先当做正常运行了吧
如果有遇到什么 「Passenger + Nginx and Ruby」 相关的bug也可以去参考
https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/ruby/