When you forgot the password to your MySQL server, you can reset it using the following steps. This will require a downtime since you are going to stop MySQL service. After this, remember to keep you mysql root password.
Category: Debian
debian
Create a swap file in Linux
Some VPS on hosting providers like Amazon Web Services do not have swap by default. Or if your server was configured with small swap and now you want to increase it. Below are instructions on how to increase swap area.
Continue reading “Create a swap file in Linux”
SFTP Server with chroot Setup CentOS 6 / RHEL 6
SFTP provides a secure way for providing FTP access to clients. It comes built-in with the openssh-server package. Creating SFTP accounts is straightforward like normal user accounts. However if you want to limit the users to access their designated folder only, then a chroot setup is needed. This improves security in a way that sftp users cannot login to a normal bash shell and they cannot view system folders when they are logged-in. This tutorial will walk you though SFTP server setup.
Continue reading “SFTP Server with chroot Setup CentOS 6 / RHEL 6”
Setup NFS share in Linux
Network File System (NFS) is the standard protocol used for sharing files/folder between Linux/Unix systems. This is helpful on production environments that requires a common folder on multiple servers. NFS shares provide quick and efficient file/folder sharing between systems. It’s easy to configure and setup. It’s not compatible on windows machines though- you can Samba protocol for this. This tutorial is done on CentOS but will also work on Ubuntu and other Linux OS.
Continue reading “Setup NFS share in Linux”
Manage Drives and Disk Partitions using fdisk
One of the common administrative tasks under UNIX/Linux is to add a new disk to the system to increase its storage capacity. This tutorial will walk through on adding disk to a running system, making a partition, assigning file system and creating mount point for the new disk. The fdisk utility is very helpful especially when adding new drives to be used for Logical Volume Management (LVM).
Continue reading “Manage Drives and Disk Partitions using fdisk”
Logical Volume Management (LVM) Tutorial
What is LVM?
Logical Volume Management or LVM allow the server to utilize multiple hard drives and combine them to single storage. It allows an easy way to extend or shrink partition depending on how the user needs.
LVM also supports snapshots and cloning for easy backup of system images. LVM is used to allocating disks, striping, mirroring and resizing logical volumes. This tutorial will walk you through using LVM to manage disk partitions and filesystem sizes.
Continue reading “Logical Volume Management (LVM) Tutorial”
Setup NPTD Server and client for CENTOS 6
Network Time Protocol is used to synchronize the time on Linux Server. NTP continuously sync and adjusts the time setting of the client by querying the NTP server. It is recommended to be used by systems which need very fine tuned time synchronization requirements (milliseconds). Recommended setup to use is to have a common NTPD server on your LAN and then configure other devices to sync to it.
Continue reading “Setup NPTD Server and client for CENTOS 6”
Return MySQL query as PHP variable
If you have a PHP built webpage and you need to save the MySQL query as a PHP variable, then you can use the following function.
The MySQL query result should be a single entry and it will be saved on the variable when the function is called.