Entries by howto

How to Change Time in Linux

Check Date and Time To check the date and current time of server,use date command: # date Wed Jun 17 14:39:35 CEST 2015 Step 1: Modify /etc/localtime File Edit /etc/localtime to change the timezone data file. # file /etc/localtime /etc/localtime: timezone data# file /usr/share/zoneinfo/Asia/Kuala_Lumpur /usr/share/zoneinfo/Asia/Kuala_Lumpur: timezone data # date Wed Jun 17 14:39:35 CEST 2015 […]

How to Send Email in Linux

Following are the methods through which we can send email in linux: Method 1: mail # mail -s “Test Email” user@tecdistro.com < /dev/null # mail -a /tmp/test.txt -s “Test File” user@tecdistro.com < /dev/null # mail -s “Test Email” user@tecdistro.com,user2@tecdistro.com < /dev/null Method 2: mutt # mutt -s “Test Email” user@tecdistro.com < /dev/null # mutt -s […]

How to Uninstall MySQL Server in Debian/Ubuntu

Step 1: Remove mysql Server We can use apt-get command in order to remove both MySQL server and client in Debian / Ubuntu: # apt-get –purge remove mysql-client mysql-server mysql-common # apt-get autoremove Reading package lists… Done Building dependency tree Reading state information… Done The following packages were automatically installed and are no longer required: […]

How to Install phpmyadmin in CentOS / RedHat / Fedora

Step 1: Prerequisites Install Web Server PHP MySQL Server Step 2: Download Package Download rpm package for CentOS / RedHat /Fedora # rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm # yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm # yum check-update Step 3: Install phpmyadmin # yum install phpMyAdmin Step 4: Reload Apache Service # service httpd restart Step 5: Check on Browser Open […]

How to Export & Import MySQL database in Linux

Export MySQL database To export mysql database, use the mysqldump command. # mysqldump -u root -p database-name > backup.sql e.g # mysqldump -u test -p abc > abc_backup.sql Import MySQL database To import mysql database, use the mysql command. # mysql -u root -p database-name < backup.sql e.g # mysql -u test -p abc < […]

How to Install MySQL Server on CentOS / RHEL / FEDORA

Introduction MySQL Community Edition is a freely downloadable version of the world’s most popular open source database that is supported by an active community of open source developers and enthusiasts. MySQL is a popular choice of database for use in web applications, and is a central component of the widely used LAMP open source web […]

How to Set a Cronjob in Linux

Introduction A crontab is a simple text file with a list of commands meant to be run at specified times. It is edited with a command-line utility. These commands (and their run times) are then controlled by the cron daemon, which executes them in the system background. Each user has a crontab file which specifies […]

How to Check Memory in Linux

Following are some useful commands to check the memory status of machine: free Command Use free command to check the memory, buffers, cache memory # free -m total used free shared buffers cached Mem: 6082 5801 280 0 155 3887 -/+ buffers/cache: 1759 4322 Swap: 1707 33 1674 top Command Top command tells the detailed […]

How to Change Hostname in Linux

Method 1: Command Line Step 1: Edit in /etc/sysconfig/network File In order to change the hostname edit the following file: # sudo nano /etc/sysconfig/network HOSTNAME=server.tecdistro.com Step 2: Modify /etc/hosts File Edit /etc/hosts File and enter the hostname along with IP Address of server for local use. # vi /etc/hosts 127.0.0.1 tecdistro.com localhost.localdomain localhost 159.8.18.70 tecdistro.com tecdistro.com […]