April 2015
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
27282930  

Categories

April 2015
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
27282930  

Apache URL rewriting

Most dynamic sites include variables in their URLs that tell the site what information to show the user. Typically, this gives URLs like the following, telling the relevant script on a site to load product number 7. http://www.pets.com/show_a_product.php?product_id=7

The problems with this kind of URL structure are that the URL is not at all memorable. […]

CentOS Remove Old Kernels

Tonight when upgrading a CentOS Linux server it was noted by YUM that 15MB more disk space was needed to upgrade grub and the kernel itself. Below are four quick steps to verify what kernels are installed, install yum-utils if it is not installed already, delete previous kernels and set YUM to remove old kernels […]

Python file and DIRECTORY

import os import os.path PATH=’./file.txt’ if os.path.isfile(PATH) and os.access(PATH, os.R_OK): print “File exists and is readable” else: print “Either file is missing or is not readable” import os fname = “foo.txt” if os.path.isfile(fname): print “file does exist at this time” else: print “no such file” Try opening the file:Opening the file will always verify the […]

SFTP server on chroot

SFTP server SFTP ( Secure File Transfer Protocol ) is used to encrypt connections between clients and the FTP server. It is highly recommended to use SFTP because data is transferred over encrypted connection using SSH-tunnel on port 22 . Basically we need openssh-server package to enable SFTP . Install openssh-server package, if its not […]

Setup FTP server on centos 7

yum -y install vsftpd

After installation you can find /etc/vsftpd/vsftpd.conf file which is the main configuration file for VSFTP. Take a backup copy before making changes .

cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.org

vi /etc/vsftpd/vsftpd.conf

Find this line anonymous_enable=YES ( Line no : 12 ) and change value to NO to disable anonymous FTP access.

anonymous_enable=NO

Uncomment the […]

disable ipv6 on windows

MySQL client fails to connect to localhost on Windows, due to IPv6 A MySQL client running on Windows 2008 or Windows 7 may fail to connect to the host name of “localhost”. This is due to windows resloving the host name of localhost to the IPv6 loopback address of ::1. Windows will resolve localhost to […]

VNC server on Centos 7

VNC server on Centos 7 a) yum groupinstall “X Window System”

b) yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts

unlink /etc/systemd/system/default.target

ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

reboot

After reboot, you will get Centos 7 desktop .

Now start installing VNC packages.

Issue the below command to install VNC package.

yum install tigervnc-server -y

Create a file […]

firewalld add

Assuming you’re using the default zone of “public” (you may need to temporarily disable selinux (setenforce 0)):

1. To allow everyone to access port 8080/tcp:

firewall-cmd –zone=public –add-port=8080/tcp –permanent

2. Allow a server from the IPv4 address 192.168.1.50 to access this server on port 128 over UDP:

firewall-cmd –zone=public –add-rich-rule=’rule family=”ipv4″ source address=”192.168.1.50/32″ […]

LAMP server on centos 7

LAMP server on centos 7

LAMP is a group of open source softwares installed together to build a webserver. LAMP refers to Linux (Operating system), Apache (Web service), MySQL/MariaDB (Database) , PHP (Programming language). This guide helps you to install LAMP server on centos 7. Before starting installation, you need to setup Static IP and […]

mail server on centos 7 Redhat 7

Setup mail server on centos 7

This article helps you to install and configure basic mail server on Centos 7. Here i have used Postfix for SMTP, Dovecot for POP/IMAP and Dovecot SASL for SMTP AUTH. Before proceeding please make sure you have assigned static IP for the server and have internet connectivity for installing […]