This is a collection of my notes that I most frequently refer back to. Hopefully some of these may come in handy for others. NOTE: I take no responsibility for your systems if you follow these notes. Always do you own research and make sure you understand fully what it is you are doing.
Sunday, 13 August 2017
Changing Linux Network Configuration
To make changes to a Linux servers IP configuration, follow the steps below. Use :x to exit the files you are changing to save them:
Step 1 - Run ifconfig and note the name of the active network interface on the left. As standard this should always be eth0 but for some configurations it may be different
Step 2 - Run vim /etc/sysconfig/network-scripts/ifcfg-InterfaceName
Step 3 - In this file, make your changes to the IPADDR, NETMASK and GATEWAY fields. If there is no gateway field move onto the next step otherwise skip to step 5
Step 4 - Run vim /etc/sysconfig/network and change the gateway
Step 5 - Run service network restart to restart the network interface and pick up the changes. Any connections to the server will be lost when you do this.
Empty log file in Linux
If a log file has grown out of control and you want to empty it out, run the following:
cat /dev/null > /Path/To/Log
This overwrites the file with the contents of /dev/null which is nothing
cat /dev/null > /Path/To/Log
This overwrites the file with the contents of /dev/null which is nothing
Exchange 2010 switch all mailboxes over to other server
This applies to DAG's where you have 2 mailbox servers
Open Exchange Management Console
Under Server Configuration > Mailbox right click the server you want to switch the mailboxes from and click switchover server
In the pop up that appears tick use the specified server and click browse. Double click the server you want to move the databases to. Click Ok.
Give it a few minutes then close and reopen the EMC to check all mailboxes show mounted on the server you want them on. It should show healthy for the other server unless there are problems.
Subscribe to:
Posts (Atom)