Articles of ubuntu 12.04

在Ubuntu上使用HAProxy和Nginx的SSL终止

我一直在关注这个教程: http://www.exratione.com/2012/12/websockets-over-ssl–haproxy-nodejs-nginx/ …但我一直有问题通过HAProxy通过SSL连接到Nginx。 我得到Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error. 在Chrome之后的HTTP到HTTPSredirect和(Error code: ssl_error_rx_record_too_long)在Firefox中。 我认为这与文件串联来创build.pem文件有关。 我试过的东西: 禁用HAProxy并直接使用SSL来访问Nginx 在HAProxy上不使用SSL来访问Nginx,这也可以 按照以下步骤创build新的SSL证书: http : //wiki.nginx.org/HttpSslModule 检查SSL证书文件的权限 我的Nginxconfiguration: server { listen 8080 ssl; ## listen for ipv4; this line is default and implied root /usr/share/nginx/www; index index.html index.htm; server_name localhost; ssl_certificate /etc/ssl/certs/server.crt; ssl_certificate_key /etc/ssl/private/server.key; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; […]

从机器/进程发送邮件到外部机器

我运行的Ubuntu 12.04lts服务器与denyhosts,logwatch,apticron等守护进程发送电子邮件给机器上的用户,当发生什么事情。 由于我不使用root帐户, 我把所有到根目录的东西都归到了我自己的超级用户帐户中: mailer-daemon: postmaster postmaster: root nobody: root hostmaster: root usenet: root news: root webmaster: root www: root ftp: root abuse: root noc: root security: root root: richard 邮件现在被传送到我的richard账户。 为了转发每一封邮件,我添加了这一行: richard: [email protected], richard 服务器的主机名是srv1.domain.com。 我不想在这台机器上收到外部邮件。 我只是想从机器发出的本地邮件被转发到我的,托pipe在谷歌业务应用程序,远程邮件。 如何configurationexim(至less我认为这是ubunutu的默认MTA)来做到这一点?

Ubuntu 12.04 KVM主机高负载闲置Ubuntu的12.04客人

我坚持这一个。 在两台物理机器上安装Ubuntu 12.04 server 64bit。 机器是相同的,除了一个有8GB内存和有问题的机器有32GB内存,两台机器同时购买相同的规格。 Ubuntu在24小时前完全更新。 我通过SSH隧道上的X-windows使用virt-manager来pipe理虚拟机,服务器操作系统根本不运行X-windows会话。 构build并运行多个Ubuntu 12.04服务器64位虚拟机,每个虚拟机分配1GB RAM。 虚拟机的configuration基本都是一样的(原谅MAC地址等)。 8GB的机器有2xVM,32GB的机器有3个VM。 所有的虚拟机报告低负载(小于0.5,通常为0.01),并没有高度利用。 8GB主机服务器报告负载小于0.1,一般为0.01。 32GB主机服务器报告负载大于10.0持续。 同样,所有虚拟机都报告内部负载小于0.5。 最高的CPU是95%+空闲,0.0%等待。 关于为什么32GB机器具有高负载(同时主机空闲和来宾空闲),而同样configuration的8GB机器报告预期的低负载? 一台虚拟机启动时,32GB的负载变高,运行3台虚拟机不会使负载变高。 停止所有虚拟机会导致32GB的机器负载下降。 我无法弄清楚这一点。 我希望32GB的负载能够匹配8GB的负载。 更新#1:内森C top – 16:19:54 up 8 days, 6:01, 1 user, load average: 14.33, 18.23, 18.07 Tasks: 135 total, 1 running, 134 sleeping, 0 stopped, 0 zombie Cpu(s): 0.5%us, 0.4%sy, 0.0%ni, 98.9%id, 0.0%wa, […]

在将NGINX作为GAE的反向代理服务器时,出现错误的网关

我想使用NGINx作为反向代理服务器,所以我可以从中国大陆打开我的GAE(谷歌应用程序引擎)网站,因为大部分谷歌IP被GFW阻止。 DNS:我有这些DNSlogging: – A mydomain.com ==> xxxx CNAME www ==> ghs.google.com CNAME * ==> ghs.google.com 我打算使用地理DNS指向我的反向代理,以防万一来自中国大陆的请求,目前我通过将主机logging点mydomain.com本地进行本地testing。 我在Ubuntu 12.04上有nginx 1.1.19。 我的网站configuration文件是: server { #listen 80; listen 443 ssl; server_name mydomain.com; ssl on; ssl_certificate /home/user/Desktop/ssl/mydomain.com.pem; ssl_certificate_key /home/user/Desktop/ssl/mydomain.com.key; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; ssl_prefer_server_ciphers on; large_client_header_buffers 4 16k; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; # keepalive_timeout 70; location […]

Ubuntu升级过程失败

我尝试远程升级我的percona群集上的我的Ubuntu服务器,但它失败,这个消息 The following packages have unmet dependencies: libmysqlclient18 : Depends: libmariadbclient18 (= 5.5.33a+maria-1~precise) but it is not installable 这里是包列表 # dpkg –list | grep -E 'percona|mysql' ii libdbd-mysql-perl 4.020-1build2 Perl5 database interface to the MySQL database iU libmysqlclient18 5.5.33a+maria-1~precise Virtual package to satisfy external depends ii mariadb-common 5.5.33a+maria-1~precise MariaDB database common files (eg /etc/mysql/conf.d/mariadb.cnf) ii […]

将Docker容器端口暴露给eth0

第一:有300名代表的人可以给“docker工人”做个标签吗? TYVM 我使用以下命令为elasticsearch运行docker容器: docker run -d -i -t -p 9200:9200 -p 9300:9300 elasticsearch:0.90.5 哪个启动正确,当我curl localhost:9200我得到了elasticsearch json hello world消息。 我无法弄清楚的是如何让端口暴露在盒子外面。 我想要做的是: docker run -d -i -t -p 123.123.123.123:9200:9200 -p 123.123.123.123:9300:9300 elasticsearch:0.90.5 其中123.123.123.123是eth0的IP地址。 这似乎并不奏效。 现在我的问题是:我如何正确运行这个容器并将这些端口暴露给外部世界呢? 这是我的“ip addr”,它是一个运行Ubuntu 12.04的无头虚拟机。 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 […]

Ubuntu 12.04 – 绑定接口的别名无法正常工作

我有以下/ etc /networking/接口 # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet manual bond-master bond0 bond-primary eth0 auto eth1 iface eth1 inet manual bond-master bond0 auto bond0 iface bond0 inet static address 172.17.1.210 netmask 255.255.255.0 gateway 172.17.1.1 bond-mode 1 bond-miimon 100 bond-slaves none iface bond0:1 inet static address […]

如何获取Nginx非根(“/”)位置来提供文件?

我是Nginx的初学者。 我用Ubuntu 12.04租了一点VPS来testing。 我租了没有域名,所以我直接使用IP请求。 对于这个问题,我们假设IP是209.208.26.89 。 从官方ppa安装最新的稳定的Nginx。 安装Nginx并检查工作正常后(使用浏览器浏览http://209.208.26.89 ),我从/ etc / nginx / sites-enabled中删除了默认configuration。 我首先使用了这个configuration: server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /home/www-data/public-www; index index.html index.htm; #index.html is inside /home/www-data/public-www server_name 209.208.26.89; #remember, no domain location /example { root /home/www-data/public-www/example; index hello.html; #hello.html is inside /home/www-data/public-www/example try_files $uri $uri/ =404; } } […]

Grub使用LVM在硬件RAID上安装失败

我有一个安装了Areca RAID控制器的SuperMicro盒子。 RAID控制器configuration为RAID 6 +热备份。 我正在尝试安装Ubuntu 12.04 LTS。 我为/,/ var,swap和/ data设置了独立分区的LVM。 在安装程序进行时,我在Grub安装步骤中反复失败:“Unable to install grub / dev / sda” – 尝试手动指定安装Grub的位置(推测是/ dev / mapper / vg0-root)产生类似的结果。 LVMconfiguration: 触发失败的安装步骤: 错误:

mkfs无法创build新的xfs分区

我正在使用Ubuntu LTS 12.04服务器作为VMware Workstation上的虚拟机。 最近,我扩展了逻辑磁盘。 我使用sudo fdisk / dev / sdb命令,并创build了一个名为sdb1的扩展磁盘。 当我运行fdisk -l命令时,它显示了我: 控制器@控制器:〜$ sudo fdisk -l Disk /dev/sda: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes […]