Question: I forgot the MySQL root password. How do I reset it? # mysql -u root Access denied for user ‘root’@’localhost’ (using password: NO)’ Solution: The MySQL root password can be set using the following procedure: 1. Stop the MySQL service: # service mysqld stop Stopping MySQL: [ OK ] 2. Start MySQL in safe […]
Archives for May 2017
DHCP configuration file /etc/dhcp/dhcpd.conf explained
The main DHCP configuration file is /etc/dhcp/dhcpd.conf. The file is used to store the network configuration information required by DHCP clients. There is also a sample configuration file at /usr/share/doc/dhcp-[version]/dhcpd.conf.sample. # cat /usr/share/doc/dhcp*/dhcpd.conf.sample # dhcpd.conf # # Sample configuration file for ISC dhcpd # # option definitions common to all supported networks… option domain-name “example.org”; […]
CentOS / RHEL : How to configure an DHCP server
1. Install the dhcp package: # yum install dhcp 2. Copy the sample file /usr/share/doc/dhcp*/dhcpd.conf.sample. # cp /usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcp/dhcpd.conf 3. The Sample dhcp configuration file will look as follows. # cat /etc/dhcp/dhcpd.conf Allow booting; Allow bootp; authoritative; subnet 192.168.0.0 netmask 255.255.255.0 { option routers 192.168.0.1; range 192.168.0.100 192.168.0.200; default-lease-time 21600; max-lease-time 43200; You will need […]
CentOS / RHEL : How to change SNMP community string
Question: How to change an SNMP community string in CentOS / RHEL? Answer: Here is a short note on how to change an SNMP community string and test if its working allright. 1. The below line in /etc/snmp/snmpd.conf needs to be modified to change the community string. Replace the string public or the last word […]
CentOS / RHEL : How to create new LVM based swap partition
Let see an example of increasing existing swap space by adding new LVM based swap. The example here uses the disk /dev/sdc for creating a new volume group and swap volume under it. Since we are going to use this disk, any data, if exists on it, will be lost. As root user perform the […]
CentOS / RHEL : How to add swap file
Not the best practices to add a file as swap space, but it comes handy when you have an urgent requirement of adding swap space. The post below describes steps to add swap file. Adding swap file Determine the size of the new swap file in MB and multiple by 1024 to determine the block […]
systemd command line reference (cheat sheet)
The systemd system and service manager are responsible for controlling how services are started, stopped and otherwise managed on Red Hat Enterprise Linux 7 systems. By offering on-demand service start-up and better transactional dependency controls, systemd dramatically reduces startup times. As a systemd user, you can prioritize critical services over less important services. Although the […]
How to assign a static IPv6 address on Solaris 8,9,10 (persistently)
Procedure for a boot persistant IPv6 configuration on Solaris 8,9, and 10: 1.Create a hostname6.[interface] file and populate the file with addif [ipv6 address/netmask] up 2. Reboot the system (or restart the network service using svcadm command) Example configuration 1. Put the following in the /etc/hostname6.igb0 file addif 2607:f250:d000:10::928e:40d/64 up 2. Reboot the system # […]