Tag: centos

So if you’re having some issues with SSL connections, it’s higly likely you’re experiencing them from client version openssl 1.0.2. the fix is below and i can confirm it works on both openssl 1.0.1 and 1.0.2.

record the channel number
ifconfig wlan0 down
——————————————
create /etc/sysconfig/network-scripts/ifcfg-wlan0 with the contents below and the instructions mentioned below:

DEVICE=wlan0
HWADDR=<your-mac-address>
TYPE=Wireless
UUID=<an-optional-uuid> #generate one with uuidgen
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=dhcp
PEERDNS=yes
USERCTL=yes
NETWORKING_IPV6=no
ESSID=<your-ssid> # you should either know this or take it from the iwlist wlan0 scan
CHANNEL=<ssid-channel> #the channel you got from when you ran iwlist wlan0 scan
MODE=Managed
RATE=Auto
——————————————
chkconfig NetworkManager off
——————————————
edit /etc/sysconfig/wpa_supplicant and add the wlan name: INTERFACES=”-iwlan0″
——————————————
load the encrypted passphrase in the supplicant
wpa_passphrase <ssid> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant.conf
——————————————
chkconfig messagebus on
chkconfig wpa_supplicant on
——————————————
If the wireless is the only active option, edit /etc/sysconfig/network-scripts – the configs for ifcfg-eth0 and 1 and set onboot to no, so that the route goes over wifi.
——————————————
reboot

pure-pw useradd $USERNAME -u $USER -g $GROUP -d /path/to/ftp/directory $USERNAME = FTP username $USER = System username – the username which will own the files/folders created by the virtual FTP users$GROUP = System groupname – the groupname which will own the files/folders created by the virtual FTP users/path/to/ftp/directory = Directory location for the FTP to jail to (such as /var/www/htdocs/)

Restart the FTP server for the new users to take effect :

pure-pw mkdb

service pure-ftpd restart

Great ! Now you can login with your brand new created virtual FTP users on Pure-FTPD – CentOS6

Hi, so i need to setup some services that use Python 2.7.6, however, since i am using the same Centos5.10 machines that i can’t reload, and i don’t really need to reload them since they are working fine (don’t fix what’s not broken), and on Centos5 you have 2.4.3, and if you decide to upgrade it, you will most likely screw a lot of things in the process, here’s a nice tutorial on how to work things out, using a similar approach to Ruby’s Version Manager or RVM:

1 – Create a user of your choosing, and login as said user.

2 – git clone git://github.com/yyuu/pyenv.git .pyenv

3 – Add env variables to your bash profile (i assume you should be using the bash shell, if you’re using another shell not sure how that goes):

4 – Logout and relog, or restart shell. I find relog to be the choice for me as i usually have consoles opened for long periods of time, so i might forget and control+D and then miss my settings and wonder why.

How to increase the size of /tmp partition in Linux?
Proceed with the given steps:-
========================
1) Stop MySql service and process kill the tailwatchd process. Additionally if you receive an error that /tmp is in use, do a “lsof |grep tmp” and see which processes use /tmp, and stop them.

Most of the times i use htop to check cpu threads usage in linux. I have quite a few freebsd servers, so i ran into some issues when installing htop on vanilla freebsd. Well, you need to make some adjustments so that htop works, so here it goes:

First you have to dynamically load the linux object in the kernel:

kldload linux

Then we have to make this loading permanent so addlinux_enable=”YES” to /etc/rc.conf.

After this, install a linux layer:

cd /usr/ports/emulators/linux_base-fc4 (for some strange reason fc6 is not working for me)make install distclean

Go to /etc/fstab and add the following line:

linproc /compat/linux/proc linprocfs rw 0 0

Mount the new filesystem: mount linproc and go to/usr/ports/sysutils/htop and install as usual.