2012/Jan/01

yum remove vsftpd
wget --passive-ftp ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.4a.tar.gz
tar xvfz proftpd-1.3.4a.tar.gz
cd proftpd-1.3.4a
./configure --sysconfdir=/etc
make
make install
cd ..
rm -fr proftpd-1.3.4a*
ln -s /usr/local/sbin/proftpd /usr/sbin/proftpd
nano /etc/init.d/proftpd
 
เอานี่ไปใส่ เพื่อทำ auto start
 
#!/bin/sh
# $Id: proftpd.init,v 1.1 2004/02/26 17:54:30 thias Exp $
#
# proftpd        This shell script takes care of starting and stopping
#                proftpd.
#
# chkconfig: - 80 30
# description: ProFTPD is an enhanced FTP server with a focus towards \
#              simplicity, security, and ease of configuration. \
#              It features a very Apache-like configuration syntax, \
#              and a highly customizable server infrastructure, \
#              including support for multiple 'virtual' FTP servers, \
#              anonymous FTP, and permission-based directory visibility.
# processname: proftpd
# config: /etc/proftp.conf
# pidfile: /var/run/proftpd.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -x /usr/sbin/proftpd ] || exit 0

RETVAL=0

prog="proftpd"

start() {
        echo -n $"Starting $prog: "
        daemon proftpd
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/proftpd
}

stop() {
        echo -n $"Shutting down $prog: "
        killproc proftpd
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/proftpd
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status proftpd
        RETVAL=$?
        ;;
  restart)
        stop
        start
        ;;
  condrestart)
        if [ -f /var/lock/subsys/proftpd ]; then
          stop
          start
        fi
        ;;
  reload)
        echo -n $"Re-reading $prog configuration: "
        killproc proftpd -HUP
        RETVAL=$?
        echo
        ;;
  *)
        echo "Usage: $prog {start|stop|restart|reload|condrestart|status}"
        exit 1
esac

exit $RETVAL
 
จากนั้น
 
chmod 755 /etc/init.d/proftpd
แล้วก็
nano /etc/proftpd.conf
เพื่อแก้
Group                           nobody
แล้วก็ปิด # ให้พวก anonymous ทั้งหมด
 
ต่อด้วย
 
chkconfig --levels 235 proftpd on
service proftpd start
 
ฟินาเล่ๆ ๆ ๆ ๆ ๆ ๆ ๆ ๆ

edit @ 2 Jan 2012 00:05:18 by roweb

2011/Dec/04

service mysqld stop

 mysqld_safe --skip-grant-tables &

mysql -u root

mysql> use mysql;

mysql> update user set password=PASSWORD("NEW PASSWORD") where user='root';
mysql> flush privileges;
mysql> quit;

service mysqld restart

mysql -u root -p

2011/Jul/21

[root@ns1 yum.repos.d]# nano /etc/yum.repos.d/iworx-unsupported.repo
 
ใส่นี่
 
[iworx-unsupported]
name=IWorx Unsupported
baseurl=http://updates.interworx.com/iworx/RPMS/unsupported/php5/cos5x/$basearch/
gpgcheck=0
 
แล้วก็
 
[root@host ~]$ yum update


ที่มา : http://forums.interworx.com/showthread.php?t=3139

edit @ 21 Jul 2011 01:21:58 by roweb