Categories
Server

Empty a File Using Linux Command

Today i received an e-mail notification from cpanel that a partition in my server is almost full.
First i checked largest directories / files using this command :

du -h --max-depth=1 /some/path

Then i noticed that they were some log files which took space in my partition 🙂

Categories
Server

How to Install ConfigServer Security & Firewall (CSF) in WHM

To install ConfigServer Security & Firewall (CSF) in WHM, please run this commands in your SSH terminal one by one.

wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

After it completes, there is a new menu in WHM which is under “Plugins” category, named “ConfigServer Security & Firewall”. 🙂

Categories
Database Server

Exporting MySQL Databases Command Line in Linux

To export a mysql database by linux command line,
for example your database name is my_database, your mysql username is my_username, and your mysql password is my_password, you can use this command :

mysqldump --opt --single-transaction -umy_username -pmy_password my_database > /your/path/here/export.sql

Note: after “-u” and “-p”, there is NO space. 🙂