nodejs for centos配置
mongodb
http://www.cnblogs.com/zhoulf/archive/2013/01/31/2887439.html
nodejs
http://zhaohe162.blog.163.com/blog/static/38216797201402234212981/
mem
http://blog.csdn.net/yybjroam05/article/details/8651789
memcached -d -p 11212 -u memcached -m 64 -c 1024 -P /var/run/memcached/memcached.pid
memcached -d -p 11213 -u memcached -m 64 -c 1024 -P /var/run/memcached/memcached.pid
nginx
http://www.cnblogs.com/zhoulf/archive/2013/02/09/2909653.html
-
Nginx: error while loading shared libraries: libpcre.so.1解决Shell代码[ew69@localhost conf]# /usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory确认已经安装PCRE:Shell代码[ew69@SCLABHADOOP01 lib]$ cd /lib[ew69@SCLABHADOOP01 lib]$ ls *pcre*libpcre.so.0 libpcre.so.0.0.1[hadoop@SCLABCLUS01 nginx]$ find / -type f -name *libpcre.so.*添加软链接:Shell代码[ew69@SCLABHADOOP01 lib]$ ln -s /lib/libpcre.so.0.0.1 /lib/libpcre.so.1前面在一般的linux上可以解决此问题.注: 在有的操作系统上面,安装pcre后,安装的位置为/usr/local/lib/*pcre*在redhat 64位机器之上有这样的情况.在redhat 64位机器上, nginx可能读取的pcre文件为/lib64/libpcre.so.1文件.所以在改用下面的软连接:Shell代码[hadoop@SCLABHADOOP01 ~]$ ln -s /usr/local/lib/libpcre.so.1 /lib64/
mysql
http://www.2cto.com/database/201305/208114.html
修改密码 刷新权限和重启mysql
update user set password=password('自己的密码') where user='root';
flush privileges;
service mysqld restart;
删除匿名用户
在MySQL刚刚被安装后,存在用户名、密码为空的用户。这使得数据库服务器有无需密码被登录的可能性。为消除隐患,将匿名用户删除。
[root@sample ~]# mysql -u root -p ← 通过密码用root登录
Enter password: ← 在这里输入密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.1.20
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select user,host from mysql.user; ← 查看用户信息
+------+----------------------------+ www.2cto.com
| user | host |
+------+----------------------------+
| | localhost |
| root | localhost |
| | sample.centospub.com |
| root | sample.centospub.com |
+------+----------------------------+
4 rows in set (0.02 sec)
mysql> delete from mysql.user where user=''; ← 删除匿名用户
Query OK, 2 rows affected (0.17 sec)
mysql> select user,host from mysql.user; ← 查看用户信息
+------+----------------------------+
| user | host |
+------+----------------------------+
| root | localhost |
| root | sample.centospub.com |
+------+----------------------------+
http://blog.163.com/chengwei_1104/blog/static/53645274201271684740219/
CentOS下开启mysql远程连接,远程管理数据库
2012-08-16 08:47:40| 分类: mysql |举报|字号 订阅
当服务器没有运行php、没装phpmyadmin的时候,远程管理mysql就显得有必要了。因为在CentOS下设置的,所以标题加上了CentOS,以下的命令在debian等系统下应该也OK。
mysql -u root -p mysql # 第1个mysql是执行命令,第2个mysql是系统数据名称
在mysql控制台执行:
grant all privileges on *.* to 'root'@'%' identified by '远程登录的密码,可以和本地的不同' with grant option;
# root是用户名,%代表任意主机,'123456'指定的登录密码(这个和本地的root密码可以设置不同的,互不影响)
flush privileges; # 重载系统权限
exit;
允许3306端口
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
# 查看规则是否生效
iptables -L -n # 或者: service iptables status
# 此时生产环境是不安全的,远程管理之后应该关闭端口,删除之前添加的规则
iptables -D INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
PS,上面iptables添加/删除规则都是临时的,如果需要重启后也生效,需要保存修改:
service iptables save # 或者: /etc/init.d/iptables save
另外,
vi /etc/sysconfig/iptables # 加上下面这行规则也是可以的
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
远程管理数据库的软件,win系统下可以使用SQLyog,用了几种远程软件,感觉这个用起来蛮不错的。
webmin
root
系统密码
服务器为多网卡,找出到公网的网口.利用-i [port_name]配置允许访问TCP:22和TCP:1521;其他协议及端口默认拒绝.
iptables -A INPUT -i eth1 -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --dport 10000 -j ACCEPT
iptables -A INPUT -i eth1 -j DROP
运行/etc/rc.d/init.d/iptables save保存配置文件到/etc/sysconfig/iptables下
运行service iptables restart确认重启iptables后规则仍有效.
下面是nginx的配置文件已经开了ssl
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
#20141012add
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_set_header Host $http_host;
#proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:3000/;
#proxy_redirect off;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /root/project/cloud/ssl-crt.pem;
ssl_certificate_key /root/project/cloud/ssl-key.unsecure;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
proxy_pass http://localhost:3001/;
}
}
}
nodejs for centos配置的更多相关文章
- Centos 配置服务器
Centos 配置服务器 (配置服务器 除了Git Bash Here 还可以安装Xshell 网址:https://xshell.en.softonic.com/ Wincp 网址:https: ...
- Linux CentOS 配置Tomcat环境
一.下载Tomcat 下载Tomcat方式也有两种,可以参考我的前一篇博文Linux CentOS配置JDK环境,这边就不再赘述. 二.在Linux处理Tomcat包 1.创建tomcat文件夹 mk ...
- CentOS 配置防火墙操作实例(启、停、开、闭端口):
CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service iptables status< ...
- CentOS配置SSH免密码登录后,仍提示输入密码
CentOS配置SSH无密码登录需要3步: 生成公钥和私钥 导入公钥到认证文件,更改权限 测试 1.生成公钥和私钥 ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa 默 ...
- CentOS配置ssh无密码登录
CentOS配置ssh无密码登录的注意点 前提配置:使用root登录修改配置文件:/etc/ssh/sshd_config,将其中三行的注释去掉,如下: 然后重启ssh服务:service s ...
- 在VMware中为CentOS配置静态ip并可访问网络-Windows下的VMware
在VMware中为CentOS配置静态ip并可访问网络-Windows下的VMware 首先确保虚拟网卡(VMware Network Adapter VMnet8)是开启的,然后在windows的命 ...
- CentOS 配置防火墙操作实例(启、停、开、闭端口)CentOS Linux-FTP/对外开放端口(接口)TomCat相关
链接地址:http://blog.csdn.net/jemlee2002/article/details/7042991 CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作 ...
- Linux工具XFTP、Xshell(centos配置java环境 工具篇 总结一)
♣Xmanager5是什么? ♣安装XFTP ♣安装Xshell 1.Xmanager5(官网:https://www.netsarang.com/download/software.html)是全新 ...
- Linux配置mysql (centos配置java环境 mysql配置篇 总结四)
♣安装的几种方法和比较 ♣配置yum源 ♣安装mysql ♣启动mysql ♣修改密码 ♣导入.sql文件 ♣缓存设置 ♣允许远程登录(navicat) ♣配置编码为utf8 1.关于Linux系统 ...
随机推荐
- ios学习开发阶段小结
总结一下,开发了1个月10天的ios经验. 先晒成绩单:两个实验性质的app,一个wifi管家,一个图片壁纸软件 技术小结: 1.熟悉基本的各种ns语法:#import,#include,@class ...
- jQuery Ajax 全解析(转)
<!-- .ajax div{ border: solid 1px red; } --> // <![CDATA[ $(function(){ $("#btnajax&qu ...
- 使用SSL确保通信中的数据安全
#region Server /// <summary> /// 用于保存非对称加密(数字证书)的公钥 /// </summary> private string public ...
- Android IOS WebRTC 音视频开发总结(三二)-- WebRTC项目开发建议
本文主要介绍WEBRTC开发过程中的一些现象,文章来自博客园RTC.Blacker,支持原创,欢迎关注微信公众号blacker,更多详见www.rtc.help 随着移动互联网和智能硬件的快速发展,音 ...
- 面向初学者的 Windows 10 UWP 应用开发
眼看 Windows 10 for Mobile 正式版也快要推送了,就先挖个坑吧,原文视频链接为:Windows 10 development for absolute beginners,以下博客 ...
- C++ sstream 中处理字符串
C++引入ostringstream.istringstream.stringstream这三个类,要使用他们创建对象就必须包含<sstream>这个头文件. istringstream的 ...
- tomcat目录简介
http://www.cnblogs.com/kerrycode/p/3588816.html 主目录下面有bin.lib等目录 bin 存放Tomcat启动.停止服务程序以及一些其他脚本程序 lib ...
- Show Roles Assigned to a Specific User
Here is a query that I often use to lookup Roles assigned to a specific PeopleSoft user. At run tim ...
- [leetcode]_Count and Say
题目:一开始没看懂, 后头经过WA发现 输出 的意义 是 出现的次数+值. 1 => 一个1 => 11 11 => 两个1 => 21 111=> 三个1 => ...
- [原]Python Web部署方式总结
不要让服务器裸奔 学过PHP的都了解,php的正式环境部署非常简单,改几个文件就OK,用FastCgi方式也是分分钟的事情.相比起来,Python在web应用上的部署就繁杂的多,主要是工具繁多,主流服 ...