Use rsyslog and Send Logs to Remote Server (including Apache logs)
rsyslog.conf Setup Modify /etc/rsyslog.conf file and add the following at the end: *.* @[ip address of remote server]:[port] Port number is optional. Default is 514. httpd.conf Setup (Apache) Modify /etc/httpd/conf/httpd.conf file and add the following: ErrorLog syslog:local1 CustomLog “| /usr/bin/logger -t httpd -p local1.info” [log format] Now restart both Apache and rsyslog service httpd restart […]
Lock an sFTP user to a specific directory on CentOS
I run into the need to give users access to a specific directory to create and update files for a website or other reason. I don’t like using ftp because of the plain text password issue so I prefer sftp. sftp is nice because everything is encrypted and secure but it uses ssh which, if […]
Force RHEL 6 to use NFSv3 instead of NFSv4
Here is how to force Redhat Enterprise Linux 6 to use nfs v3 instead of version 4. 1. Edit /etc/sysconfig/autofs and comment out: MOUNT_NFS_DEFAULT_PROTOCOL=4 uncomment: MOUNT_NFS_DEFAULT_PROTOCOL=3 2. Edit /etc/nfsmount.conf and add the following lines: Defaultvers=3 Nfsvers=3 3. Restart autofs sudo service autofs restart 4. Then re-mount and your done. Source: http://serverfault.com/questions/219190/can-i-force-nfs-automounts-to-use-nfsv3
File System Labels in RHEL based Systems
This is the command to use to check if a partition has a label. Note: If the partition does not have a filesystem already this will error. e2label [partition path] This is the command to assign a new label to a partition. e2label [partition path] [label name] Here is the line to use in you […]
NFS Client setup on RHEL/centos
Here a simple and quick guide to setting up nfs on a RHEL or centos host: 1. Install the needed nfs packages yum install nfs-utils nfs-utils-lib 2. Create the directory that you want to mount the remote directory to mkdir [path to mount point] 3. Add an entry into your systems fstab file to auto-mount […]
This website uses cookies to improve your browsing experience. Cookies help us remember your preferences, keep you logged in, and understand how you interact with our site. We do not share any personal information collected by cookies with third parties.