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配置的更多相关文章

  1. Centos 配置服务器

    Centos 配置服务器 (配置服务器 除了Git Bash Here 还可以安装Xshell 网址:https://xshell.en.softonic.com/   Wincp 网址:https: ...

  2. Linux CentOS 配置Tomcat环境

    一.下载Tomcat 下载Tomcat方式也有两种,可以参考我的前一篇博文Linux CentOS配置JDK环境,这边就不再赘述. 二.在Linux处理Tomcat包 1.创建tomcat文件夹 mk ...

  3. CentOS 配置防火墙操作实例(启、停、开、闭端口):

    CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service   iptables status< ...

  4. CentOS配置SSH免密码登录后,仍提示输入密码

    CentOS配置SSH无密码登录需要3步: 生成公钥和私钥 导入公钥到认证文件,更改权限 测试 1.生成公钥和私钥 ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa 默 ...

  5. CentOS配置ssh无密码登录

      CentOS配置ssh无密码登录的注意点   前提配置:使用root登录修改配置文件:/etc/ssh/sshd_config,将其中三行的注释去掉,如下: 然后重启ssh服务:service s ...

  6. 在VMware中为CentOS配置静态ip并可访问网络-Windows下的VMware

    在VMware中为CentOS配置静态ip并可访问网络-Windows下的VMware 首先确保虚拟网卡(VMware Network Adapter VMnet8)是开启的,然后在windows的命 ...

  7. CentOS 配置防火墙操作实例(启、停、开、闭端口)CentOS Linux-FTP/对外开放端口(接口)TomCat相关

    链接地址:http://blog.csdn.net/jemlee2002/article/details/7042991 CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作 ...

  8. Linux工具XFTP、Xshell(centos配置java环境 工具篇 总结一)

    ♣Xmanager5是什么? ♣安装XFTP ♣安装Xshell 1.Xmanager5(官网:https://www.netsarang.com/download/software.html)是全新 ...

  9. Linux配置mysql (centos配置java环境 mysql配置篇 总结四)

    ♣安装的几种方法和比较 ♣配置yum源 ♣安装mysql ♣启动mysql ♣修改密码 ♣导入.sql文件 ♣缓存设置 ♣允许远程登录(navicat) ♣配置编码为utf8  1.关于Linux系统 ...

随机推荐

  1. No.002 Add Two Numbers

    Add Two Numbers Total Accepted: 160702 Total Submissions: 664770 Difficulty: Medium You are given tw ...

  2. [SSH 2] 以网站主页面浅谈Struts2配置

    导读:前面总体的介绍了一下SSH框架,那么作为Struts这一支,具体是怎么配置的呢?本篇博客则主要是以自己做过的实例中的登录一条线,简单介绍一下struts2的配置,如有不妥之处,还请大家多提点提点 ...

  3. VC与JavaScript交互(四) --- WebBrowser或CHtmlView中轻松屏蔽脚本错误(JavaScript)

    1.什么是javascript脚本错误 1.1    概述 JavaScript脚本错误包含“运行时错误”和“语法错误”. 1.2    JavaScript“语法错误” JavaScript语法错误 ...

  4. leetcode022. Generate Parentheses

    leetcode 022. Generate Parentheses Concise recursive C++ solution class Solution { public: vector< ...

  5. ibatis 改下数据库连接

             <!--<dataSource name="iBatisNet" connectionString="data source= DESKTO ...

  6. poj3020

    define     n    the number of  ' * ' define     d    the number of couple of two points define     s ...

  7. JAVA设计模式--State(状态模式)

    状态模式(State Pattern)是设计模式的一种,属于行为模式. 定义(源于Design Pattern):当一个对象的内在状态改变时允许改变其行为,这个对象看起来像是改变了其类. 状态模式主要 ...

  8. windows服务访问网络资源(局域网内共享的文件夹)

    参考: 1.http://www.cnblogs.com/jak-black/articles/windows.html 2.http://q.cnblogs.com/q/25391/ 网络映射 1. ...

  9. Web serviser请求通道在等待 00:00:59.6479648 以后答复时超时。增加传递给请求调用的超时值,或者增加绑定上的 SendTimeout 值。分配给此操作的时间可能是更长超时的一部分。

    可以把sendTimeout调长一点试试 .net webService 中: 设置这些参数,延长连接时间, closeTimeout="00:10:00" openTimeout ...

  10. Eval is Devil-MongoDB master/slave上运行Eval遇到的问题

    随便写一句,以免有跟我一样的人遇到这个问题. 驱动版本:MongoDB C# Driver 1.7.0 当在Master/Slave集群上使用Eval的时候,Eval操作只会在Master结点上运行, ...