UPWORK/ODESK guru: Tips and Tricks for clients

skype: odesk.by / upwork.link , email: [email protected]/upwork.link

Archive for June, 2013

Disabling listening IPv6 in config file of Apache2 server

without comments

By default, Apache will listen on all IPs, both IPv6 and IPv4.
This is controlled by the Listen directive:

[email protected] ~ # egrep -r Listen /etc/apache2
...
/etc/apache2/ports.conf:Listen 80
...
[email protected] ~ # 

To turn off IPv6 in Apache, just change the Listen directive to:

Listen 0.0.0.0:80

This will limit Apache to listening only to IPv4 connections. Repeat this for port 443 if you want to stop Apache from listening for HTTPS on IPv6.

Written by spectre

June 27th, 2013 at 1:29 pm

Using file of system logrotate for compression mongodb log files

without comments

Just insert next code to the /etc/logrotate.d/mongodb:

   /var/log/mongodb/mongodb.log {
           size 10M 
           missingok
           rotate 14
           compress
           notifempty
           mail [email protected]
           create 0640 mongodb nogroup
           postrotate
             killall --signal USR1 mongod
             find /var/log/mongodb -type f -regex '.*/mongodb\.log\.[-0-9]+T[-0-9]+$' -exec rm {} \;
           endscript
  }       

Written by spectre

June 25th, 2013 at 11:57 pm

Posted in Tips and Tricks

Installing Ruby, Gem, Thin and Redmine on Linux in User Space with CloudLinux

without comments

Ruby is best known as the language behind the rails web application framework. However, it is a very flexible general purpose language that can be used for tasks of direct interest to R Developers (parsing files, interacting with databases, processing XML or JSON, math functions, statistics, machine learning, etc).

If you do not have root access on a Linux server, you may still be able to install the ruby language and rubgems. Start by checking the version currently installed (if any):

[email protected] [~]# which ruby
/usr/bin/ruby
[email protected] [~]# ruby --version
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
[email protected] [~]# 

Read the rest of this entry »

Written by spectre

June 20th, 2013 at 12:20 pm

Posted in Ruby,Tips and Tricks

automysqlbackup: Unknown table engine ‘PERFORMANCE_SCHEMA’

without comments

This error seems to be related to the MySQL-Bug #58406 (status: verified).

For the moment, you can ignore that message. The process skips the table and continues as always.
Whatever, if you want to make sure that your database has not been corrupted in consequence of this error, simply force mysqldump to ignore all performance_schema-tables.

Plesk way:

Read the rest of this entry »

Written by spectre

June 18th, 2013 at 10:44 am

Protected: GRUB(2): Полный доступ к системе при загрузке

without comments

This content is password protected. To view it please enter your password below:

Written by spectre

June 17th, 2013 at 11:31 pm

Posted in Tips and Tricks

Linux how to determine the file system type of unmounted (raw) partition

without comments

Of course!
You can try a ‘file -s’ on the device node.

[email protected] /mnt # file -s /dev/md1
/dev/md1: Linux rev 1.0 ext4 filesystem data, UUID=e77cc8ce-ade6-4e09-ac7f-d139c80a2e4a (needs journal recovery) (extents) (large files) (huge files)
[email protected] /mnt # 

Written by spectre

June 16th, 2013 at 7:21 pm

How to set the speed of MD RAID reconstruction

without comments

To see your Linux kernel speed limits:

[email protected] ~ # cat /proc/sys/dev/raid/speed_limit_max 
200000
[email protected] ~ # cat /proc/sys/dev/raid/speed_limit_min 
1000
[email protected] ~ # 

Read the rest of this entry »

Written by spectre

June 15th, 2013 at 10:06 pm

Posted in Arrays and Disks

How to run MD array with help assembly command (pos. degraded) from Linux shell

without comments

Assuming you have added the DEVICE and ARRAY entries to the /etc/mdadm.conf.
Starting the array can be accomplished with a single command:

[email protected] / # mdadm --assemble --scan
 mdadm: /dev/md0 has been started with 6 drives.
[email protected] / #

Read the rest of this entry »

Written by spectre

June 15th, 2013 at 8:09 pm

Posted in Arrays and Disks

Recovery Grub Legacy boot loader from grub-shell

without comments

All you need to do is access the terminal using the installation CD/DVD of your GNU/Linux operating system or to do the boot over network with RIPLinux. Once you are in the terminal, you will have to access the ‘grub’ shell to change the grub configuration:

# grub

You will get the grub-shell prompt:

Read the rest of this entry »

Written by spectre

June 15th, 2013 at 5:45 pm

How to copy a GPT partition scheme from one hard drive to another?

without comments

On a non-GPT partition table you can do

sfdisk -d /dev/sda | sfdisk /dev/sdb.

But sfdisk doesn’t support GPT partition tables.
Then you shall make:

Read the rest of this entry »

Written by spectre

June 13th, 2013 at 12:34 pm

Posted in Tips and Tricks