directadmin部分常用tips
虽然经常安装DirectAdmin但是时间长了事情多了很多东西都记不住,写好的东西都放自己电脑里面偶尔有时候还很难找到,在这儿记录一些
安装directadmin
yum -y install wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 db4-devel cyrus-sasl-devel perl-ExtUtils-Embed cd /tmp wget http://www.directadmin.com/setup.sh chmod 755 setup.sh ./setup.sh
Centos导入epel源
if cat /etc/redhat-release | grep 'CentOS release 5';then rpm -ivh http://download4.fedora.redhat.com/pub/epel/5/`uname -i`/epel-release-5-4.noarch.rpm;fi if cat /etc/redhat-release | grep 'CentOS release 6';then rpm -ivh http://download4.fedora.redhat.com/pub/epel/6/`uname -i`/epel-release-6-8.noarch.rpm; fi yum install denyhosts memcached -y #如果不需要memcached就不用安装 chkconfig --add denyhosts chkconfig denyhosts on chkconfig --add memcached chkconfig memcached on
安装csf防火墙
yum install perl-libwww-perl perl-Time-HiRes perl iptables -y wget http://www.configserver.com/free/csf.tgz tar zxvf csf.tgz cd csf sh install.sh sed -i 's/TESTING = "1"/TESTING = "0"/g' /etc/csf/csf.conf sed -i 's/ICMP_IN = "1"/ICMP_IN = "0"/g' /etc/csf/csf.conf sed -i 's/DENY_IP_LIMIT = "100"/DENY_IP_LIMIT = "500"/g' /etc/csf/csf.conf sed -i 's/DENY_TEMP_IP_LIMIT = "100"/DENY_TEMP_IP_LIMIT = "500"/g' /etc/csf/csf.conf perl /etc/csf/csftest.pl
修改php参数
ln -s /usr/local/php5/bin/* /usr/bin/ ln -s /usr/local/etc/php5/cgi/php.ini /etc/php.ini sed -i 's#expose_php = On#expose_php = Off#' /etc/php.ini sed -i 's/;date.timezone =/date.timezone = PRC/g' /etc/php.ini #sed -i 's#allow_url_fopen = On#allow_url_fopen = Off#' /etc/php.ini sed -i 's#register_long_arrays = Off#register_long_arrays = On#' /etc/php.ini #sed -i 's#magic_quotes_gpc = Off#magic_quotes_gpc = On#' /etc/php.ini #sed -i 's#display_errors = Off#display_errors = On#' /etc/php.ini sed -i 's#enable_dl = Off#enable_dl = On#' /etc/php.ini sed -i 's#short_open_tag = Off#short_open_tag = On#' /etc/php.ini sed -i 's#output_buffering = Off#output_buffering = On#' /etc/php.ini sed -i 's/memory_limit = 32M/memory_limit = 128M/g' /etc/php.ini sed -i 's/post_max_size = 8M/post_max_size = 32M/g' /etc/php.ini sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 16M/g' /etc/php.ini sed -i 's#allow_call_time_pass_reference = Off#allow_call_time_pass_reference = On#' /etc/php.ini
安装php-memcache扩展
cd /tmp wget -c http://pecl.php.net/get/memcache-3.0.6.tgz tar xzf memcache-3.0.6.tgz cd memcache-3.0.6 /usr/local/php5/bin/phpize ./configure --enable-memcache --with-php-config=/usr/local/php5/bin/php-config --with-zlib-dir make && make install echo "extension = memcache.so">>/etc/php.ini
安装DA中文语言包,基于UTF-8编码
wget -c http://down.kvm.la/directadmin/cn-utf8.tar.gz #cn-utf8和cn-gbk可以选择 tar zxf cn-utf8.tar.gz -C /usr/local/directadmin/data/skins/enhanced/lang sed -i 's/language=en/language=cn/g' /usr/local/directadmin/data/users/admin/user.conf
安装directadmin登录皮肤,默认的样式实在太戳了
wget -c http://down.kvm.la/directadmin/login.tar.gz tar zxf login.tar.gz -C /usr/local/directadmin/data/templates
更新授权
Usage: /usr/local/directadmin/scripts/getLicense.sh <cid> <lid> [<ip>] definitons: cid: Client ID lid: License ID ip: your server IP (only needed when wrong ip is used to get license) example: /usr/local/directadmin/scripts/getLicense.sh 999 9876
更新更换IP
Usage: /usr/local/directadmin/scripts/ipswap.sh {oldip} {newip} [{file}]
none
又一次看到我菊花紧了,尼玛开场白就不能写长点嘛,你个词穷的家伙。。
知道人家穷词 也不要这么直截了当的鄙视人家嘛
装你继续装。。 我会在背后默默鄙视你的。。
我其实不会告诉你,每次你挂了代理我也知道你的IP地址
我是不会告诉你,其实我没有挂代理,只是开着modhead懒得关而已。。
@Jetso
虽然不知道是什么,感觉好像很牛叉的样子。
尼玛咋不开启Gravatar呢。。 我可是上了真人头像的哦。。
我开启了Gravatar的啊啊
好吧 我清理了缓存 就有了
搞个reply邮件提醒嘛,这样才会大大增加各路基友之间的互动性。。
小白,求友链
搭车同求啊