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系统 ...
随机推荐
- ubuntu 开发环境搭建 lisp gcc python perl mysql
一: lisp sudo apt-get install emacs sudo apt-get install sbcl sudo apt-get install slime emacs里 Alt+x ...
- 记录网上资源URL
FQ(使用路由器): http://kennylee26.iteye.com/blog/1887753 http://www.iteye.com/search?type=all&query=s ...
- jquery学习记录
1.选择器实例 语法 描述 $(this) 当前 HTML 元素 $("p") 所有 <p> 元素 $("p.intro") 所有 class=&q ...
- line-height的小技巧
CSS中的line-height属性控制着文字的行间距离.通常被设置为一个无单位的值(例如:line-height:1.4),与文字尺寸是成比例的.它是排版中的一个重要的属性.太低了文字会挤在一起,太 ...
- 如何用手机维护Mysql数据库
如何用手机维护网站数据库 身边很多人都在拿ipad或iphone来玩儿游戏或听歌,大多数人认为它们就是个娱乐设备,在我看来它们同样可以帮助我们更加快捷的工作,我用手机遥控单反.用手机控制PPT的播放. ...
- Oracle:使用过程中的问题集锦
导读:在使用Oracle的过程中,又频繁的出问题.突然间就连接不上,各种报错了.在此,将问题给记录下来,方便以后查看. 一.ora 12514监听程序当前无法识别 之前一直链接使用的好好的,突然就连接 ...
- Windows phone 8 学习笔记(8) 定位地图导航(转)
Windows phone 8 已经不使用自家的bing地图,新地图控件可以指定制图模式.视图等.bing地图的定位误差比较大,在模拟器中测试新地图貌似比较理想.本节主要讲解下位置服务以及新地图控件的 ...
- javaSE第二十三天
第二十三天 338 1.进程和线程的概述 338 2.多线程(理解) 339 (1)多线程:一个应用程序有多条执行路径 339 (2)Java程序的运行原理及JVM的启动是多线 ...
- CentOS 卸载已安装软件
根据软件的安装类型,选择合适的卸载方式: 卸载前确定软件的完整的版本号:#rpm -qa ×××*#rpm -ql xxx-xxx //查找安装目录 执行卸载命令:#rpm -e xxx-xxx # ...
- 理解inode
转载:阮一峰 http://www.ruanyifeng.com/blog/2011/12/inode.html 一.inode是什么? 理解inode,要从文件储存说起. 文件储存在硬盘上,硬盘的最 ...