Skip to content

Commit

Permalink
new guides
Browse files Browse the repository at this point in the history
  • Loading branch information
fire1ce committed Nov 8, 2018
1 parent 497e76c commit cd27918
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions src/linux/centos7.md
Expand Up @@ -70,6 +70,55 @@ ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
```

## Installing Network Tools

```bash
yum install net-tools -y
```

## Disable and stop Firewall on Centos 7

```bash
Disable Firewalld
systemctl stop firewalld
```

## Change Default Port for SSH with SElinux Enabled

you will need semanage, find what package contains it:

```bash
yum whatprovides /usr/sbin/semanage
```

Usually it's _policycoreutils-python_

```bash
yum install policycoreutils-python
```

Add new allowed port for SSH for SElinux

```bash
semanage port -a -t ftp_port_t -p tcp <YOUR PORT>
```

## Disable SELinux on CentOS 7

change __SELINUX=enforcing__ to __SELINUX=disabled__

```bash
sudo nano /etc/selinux/config
```

reboot.

Check status

```bash
sestatus
```

## Enabling Automatic Updates In Centos 7 & rhel 7

### Install yum-cron
Expand Down Expand Up @@ -125,6 +174,17 @@ For example:
systemctl enable yum-cron.service
```

## Fix Locals Error In Bash

Error :"bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory"

add these lines to _/etc/environment_ (create it, if it doesn't exist):

```bash
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
```

<!-- Donation Button -->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" align="center"><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="hosted_button_id" value="Q94AU5RUD4X6A"><input type="image" src="https://raw.githubusercontent.com/fire1ce/3os.org/gh-pages/assets/images/beerDonation.png" width="150px" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"></form>
<!-- Donation Button -->

0 comments on commit cd27918

Please sign in to comment.