Oracle Linux/Installing
(→Network Config) |
|||
Line 9: | Line 9: | ||
==Network Config== | ==Network Config== | ||
If you installed the basic package, most likely the NIC is not configured for DHCP. try:<br> | If you installed the basic package, most likely the NIC is not configured for DHCP. try:<br> | ||
− | User ~ $ system-config-network | + | <nowiki>User ~ $ system-config-network</nowiki> |
Once DHCP is configured, the next step is to restart the NIC.<br> | Once DHCP is configured, the next step is to restart the NIC.<br> | ||
− | User ~ $ ifdown eth0 | + | <nowiki>User ~ $ ifdown eth0 |
− | + | User ~ $ ifup eth0 | |
− | + | Determining IP information for eth0... done. | |
− | + | User ~ $ifconfig eth0</nowiki> | |
Make sure your hostname is defined in /etc/sysconfig/network | Make sure your hostname is defined in /etc/sysconfig/network | ||
− | HOSTNAME=server.fqdn.com | + | <nowiki>HOSTNAME=server.fqdn.com</nowiki> |
Also for the network config, put your FQDN in the hosts file @ /etc/hosts | Also for the network config, put your FQDN in the hosts file @ /etc/hosts | ||
− | 127.0.0.1 server.fqdn.com | + | <nowiki>127.0.0.1 server.fqdn.com |
− | + | ::1 server.fqdn.com | |
+ | OR | ||
+ | 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 | ||
+ | ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 | ||
+ | ip.address fqdn.hostname | ||
+ | </nowiki> | ||
====connect on boot==== | ====connect on boot==== | ||
By default the network interface comes turned off on boot. | By default the network interface comes turned off on boot. | ||
− | ~$ sudo | + | <nowiki>~$ sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 |
− | + | DEVICE=eth0 | |
− | + | HWADDR=00:0c:29:4f:09:c8 | |
− | + | TYPE=Ethernet | |
− | + | UUID=5eed1f7e-74da-4841-b03b-3d4cc0812ade | |
− | + | ONBOOT=no | |
− | + | NM_CONTROLLED=yes | |
− | + | BOOTPROTO=dhcp | |
− | + | USERCTL=no | |
− | + | PEERDNS=yes | |
− | + | IPV6INIT=no</nowiki> | |
Change it so it automatically starts and connects on boot | Change it so it automatically starts and connects on boot | ||
− | ONBOOT=yes | + | <nowiki>ONBOOT=yes</nowiki> |
==Setup yum Repo== | ==Setup yum Repo== | ||
Line 43: | Line 48: | ||
# yum repolist | # yum repolist | ||
# yum update | # yum update | ||
+ | |||
+ | ==Sudoers Config== | ||
+ | Personally I prefer to use a group for sudoer management. Specify a unique UID so that it will be the same on all servers (manually dictate). | ||
+ | <nowiki># groupadd -g <unique UID> sudo</nowiki> | ||
+ | Now we can add the group to the sudoers file | ||
+ | <nowiki># visudo | ||
+ | Add the following under the entry for root | ||
+ | |||
+ | ## Allows members of the 'sudo' group to run all commands anywhere | ||
+ | %sudo ALL=(ALL) ALL</nowiki> | ||
+ | |||
+ | Add new user(s) and make them a part of the new sudo group | ||
+ | <nowiki># useradd -G sudo -u <unique UID> user_a</nowiki> | ||
+ | Change the password of the user | ||
+ | <nowiki># passwd <username></nowiki> | ||
+ | |||
+ | ==SSH Config== | ||
+ | With Oracle Linux 6.8, openssh should be installed by default, but if it isnt: | ||
+ | <nowiki>#yum install openssl openssh-server</nowiki> |
Revision as of 17:19, 27 September 2016
Installing
Contents |
Downloading
Direct Download links are available:
https://wikis.oracle.com/display/oraclelinux/Downloading+Oracle+Linux
I downloaded from the US source:
http://mirrors.wimmekes.net/pub/iso/
Installation
In VMWare, you'll probably need to add the keyboard value in the VM config due to duplicate keystrokes. Check out the CentOS advise, same applies
Network Config
If you installed the basic package, most likely the NIC is not configured for DHCP. try:
User ~ $ system-config-network
Once DHCP is configured, the next step is to restart the NIC.
User ~ $ ifdown eth0 User ~ $ ifup eth0 Determining IP information for eth0... done. User ~ $ifconfig eth0
Make sure your hostname is defined in /etc/sysconfig/network
HOSTNAME=server.fqdn.com
Also for the network config, put your FQDN in the hosts file @ /etc/hosts
127.0.0.1 server.fqdn.com ::1 server.fqdn.com OR 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 ip.address fqdn.hostname
connect on boot
By default the network interface comes turned off on boot.
~$ sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:0c:29:4f:09:c8 TYPE=Ethernet UUID=5eed1f7e-74da-4841-b03b-3d4cc0812ade ONBOOT=no NM_CONTROLLED=yes BOOTPROTO=dhcp USERCTL=no PEERDNS=yes IPV6INIT=no
Change it so it automatically starts and connects on boot
ONBOOT=yes
Setup yum Repo
https://blogs.oracle.com/wim/entry/setting_up_oracle_linux_6
# cd /etc/yum.repos.d # wget http://public-yum.oracle.com/public-yum-ol6.repo # yum repolist # yum update
Sudoers Config
Personally I prefer to use a group for sudoer management. Specify a unique UID so that it will be the same on all servers (manually dictate).
# groupadd -g <unique UID> sudo
Now we can add the group to the sudoers file
# visudo Add the following under the entry for root ## Allows members of the 'sudo' group to run all commands anywhere %sudo ALL=(ALL) ALL
Add new user(s) and make them a part of the new sudo group
# useradd -G sudo -u <unique UID> user_a
Change the password of the user
# passwd <username>
SSH Config
With Oracle Linux 6.8, openssh should be installed by default, but if it isnt:
#yum install openssl openssh-server