Chmod all files to 644 and all folders to 755 of a directory
Why to chmod ? Using suPHP or FastCGI you gonna notice that they need special permissions. In dso for example 777 is the default. Having those permissions using suPHP is first
dangerous and secondly
not recommended
Especially when almost all providers forbid 777 when using suPHP. So we need to change permissions at …Read More
LAMP Server (Apache / MariaDB /PHP) on Fedora 19+ and Centos/RHEL 7
LAMP is a combination of operating system and open-source software stack. The acronym LAMP comes from the first letters of Linux, Apache HTTP Server, MySQL/MariaDB database, and PHP, Perl or Python (and sometimes PhpMyAdmin too.)
Installing Apache
Change to root (if not root already) user using the following command:
1 |
su - |
and install apache using …Read More
Netstat, SS and RHEL 7 / CentOS
The netstat command no longer exists in default installation of CentOS / RHEL 7. It is now replaced with ss command.
The ss command is used to show socket statistics. It can display stats for PACKET sockets, TCP sockets, UDP sockets, DCCP sockets, RAW sockets, Unix domain sockets, and more. It …Read More
Console commands to hibernate and standby / sleep Linux machines
It’s great that Linux nowadays supports all the power management features available on computers. But it’s odd that beside the buttons to trigger standby/hibernate – which are only available in a graphical interface – there are no simple console commands to put the computer to sleep or into hibernation.
Standby and …Read More
Install OpenVPN On CentOS / RHEL 7
Security is most important aspect in internet. Outsiders can monitor internet traffic between your computer and the web. Here the importance of VPN comes. VPN, or virtual private network, is a secure method of connecting remote internet resources together as if they were under the same LAN. OpenVPN is a …Read More
Improve security with polyinstantiation
If you’re concerned about protecting world-writeable shared directories such as /tmp or /var/tmp from abuse, a Linux® Pluggable Authentication Module (PAM) can help you. The pam_namespace module creates a separate namespace for users on your system when they login. This separation is enforced by the Linux operating system so that …Read More
SSD performance tips for RHEL and Fedora
Solid State drives provide a pretty substantial performance boost over traditional hard drive technology, but they have some limitations that require some additional planning. There are basically two big things to do, enable discard/trim support in the filesystem, and limit write operations to the SSD. You want to enable discard …Read More
CentOS and RHEL 7: Install Linux, Apache, MariaDB, PHP (LAMP)
More about LAMP
LAMP is nothing but a software bundle or a platform consisting of Linux operating system, Apache web-server, MySQL database server and PHP (or Perl/Python)scripting language. The LAMP stack is used for building heavy-duty dynamic web sites entirely out of free and open-source software. In this tutorial, I’m going …Read More
Disable a Firewall In Red Hat Enterprise Linux / CentOS
Disable a Firewall In Red Hat Enterprise Linux / CentOS
RHEL 6.x and beyond:
A Linux firewall is an integrated collection of security measures designed to prevent unauthorized electronic access to a networked computer system. Red hat Linux kernel has firewall called iptables. It can be disabled by typing following command (login …Read More
Software Raid Grub issues
raid (mdadm / software raid) issues with grub
Playing around on my labrat I realized that sometimes EL/Centos (6.5 when writing this) messes up booting when using Software raid.
When typical stuff like grub-install from a rescue console doesn’t work:
1 2 3 4 5 |
# chroot /mnt/sysimage/ # grub-install /dev/sda /dev/md0 does not have any corresponding BIOS drive # grub-install --recheck /dev/sda /dev/md0 does not have any corresponding BIOS drive |
Or trying to boot from /boot (/dev/md0):
# grub-install /dev/md0
Let’s try something else:
grub> root (hd0,0)
root …Read More