博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
阿里云ECS上CentOS系统配置从入门到进门
阅读量:6862 次
发布时间:2019-06-26

本文共 920 字,大约阅读时间需要 3 分钟。

服务器端创建新用户

为服务器安全起见,创建用户(用户名:yishi):

useradd yishi

设置密码:

passwd yishi

添加sudo权限:

usermod -aG wheel yishi

关闭Root的远程访问

修改/etc/ssh/sshd_config

PermitRootLogin no

然后:

service sshd restart

开启SSH的公钥访问

$ cat id_rsa.pub >> ~/.ssh/authorized_keys$ chmod 700 ~/.ssh$ chmod 600 ~/.ssh/id_rsa # Disable password authentication forcing use of keysPasswordAuthentication no

MongoDB

Create/etc/yum.repos.d/mongodb-org-3.2.repo,Content:

[mongodb-org-3.2]name=MongoDB Repositorybaseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/gpgcheck=1enabled=1gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc

Client only:

sudo yum install -y mongodb-org-shell

语言报错的处理

export LC_ALL=Cmongo

NodeJS连接阿里云MongoDB数据库

dbURI = sprintf("mongodb://%s:%s@%s:%d,%s:%d/%s?replicaSet=%s", conf.username, conf.password, conf.host1, conf.port1, conf.host2, conf.port2, conf.dbname, conf.replSetName);

随机密码-MAC上

openssl rand -hex 16

转载地址:http://sphyl.baihongyu.com/

你可能感兴趣的文章
excel 如何快速实现绝对引用
查看>>
AE套宗获取内环
查看>>
ios 开源代码
查看>>
在C++工程中设置全局函数
查看>>
2016第26周一
查看>>
codeforces水题100道 第十六题 Codeforces Round #164 (Div. 2) A. Games (brute force)
查看>>
二级联动菜单
查看>>
android文件的写入与读取---简单的文本读写context.openFileInput() context.openFileOutput()...
查看>>
主成分分析(PCA)原理及R语言实现
查看>>
mybatis 一对多
查看>>
解读Raft(二 选举和日志复制)
查看>>
MySQL binlog
查看>>
Vertica 高可用性测试
查看>>
用500行Julia代码开始深度学习之旅 Beginning deep learning with 500 lines of Julia
查看>>
html 标签 中 的Lang 有什么用
查看>>
【CUDA学习】GPU硬件结构
查看>>
android Run模式也会出现"Waiting for debugger"的解决方法
查看>>
T-SQL查询进阶--详解公用表表达式(CTE)
查看>>
[转]Android蓝牙开发浅谈
查看>>
读书笔记:《搞定3--平衡工作和生活的艺术》
查看>>