WorkingWithRHEL7: Difference between revisions

From T2B Wiki
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:


=== Getting rid of firewalld and coming back to iptables ===
== Getting rid of firewalld and coming back to iptables ==
Here are the magic commands :
Here are the magic commands :
<pre>
<pre>
Line 16: Line 16:
</pre>
</pre>


=== Replacing NetworkManager by network ===
== Replacing NetworkManager by network ==
First, check if there is the '''GATEWAY''' parameter in the ifcfg-ethX of the NIC. (GATEWAY0 is not working without NM)
First, check if there is the '''GATEWAY''' parameter in the ifcfg-ethX of the NIC. (GATEWAY0 is not working without NM)
Then, type these commands :
Then, type these commands :
Line 28: Line 28:
</pre>
</pre>


=== Adoption of Predictable Network Interface Names ===
== Adoption of Predictable Network Interface Names ==
Names of NICs will change. To prepare yourself to the new naming rules, please read these documents :
Names of NICs will change. To prepare yourself to the new naming rules, please read these documents :
*http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
*http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
*http://blog.laimbock.com/2014/11/22/systemd-understanding-predictable-network-interface-names/
*http://blog.laimbock.com/2014/11/22/systemd-understanding-predictable-network-interface-names/


=== Default filesystem : xfs ===
== Default filesystem : xfs ==
RHEL7 adopts XFS as the default filesystem. It might generates troubles with our Quattor scdb -> check our filesystem layout templates.
RHEL7 adopts XFS as the default filesystem. It might generates troubles with our Quattor scdb -> check our filesystem layout templates.


=== Transition from SysVinit to Systemd ===
== Transition from SysVinit to Systemd ==
I find this [https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet link] useful.
I find this [https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet link] useful.


Here are some useful commands :
Here are some useful commands :


==== List types of unit ====
=== List types of unit ===
<pre>
<pre>
systemctl -t help
systemctl -t help
</pre>
</pre>
==== List units of a certain type ====
=== List units of a certain type ===
<pre>
<pre>
systemctl list-units --type=[unit_name]
systemctl list-units --type=[unit_name]
</pre>
</pre>
==== List of services ====
=== List of services ===
<pre>
<pre>
systemctl list-units --type=service
systemctl list-units --type=service
</pre>
</pre>
==== Check status of services ====
=== Check status of services ===
<pre>
<pre>
systemctl status [service_name]
systemctl status [service_name]
Line 62: Line 62:
systemctl is-active [service_name]
systemctl is-active [service_name]
</pre>
</pre>
==== Stop/start/restart service ====
=== Stop/start/restart service ===
<pre>
<pre>
systemctl start [service_name]
systemctl start [service_name]
Line 68: Line 68:
systemctl restart [service_name]
systemctl restart [service_name]
</pre>
</pre>
==== Enable/disable at boot time ====
=== Enable/disable at boot time ===
<pre>
<pre>
systemctl enable [service_name]
systemctl enable [service_name]

Latest revision as of 20:26, 24 March 2016

Getting rid of firewalld and coming back to iptables

Here are the magic commands :

systemctl stop firewalld
systemctl disable firewalld
yum remove firewalld
yum install iptables-services
systemctl enable iptables.service
systemctl enable ip6tables.service

Don't forget to configure SSH with system-config-firewall-tui. And after that :

systemctl start iptables.service
systemctl start ip6tables.service

Replacing NetworkManager by network

First, check if there is the GATEWAY parameter in the ifcfg-ethX of the NIC. (GATEWAY0 is not working without NM) Then, type these commands :

systemctl stop NetworkManager
systemctl disable NetworkManager

And now, we can restart network :

service network restart

Adoption of Predictable Network Interface Names

Names of NICs will change. To prepare yourself to the new naming rules, please read these documents :

Default filesystem : xfs

RHEL7 adopts XFS as the default filesystem. It might generates troubles with our Quattor scdb -> check our filesystem layout templates.

Transition from SysVinit to Systemd

I find this link useful.

Here are some useful commands :

List types of unit

systemctl -t help

List units of a certain type

systemctl list-units --type=[unit_name]

List of services

systemctl list-units --type=service

Check status of services

systemctl status [service_name]

If you want something more concise info :

systemctl is-enabled [service_name]
systemctl is-active [service_name]

Stop/start/restart service

systemctl start [service_name]
systemctl stop [service_name]
systemctl restart [service_name]

Enable/disable at boot time

systemctl enable [service_name]
systemctl disable [service_name]


Template:TracNotice