Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Linux Ask!

Jan 012010
 

Turn off PHP error messages?

Answer:

In a production server, you should always turn off PHP error messages to be displayed for public, to do so, edit the php.ini

E.g.

vi /etc/php.ini

And turn off display_errors

display_errors = Off

Jan 012010
 

How to install bulk packages using yum with groupinstall?

Answer:

Sometimes, if you forgot to select "Development Tools" during Fedora/CentOS installations, you can add them later by using one command

yum groupinstall "Development Tools"

Which save you a lot of times from installing the needed packages one by one.

To see what options are available for groupinstall, try

yum grouplist

Jan 012010
 

How to mount a NFS share?

Answer:

Assume you have a NFS share /data/shares/music, at server: 192.168.1.5

You can mount the NFS share from another system at /mnt/music (create this directory first), with the command below

sudo mount 192.168.1.5:/data/shares/music /mnt/music

This is just an one-time mount.

If you want to mount permanently, you can edit the fstab

vi /etc/fstab

and input

192.168.1.5:/data/shares/music /mnt/music nfs rsize=8192,wsize=8192,timeo=14,intr

Then run the command to see the effect immediately.

sudo mount /mnt/music

Also try to reboot your system to see if the share can be mounted automatically or not.

Jan 012010
 

MySQL binary log files take all of my disk space

Answer:

If you have enabled binary log in your MySQL server, most likely you are using the replication feature. You don't need to keep the binary log forever, so in the my.cnf, add the line

expire_logs_days = 10

So your MySQL server (master) would keep at most binary log for 10 days. (Notes: you might need to adjust this value, make sure your MySQL slave is able to catch up the updates within 10 days)

However, if you are not using replication, you can consider disable the binary log, e.g. edit the my.cnf, comment out the "log-bin"

# log-bin