How To Change Hostname On CentOS 6.5

There are 3 steps to this process.

First, change the hostname

hostname <whatyouwantittobe>

Second, change the hostname on the adapter

nano /etc/sysconfig/network

Ctrl+X -> Y -> Enter

And last, restart network service

service network restart

redhat

Free Up Space On Your Jira Installation

On a Redhat or CentOS installation, JIRA’s home directory location is most likely /var/atlassian/application-data/jira

Within JIRA’s home directory, there are other sub-directories that store log files and backup data that can be cleaned up from time to time.

JIRA will place its automated backup archives into the export directory.

JIRA will place its logs into the log directory.

When trying to add an attachment to a ticket today, I received a message that there was no space available.

I logged into the Jira VM and looked at disk utilization. This Jira installation was installed on a 50GB HDD. 100% was in use.

After reviewing the results disk utilization, I found that 17GB was in /var/atlassian/application-data/jira/export.

Backups existed as far back as February.

I used the following command to delete groups of files:
rm *Feb*.zip -I
rm *Mar*.zip -I
and so on….

Once deleting all backups up to August, plenty of space became available and all was good again.

Open LDAP Server TCP Ports on Linux 6.5

What ports should be open in iptables to allow LDAP traffic on your linux server?

Ports 389 and 636

There are a couple ways of doing this.

1. Install nano

yum install nano

2. Edit iptables

nano /etc/sysconfig/iptables

3. These rules work in CentOS version 6.5

-A INPUT -p tcp -m tcp --dport 389 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 636 -j ACCEPT

4. Press Ctrl+X to exit, “Y” to save, and Enter

5. Start or restart iptables depending on its current state

service iptables start

Or

servcie iptables restart

Allow MYSQL Server Incoming Request In Iptables

I’ve read many forums regarding SELinux and iptables in CentOS and Linux. Most say disable them but in most corporate environments, that’s just not an option. Most of our servers are private and can only be accessed if connected via VPN. There are a few that face the public. In any case, it’s either keep your firewalls down and face the wrath or learn how to configure SELinux or iptables. As of right now, I disable SELinux due to my lack of knowledge of it.

To allow incoming request on MYSQL servers running iptables, you need to allow on port 3306.

On our CentOS version 6.5, this is done by adding the rule to the iptables config file.

nano /etc/sysconfig/iptables

 

Add the following line just beneath the entry for the default rule regarding tcp port 22:

-A INPUT -p tcp -m tcp –dport 3306 -j ACCEPT

Press Ctrl+X, “Y” to save and press the Enter key to complete the process.

 

Make sure iptables is enabled:

service iptables status

 

If running, restart the iptables by issuing the following command:

service iptables restart

 

If not running, issue this command:

service iptables start

 

There may be other variables but I know this works for certain on CentOS 6.5.