Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

爱S shel了!开虚拟主机空间的shell能省点事!l

[复制链接]
思考机器 发表于 2004-11-6 20:43:31 | 显示全部楼层 |阅读模式
绑域名和开FTP帐号!
用法:
这个文件的名字 域名的3个段 密码(FTP,MYSQL)
./mkuser www discuz net 123456


  1. echo>>/usr/local/etc/apache2/httpd.conf
  2. echo '<'VirtualHost 您的IP>' >>/usr/local/etc/apache2/httpd.conf
  3. echo   '    'ServerAdmin 您的E-MAIL >>/usr/local/etc/apache2/httpd.conf
  4. echo   '    'DocumentRoot /usr/local/www/data/$2.$3 >>/usr/local/etc/apache2/htt
  5. pd.conf
  6. echo   '    'ServerName $1.$2.$3 >>/usr/local/etc/apache2/httpd.conf
  7. echo   '    'ServerAlias $2.$3 $2.zlks.net >>/usr/local/etc/apache2/httpd.conf
  8. echo   '    'ErrorLog /usr/local/www/data/$2.$3/log/$2.$3-error_log >>/usr/local
  9. /etc/apache2/httpd.conf
  10. echo   '    'CustomLog /usr/local/www/data/$2.$3/log/$2.$3-access_log common >>/
  11. usr/local/etc/apache2/httpd.conf
  12. echo '</'VirtualHost'>' >>/usr/local/etc/apache2/httpd.conf

  13. mkdir /usr/local/www/data/$2.$3
  14. chmod 757 /usr/local/www/data/$2.$3
  15. mkdir /usr/local/www/data/$2.$3/log
  16. chmod 605 /usr/local/www/data/$2.$3/log
  17. echo>/usr/local/www/data/$2.$3/log/$2.$3-error_log
  18. echo>/usr/local/www/data/$2.$3/log/$2.$3-access_log
  19. chmod 604 /usr/local/www/data/$2.$3/log/$2.$3-error_log
  20. chmod 604 /usr/local/www/data/$2.$3/log/$2.$3-access_log

  21. apachectl restart

  22. echo create database $2";">temp.sql
  23. echo grant select,insert,update,delete,create,drop,alter on $2.* to $2@localhost
  24. identified by "'"$4"'"";">>temp.sql

  25. echo use pureftpd_db>>temp.sql
  26. echo insert into \`ftpd\` \( \`user\`,\`status\`,\`password\`,\`uid\`,\`gid\`,\`
  27. dir\`,\`ulbandwidth\`,\`dlbandwidth\`,\`comment\`,\`ipaccess\`,\`quotasize\`,\`q
  28. uotafiles\`\) values \( \'$2.$3\',\'1\',\'$4\',\'2000\',\'2000\',\'\/usr\/local\
  29. /www\/data\/$2.$3\',\'0\',\'0\',\'\',\'\*\',\'1024\',\'0\'\)\; >>temp.sql
  30. echo exit>>temp.sql
  31. echo>>temp.sql

  32. mysql -p您的MYSQL ROOT密码<temp.sql
  33. ./mkkhda $1 $2 $3 $4
  34. rm temp.sql

复制代码
CyrixIII 发表于 2004-11-8 00:27:27 | 显示全部楼层
机器看来越来越强了
呵呵
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-12-23 11:51 , Processed in 0.022539 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表