I use the --purge
option to remove existing locales before generating new one, but seems cannot remove existing locales?
e.g.
# locale-gen --purge en_US
# locale -a
C
en_AG
en_AU.utf8
en_BW.utf8
en_US
en_US.utf8
POSIX
zh_TW
I use the --purge
option to remove existing locales before generating new one, but seems cannot remove existing locales?
e.g.
# locale-gen --purge en_US
# locale -a
C
en_AG
en_AU.utf8
en_BW.utf8
en_US
en_US.utf8
POSIX
zh_TW
I've a 100GB file and I want to split into 100 of 1GB file each (by line break)
e.g.
split --bytes=1024M /path/to/input /path/to/output
For the 100 files generated, I want to apply gzip/zip to each of these files.
Is it possible to use a single command?
I am using the following cron statement to backup from one folder to another folder in the same machine:
19 21 * * * root rsync -ac --delete /source/folder /dest/folder
When I use pstree
, I see the cron forked three processes
├─cron───cron───rsync───rsync───rsync
And ps
9972 ? Ds 1:00 rsync -ac --delete /source/folder /dest/folder
9973 ? S 0:29 rsync -ac --delete /source/folder /dest/folder
9974 ? S 0:09 rsync -ac --delete /source/folder /dest/folder
Why are three processes? Can I limit to only one?
Is it possible to force Ansible when replacing the var in yml files, which is undefined, throw out an error instead silently replaced by an empty string?
I want to make sure a given user always exist in a system, so only create when it is not exist
my current tasks is:
- name: Create default user
action: user name={{ user }} groups={{ group }} state=present
However, it raise the error when a user already exists, so how to avoid the error when the user account already exist?
I am on AWC EC2, as my server is going to make a lot of query for third party domains, I am thinking the following options
I am hesitate to install centralized recursor so it is single point of failure, and subject to attack like: http://support.godaddy.com/help/article/1184/what-risks-are-associated-with-recursive-dns-queries
Is it common nowadays now one will use name server support recursive DNS query like the above article suggest?
In term of security and performance, I am thinking to install nscd
, are there any drawback?
In my Linux server I have the following options in /etc/exports
/home *(rw,sync,no_subtree_check,no_root_squash)
And I mount from a Mac using
mount -t nfs -o resvport,rw,noatime,soft,intr,rsize=32768,wsize=32768,timeo=900,retrans=3,proto=tcp,vers=3,async 192.168.1.121:/home /Volumes/home
As you can see the server is specifying the sync
but my mount option is using async
, so which one will be used?
I have two nodes running keepalived, and two VIP, e.g.
Node 1 Node 2
VIP1 VIP2
So in each node, I have two definition of vrrp_instance
, so I assume the two vrrp_instance
in my keepalived.conf
suppose to be unique, but they can be the same values on another node, right?
On Ubuntu 12.04 LTS, with server of 512MB RAM, the apt-check
is using up to 250 memory and cause my system to un-usable every night, e.g.
ps ax | grep apt
14895 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14896 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14899 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14902 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14906 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14912 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14913 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14914 ? DN 0:01 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14915 ? DN 0:01 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14916 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14917 ? DN 0:01 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
14920 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
15299 ? DN 0:01 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
15302 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable
16368 pts/0 D+ 0:00 grep apt
What the heck this script is running multiple time and eating my system resource? There is a bug here [1] which is confirmed but without any resolution. I am a little surprised that this bug is critical and exists in the LTS, sigh...
Anyway, Not sure when the ubuntu team is able to fix, Any idea how to do it by us?
[1] https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/746508
Are there any suggestion on when should I use roundrobin
& when should I use leastconn
?
I am using roundrobin
currently and observed the loading of my back-end servesr are not evenly distribution. Of course there might be other issue, but we want to give leastconn
a try, but as it is a mission critical server, I want to consult other experience before making the changes.
Any idea to share?
Is there a command I can use to verify the public key (id_rsa.pub), just the format only.
Sometimes I have added a new linebreak, sometimes the file missed the ssh-rsa
prefix, so is there a command to validate with?
I am currently using wget -m
to mirror a remote FTP but the speed suck, what are the good alternative (command) so we can parallel to download in order to boost the speed up?
I have the following nginx config, e.g.
server {
listen 80;
server_name example.com
allow 127.0.0.0/8;
When I restart, it warn me:
Restarting nginx: nginx: [warn] server name "127.0.0.0/8" has suspicious
symbols in /etc/nginx/sites-enabled/xxx
Any idea?
I am testing using nginx/php5-fpm
, with the code
<?php
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
// also tested: header("Status: 404 Not Found");
echo $_SERVER["SERVER_PROTOCOL"];
And force to use HTTP 1.0 with the curl
command.
curl -0 -v 'http://www.example.com/test.php'
> GET /test.php HTTP/1.0
< HTTP/1.1 404 Not Found
< Server: nginx
< Date: Sat, 27 Oct 2012 08:51:27 GMT
< Content-Type: text/html
< Connection: close
<
* Closing connection #0
HTTP/1.0
As you can see I am already requesting using HTTP 1.0
, but nginx reply me with HTTP 1.1
Bounty
@MaximDounin, @MichaelHampton already provided an answer to the spec, thanks. I am extending this question a little bit for the future reader:
Q. What are the advantage of responding HTTP 1.1 when a client request for HTTP 1.0? Shouldn't the approach taken by Google more reasonable, i.e. when client request 1.0, response with 1.0?
I can perform port scan using nmap
to test if a given IP is being used, e.g.
nmap -PR 192.168.1.9
However, nmap is not installed in most server, is it possible to have the same result (e.g. check if the particular IP is being used) without installing nmap
?
I have two files, id_rsa
and id_rsa.pub
. What command can be used to validate if they are a valid pair?
I accidentally add a locale, e.g. sudo locale-gen zh_TW
e.g. locale -a
zh_TW
But how to remove it?
Seems the Public DNS, e.g. ec2-x-x-x-x.compute-1.amazonaws.com will be changed when you stop or terminated the instance.
So this mean they have the same life span as the ec2 public IP address, so why should I use this public DNS? They are not easy to remember, and rather meaningless..
Is it possible to install PHP5 without installing apache, in Ubuntu?
If so, how?