Share Coding

Tutorials, Problems, Stuffs …

Category Archives: CentOS

Cannot SSH while server connected VPN

Esxi 5.0 Server has a CentOS vm.
Once it connected outside VPN, it then cannot SSH because they are not the same gateway.
So we need to add route to whitelist our host IP to connect our gateway first.

Assume our gateway is 192.168.1.1, and we would like to allow all my subnetwork to pass through:

route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
Advertisements

Solve slow MySQL connection

vi /etc/my.cnf

add

skip-name-resolve

Install xfce4 & TigerVNC-Server & Firefox & Flash on Centos 6.2

1. Install EPEL & RPMI & YUM-Priorities

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum install yum-priorities

 
2. Update OS

yum update

 
3. Edit EPEL repo: Add “priority=10” under “enabled=1

vi /etc/yum.repos.d/epel.repo

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
priority=10

 
4. Edit RPMI repo: Add “priority=10” under “enabled=0” and change “enabled=0” to “enabled=1

vi /etc/yum.repos.d/remi.repo

[remi]
name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
enabled=1
priority=10

  Read more of this post

vsftpd config backup

Anonymous read/write/modify/mkdir
Upload auto chmod 777

Read more of this post

Solve slow SSH connection

vi /etc/ssh/sshd_config

Change

#useDNS yes

to

useDNS no