32位centos6.9 安装nodejs+mysql环境

由于更换了一个32位的linux系统云服务器(便宜 :-)),重新安装环境的时候踩了不少坑。最开始是照着网上通过命令 wget https://nodejs.org/dist/v12.13.0/node-v12.13.0-linux-x64.tar.xz 来下载压缩包来直接部署,结果出现 cannot execute binary file 错误,这是因为32位的系统不能安装64位的nodejs, 可是官网上又没有32位的编译包,这可怎么办呢。之后我又尝试使用yum,   首先指定版本:curl --silent --location https://rpm.nodesource.com/setup_12.x | bash -  ,结果又报错Your distribution, identified as "centos-release-6-9.el6.12.3.i686", is not currently supported...意思就是不支持你这个操作系统。。

万万没想到,最后我还是安装成功了。完整记录如下:

安装gcc/c++/g++,用于编译

wget http://people.centos.org/tru/devtools-2/devtools-2.repo
mv devtools-2.repo /etc/yum.repos.d
yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc /usr/bin/gcc
ln -s /opt/rh/devtoolset-2/root/usr/bin/c++ /usr/bin/c++
ln -s /opt/rh/devtoolset-2/root/usr/bin/g++ /usr/bin/g++

 

安装Nodejs12.13.0

yum -y install make openssl-devel wget
wget https://nodejs.org/dist/v12.13.0/node-v12.13.0.tar.gz
tar -zvxf node-v12.13.0.tar.gz
cd node-v12.13.0
./configure
make && make install

安装mysql5.5

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://mirrors.neusoft.edu.cn/epel/6/i386/epel-release-6-8.noarch.rpm
yum --enablerepo=remi,remi-test install mysql mysql-server

启动mysql

service mysqld start

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值