Wednesday, June 3, 2015

Top 5 Yum Repositories for CentOS



Top 5 Yum Repositories for CentOS, RHEL Systems

YUM ( Yellowdog Updater, Modified ) is an command-line package-management utility for RPM based Linux systems, It has been released under the GNU General Public License. Yum is useful for rpms which have dependencies, Yum searches for all dependencies of any RPM in all available repositories.

Below list contains top 5 yum repositories for RHEL based systems, which we needs to keep our system up to date with latest packages. These repositories having most of rpms required for servers. 

1. Adding RPMForge Repository
To Install Sourceforge repository use below download links.
CentOS/RHEL 6, 32 Bit (i686):
# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm

CentOS/RHEL 6, 64 Bit (x86_64):
# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

CentOS/RHEL 5, 32 Bit (i386):
# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm

2.Adding EPEL Repository
To Install EPEL repository use below download links.
CentOS/RHEL 6, 32 Bit (i386):
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

CentOS/RHEL 6, 64 Bit x86_64):
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

CentOS/RHEL 5, 32 Bit (i386):
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

3. Adding REMI Repository
To Install REMI repository use below download links.
CentOS/RHEL 6, 32 Bit (i386):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

CentOS/RHEL 6, 64 Bit (x86_64):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

CentOS/RHEL 5, 32 Bit (i386):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

4. Adding CentAlt Repository
To Install CentAlt repository use below download links.
CentOS/RHEL 6, 32 Bit (i386):
# rpm -Uvh http://centos.alt.ru/repository/centos/6/i386/centalt-release-6-1.noarch.rpm

CentOS/RHEL 6, 64 Bit x86_64):
# rpm -Uvh http://centos.alt.ru/repository/centos/6/x86_64/centalt-release-6-1.noarch.rpm

CentOS/RHEL 5, 32 Bit (i386):
# rpm -Uvh http://centos.alt.ru/repository/centos/5/i386/centalt-release-5-3.noarch.rpm

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://centos.alt.ru/repository/centos/5/x86_64/centalt-release-5-3.noarch.rpm

5.Adding Webtatic Repository
To Install webtatic repository use below download links.
CentOS/RHEL 6:
# rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm

CentOS/RHEL 5:
# rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

PPTP VPN Centos



Install PPTP VPN Server on your VPS Centos


Introduction


In this article we show you how to install and properly configure a PPTP VPN server in your virtual private server (VPS). With this VPN you'll have access to transfering your data encrypted and using a virtual ethernet interface that uses your Virtual Private Server's IP address. This tunneling technology is compatible with several devices like desktop operating systems, mobile phones and tables. We will be using Centos 6.4 64 Bits as our host operating system.

First make sure you begin with a clean install by removing any previously installed packages:
yum remove -y pptpd ppp
iptables --flush POSTROUTING --table nat
iptables --flush FORWARD
rm -rf /etc/pptpd.conf
rm -rf /etc/ppp
Initial PPTP Packages


First, install the poptop package from sourceforge:
rpm -Uhv http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpm
yum -y install make libpcap iptables gcc-c++ logrotate tar cpio perl pam tcp_wrappers dkms kernel_ppp_mppe ppp pptpd

Now, we need to enable IP forwading, set internal IP addresses and point the DNS Servers that will be used by the pptp server:
mknod /dev/ppp c 108 0
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "mknod /dev/ppp c 108 0" >> /etc/rc.local
echo "echo 1 > /proc/sys/net/ipv4/ip_forward" >> /etc/rc.local
echo "localip 172.16.36.1" >> /etc/pptpd.conf
echo "remoteip 172.16.36.2-254" >> /etc/pptpd.conf
echo "ms-dns 8.8.8.8" >> /etc/ppp/options.pptpd
echo "ms-dns 8.8.4.4" >> /etc/ppp/options.pptpd

Then, create your users credentials for the PPTP server. This credentials will be used to log in to the PPTP server on every client/device you connect from:
vi /etc/ppp/chap-secrets

Your chap-secrets file should look like this:
# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
yourusername    pptpd   yourpassword            *

Save and close the file.

Next, you need to add the following iptables rules in order to open the correct ports and properly forward the data packets:
# VPN rules (pptpd)
iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i eth0 -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -p tcp -s 172.16.36.0/24 -j TCPMSS --syn --set-mss 1356

Save and restart your iptables firewall:
service iptables save
service iptables restart

Make sure you load your iptables after every reboot:
chkconfig iptables on
chkconfig pptpd on

And finally, restart iptables and pptpd services:
service iptables start
service pptpd start

Install Firefox Update & Flash Player – Centos 6.5



Summary
  • Enable repo
  • Install Firefox
  • Install Adobe Flash Player
1. Enable CentOs repository
Supaya sistem mendeteksi program terbaru dan terupdate, terlebih dulu kita enable dan menambahkan repo di CentOs. 

2. Install Firefox
Setelah melakukan enable repo, kita cek dulu repo mana yang tersedia versi Firefox yang lebih baru. Dalam hal ini, saya memakai EPEL dan REMI repo. Hasilnya, Firefox di Remi repo lebih update dibanding EPEL Repo.
Lanjutkan install Firefox dengan repo Remi
1
yum --enablerepo=remi install firefox

3. Install Flash Player
Tak lengkap tentunya Firefox tanpa flash player. Tambahkan repo Adobe lebih dulu.
Adobe Repository untuk 32bit (x86) OS
1
2
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
Adobe Repository untuk 64bit (x86_64) OS
1
2
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
Update Repository
1
yum check-update
Terakhir install Flash player
1
yum -y install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl