绑域名和开FTP帐号!
用法:
这个文件的名字 域名的3个段 密码(FTP,MYSQL)
./mkuser www discuz net 123456
- echo>>/usr/local/etc/apache2/httpd.conf
- echo '<'VirtualHost 您的IP>' >>/usr/local/etc/apache2/httpd.conf
- echo ' 'ServerAdmin 您的E-MAIL >>/usr/local/etc/apache2/httpd.conf
- echo ' 'DocumentRoot /usr/local/www/data/$2.$3 >>/usr/local/etc/apache2/htt
- pd.conf
- echo ' 'ServerName $1.$2.$3 >>/usr/local/etc/apache2/httpd.conf
- echo ' 'ServerAlias $2.$3 $2.zlks.net >>/usr/local/etc/apache2/httpd.conf
- echo ' 'ErrorLog /usr/local/www/data/$2.$3/log/$2.$3-error_log >>/usr/local
- /etc/apache2/httpd.conf
- echo ' 'CustomLog /usr/local/www/data/$2.$3/log/$2.$3-access_log common >>/
- usr/local/etc/apache2/httpd.conf
- echo '</'VirtualHost'>' >>/usr/local/etc/apache2/httpd.conf
- mkdir /usr/local/www/data/$2.$3
- chmod 757 /usr/local/www/data/$2.$3
- mkdir /usr/local/www/data/$2.$3/log
- chmod 605 /usr/local/www/data/$2.$3/log
- echo>/usr/local/www/data/$2.$3/log/$2.$3-error_log
- echo>/usr/local/www/data/$2.$3/log/$2.$3-access_log
- chmod 604 /usr/local/www/data/$2.$3/log/$2.$3-error_log
- chmod 604 /usr/local/www/data/$2.$3/log/$2.$3-access_log
- apachectl restart
- echo create database $2";">temp.sql
- echo grant select,insert,update,delete,create,drop,alter on $2.* to $2@localhost
- identified by "'"$4"'"";">>temp.sql
- echo use pureftpd_db>>temp.sql
- echo insert into \`ftpd\` \( \`user\`,\`status\`,\`password\`,\`uid\`,\`gid\`,\`
- dir\`,\`ulbandwidth\`,\`dlbandwidth\`,\`comment\`,\`ipaccess\`,\`quotasize\`,\`q
- uotafiles\`\) values \( \'$2.$3\',\'1\',\'$4\',\'2000\',\'2000\',\'\/usr\/local\
- /www\/data\/$2.$3\',\'0\',\'0\',\'\',\'\*\',\'1024\',\'0\'\)\; >>temp.sql
- echo exit>>temp.sql
- echo>>temp.sql
- mysql -p您的MYSQL ROOT密码<temp.sql
- ./mkkhda $1 $2 $3 $4
- rm temp.sql
复制代码 |