Kill user

kill หมดเหลือ root

who | awk ‘{ printf ("%s",$1 "\n"); }’| grep -v root | xargs -I {} -t pkill -u $1{}

pkill -u username

skill -KILL -u username

rtorrent และ screen

คำสั่งเบื้องต้น

screen –S xx1 สั่ง screen เปิด session ชื่อคำว่า xx1 ต่อท้าย

screen ctrl a d ออกจาก screenและ detached ไว้

screen –ls list ดู session

screen –r xx1.yyy resume session

screen –D xxx สั่งให้ session attached เป็น detached 

เริ่ม

:~$ screen -ls
No Sockets found in /var/run/screen/S-web13_b.

เช็คว่า มี screen ที่ทำทิ้งไว้หรือเปล่า

หรือ :~$netstat -anp | grep 51005

เพื่อเช็คว่า ได้รันโปรแกรมทิ้งไว้หรือเปล่า

:~$screen –S 123

จะเปิดหน้าต่างหน้าว่าง (ขณะนี้อยู่บน screen 123 แล้ว)

web13_b@X:~$rtorrent

สั่งเปิดโปรแกรม rtorrent

กด ctrl a d เพื่อค้างหน้าทำงานหน้านี้ และออกไปหน้าแรก

จบมั้ง

เพื่อบักต้น – -

Tags: ,

VPS 256 MB Debian 5.0.5 spacerich

อันนี้ http://www.spacerich.com/vps-Chicago-US.html

ลง ISPConfig 3

โปรแกรมที่ต้องเอาออก
Bind9
Senmail
smbfs
Samba-common
แก้ไข service SPAM+Virus
ลง PureFtp ใหม่

ปรับ php.ini memory_limit ไว้ 32 MB
ที่เหลือลอกตาม howtoforge

ใช้งานอยู่ปกติดี (เพราะไม่มีคนเข้า)
รัน blog 2 blog

แรมน้อยใช้สอยอย่างประหยัด เงินน้อยใช้สอยให้คุ้มค่า

Tags: , ,

Proftpd upload resume

เนื่องจาก upload file แล้ว resume ไม่ได้

error (fielzilla) append/restart not permitted, try again

แก้ไขโดย

#nano /root/ispconfig/isp/conf/proftpd_ispconfig.conf.master
###################################
#
# ISPConfig proftpd Configuration File
# Version 1.0
#
###################################

DefaultAddress 127.0.0.1
<!– BEGIN DYNAMIC BLOCK: vhost –>
<VirtualHost {IP}>
   DefaultRoot           ~
   IdentLookups          off
   ServerIdent on "FTP Server ready."
   AllowOverwrite        on
   AllowRetrieveRestart  on
   AllowStoreRestart     on
   Umask                 002
   {ANON_FTP}
</VirtualHost>
<!– END DYNAMIC BLOCK: vhost –>

เก็บไฟล์ไว้ที่นี่ด้วย กันลืม /ispconfig/isp/conf/customized_templates/

AllowRetrieveRestart — Allow clients to resume downloads
AllowStoreRestart — Allow clients to resume uploads

ลอกมาจาก

เปลี่ยนรหัสผ่าน awstats

password จาก admin ของเวบ

หน้าเข้า /stats  http://www.mtuser.com/stats

ถ้ามีการแก้ไขรหัส email/account password ของ stat จะไม่เปลี่ยนตามเพราะเป้นคนละตัวกัน

แก้ไขโดย

ลบไฟล์ .htpasswd ใน /var/www/webx/

/root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php

หรือรอรอบอัพเดท cron ตามปกติ

จบ

Tags: , ,

MusikCube

โปรแกรมฟังเพลง จัดคิว playlist ได้สะดวก

กินแรมประมาณ 13M

ปัญหาหลังอัพเกรด ISPconfig 2.2.36

Spamassasin ไม่ทำงาน

สั่ง

/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/sa-update

ที่มา

ISPConfig upgraded Internal server error

เดิมใช้ suphp กับ ispconfig 2.2.35 upgrade เป็น 2.2.36 แล้ว error run php ไม่ได้
SecurityException in Application.cpp:511: Unknown Interpreter: php

แก้

/etc/suphp.conf

;Handler for php-scripts
x-httpd-php="php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

ที่มา

ispconfig domains live

mx record

Read the rest of this entry »

Apache ดับ

เพราะ Vhost มี ที่อยู่ของ rootdoc ของบางเวบที่ลบไปแล้ว  ทำให้เน่ารันไม่ขึ้น

/etc/init.d/apache2 start
Starting web server: apache2Warning: DocumentRoot [/var/www/web1/web] does not exist
Warning: DocumentRoot [/var/www/web19/web] does not exist
failed!

วิธีแก้
1) Make a backup of /etc/apache2/vhosts/Vhosts_ispconfig.conf
2) Rename the latest file /etc/apache2/vhosts/Vhosts_ispconfig.conf_…. that has a date appended to /etc/apache2/vhosts/Vhosts_ispconfig.conf
3) run

apache2ctl –t  ทดสอบ vhost

แก้ตามอาการ เอา suPHP_Config ในเวบที่ลบไปแล้วออก สั่งเทสใหม่ เทสผ่าน รัน apache2

/etc/init.d/apache2 start

ลอกมาจาก

สาเหตุ ลบเวบไซต์ออกไป 2 เป็นเวบที่เคยใส่ค่า suConfig ไว้ เวลาลบเวบไซต์ใน cp มันยังเหลือค่าใน vhost

cp ลบไม่ทัน หรือทะลึ่งลบเร็วเกินไปหว่า – -