一、安装NVM
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm --version
二、安装nodejs
nvm install 8
node -v
三、安装MariaDB
yum -y install mariadb mariadb-server
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
vim /etc/my.cnf
[mysqld]
lower_case_table_names=1
四、安装redis
yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum --enablerepo=remi install redis
systemctl start redis
redis-cli --version
systemctl enable redis.service
- redis配置文件存放位置
/etc/redis.conf
五、安装MongoDB
vim /etc/yum.repos.d/mongodb.repo
[mongodb-org]
name=MongoDB Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mongodb/yum/el$releasever/
gpgcheck=0
enabled=1
yum makecache
yum install mongodb-org
- 如执行
mongo
时遇此错误
Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly. locale::facet::_S_create_c_locale name not valid
需执行以下命令:
export LC_ALL=C
网友评论