标签: DirectAdmin

  • DirectAdmin的数据库权限说明

    DirectAdmin数据库权限和Cpanel有一定的差别。

    登陆 DirectAdmin 之后,找到 Mysql管理,创建新的数据帐户,创建之后,我们可以用这个帐户登陆phpMyadmin,但是只能看到当前这个数据库,如果需要导入/导出其他的数据,还需要重新登陆。

    DirectAdmin给数据库也做了相应的权限设置,登陆DirectAdmin的帐户默认是可以登陆phpMyadmin的,而且是最高的权限,可以看到这个DirectAdmin帐户下所有的数据信息,并可以进行操作。

    如果您的DirectAdmin下有两个或者两个以上的程序,如果这些程序都是一个人使用,建议使用DirectAdmin的帐户登陆,这样可以方便操作。

    如果是和朋友一起使用,建议直接把创建数据库的帐户信息给朋友即可,这样他登陆之后只能看到他当前使用的数据库。

    虽然没有Cpanel的功能多,但是DirectAdmin在一些功能设置上还是很不错的。

  • DirectAdmin下启用EXIF for PHP

    由于非常喜欢Imagevue相册的效果,所以弄了个XX版玩玩

    但是安装好后提示需要exif支持,读取照片里的信息

    找到DirectAdmin论坛里的帖子,安装方法如下
    vi /usr/local/directadmin/custombuild/configure/ap2/configure.php5

    #!/bin/sh
    ./configure \
            –with-apxs2 \
            –with-curl=/usr/local/lib \
            –with-gd \
            –enable-gd-native-ttf \
            –with-ttf \
            –with-gettext \
            –with-jpeg-dir=/usr/local/lib \
            –with-freetype-dir=/usr/local/lib \
            –with-kerberos \
            –with-openssl \
            –with-mcrypt \
            –with-mhash \
            –with-mysql \
            –with-mysqli \
            –with-pcre-regex=/usr/local \
            –with-pdo-mysql \
            –with-pear \
            –with-png-dir=/usr/local/lib \
            –with-zlib \
            –with-zlib-dir=/usr/local/lib \
            –enable-zip \
            –with-iconv=/usr/local \
            –enable-bcmath \
            –enable-calendar \
            –enable-ftp \
            –enable-magic-quotes \
            –enable-sockets \
            –enable-exif \
            –enable-mbstring在里面增加了–enable-exif
    然后回到 /usr/local/directadmin/custombuild/下
    ./build php all
    最后编译完成会自动重启apache
    但是悲剧的是编译完成,无任何错误,进入phpinfo查看,还是没有exif

    DirectAdmin的论坛里也有人发帖问这个问题,但是没有人回答

    后来想到是不是因为suphp的原因
    vi /usr/local/directadmin/custombuild/configure/suphp/configure.php5

    #!/bin/sh
    “./configure” \
    “–prefix=/usr/local/php5” \
    “–enable-force-cgi-redirect” \
    “–enable-fastcgi” \
    “–with-config-file-path=/usr/local/etc/php5/cgi” \
    “–with-curl=/usr/local/lib” \
    “–with-gd” \
    “–with-gettext” \
    “–with-jpeg-dir=/usr/local/lib” \
    “–with-freetype-dir=/usr/local/lib” \
    “–with-kerberos” \
    “–with-openssl” \
    “–with-mcrypt” \
    “–with-mhash” \
    “–with-mysql=/usr” \
    “–with-mysqli=/usr/bin/mysql_config” \
    “–with-pcre-regex=/usr/local” \
    “–with-pdo-mysql=/usr” \
    “–with-pear” \
    “–with-png-dir=/usr/local/lib” \
    “–with-zlib” \
    “–with-zlib-dir=/usr/local/lib” \
    “–enable-zip” \
    “–enable-gd-native-ttf” \
    “–with-iconv=/usr/local” \
    “–enable-bcmath” \
    “–enable-calendar” \
    “–enable-ftp” \
    “–enable-magic-quotes” \
    “–enable-sockets” \
    “–enable-exif” \
    “–enable-mbstring”同样的在里面增加”–enable-exif” \
    然后回到 /usr/local/directadmin/custombuild/下
    再编译安装一次
    ./build php all

    现在apache重启好后查看phpinfo已经有了exif,进入imagevue里查看,没有了exif不支持的警告,搞定

    如果你也是使用suphp,并且要安装exif的朋友可以尝试下此方法。

  • Directadmin 用户出现internal server error错误解决办法

    出现这个问题是由于服务器安全权限升级导致的,可以说是更加安全,不过安全的基础之上带来了一些比较烦人的问题,一些老用户在未升级之前已经存在,服务器升级之后可能由于某些原因,用户的权限没有得到相应的提升,所以导致这种错误的出现。
    解决方法:
    首先先从最简单的方法说起,将所在目录的.htaccess 删除然后重新生成一份,即可得到解决。
    如果第一种方法无法解决,那么开始进入后台重置权限,登陆后台http://IP:2222/

    进入文件管理器,然后进入到你域名网站的目录一般为public_html,管理器看到的地址一般为/domains/xxx.com/public_html/。
    然后选中目录下全部文件 进行权限重置。

    第一次设置文件权限为 755 然后勾选recursive 点击set permission。
    第二次设置用户执行reset owner。

    然后访问网站查看是否恢复正常。
    如有其他问题,请联系的管理员。

  • directadmin的build升级或降级功能

    使用build来升级Directadmin自带的软件,无需再配置其他东西.
    关联性等一些东西DA会自动做好,这样也省事.
    cd /usr/local/directadmin/custombuild/
    ./build dovecot #这样便会升级dovecot,依赖性也会一次性解决

    对于php ftp等组件,也可以强制指定版本(软件版本降级):
    ./build set php_ver 5.2
    .build php n #如果php的版本高于5.2,就相当于降级了.
    此操作php的版本会变回 5.2

    如果运行 ./build all 则会升级所有配套软件,升级的前提条件是同级目录下的options.conf 里的选项为”yes”的软件
    Directadmin build的所有功能及选项

    +——————————————————–
    |
    | DirectAdmin WebServices Installer
    | Written by Martynas Bendorius and DirectAdmin
    | Version: 1.1.19
    |
    +——————————————————–
    | To build everything run:
    | ./build all
    |
    | NOTE: Command all will compile everything as it is set
    | in the options.conf file, please take a look at
    | “./build options”!
    +——————————————————–
    | Install/update server components:
    | ./build apache
    | ./build autoconf
    | ./build automake
    | ./build awstats
    | ./build curl
    | ./build dovecot
    | ./build freetype
    | ./build iconv
    | ./build icu
    | ./build libjpeg
    | ./build libpng
    | ./build libtool
    | ./build libxml2
    | ./build libxslt
    | ./build m4
    | ./build mcrypt
    | ./build mhash
    | ./build mod_perl
    | ./build mysql
    | ./build pcre
    | ./build php
    | ./build proftpd
    | ./build suphp
    | ./build webalizer
    | ./build zend
    | ./build zlib
    +——————————————————–
    | Components configuration options:
    | ./build exim_conf
    | ./build rewrite_confs
    | ./build secure_php
    +——————————————————–
    | Install/update web applications:
    | ./build phpmyadmin
    | ./build atmail
    | ./build roundcube
    | ./build squirrelmail
    | ./build uebimiau
    +——————————————————–
    | CustomBuild related options/functions:
    | ./build create_options
    | ./build cron
    | ./build options
    | ./build set option_name value
    | ./build update_da
    | ./build update_versions
    | ./build update_webapps
    | ./build used_configs
    | ./build versions
    +——————————————————–
    | Jailed shell (beta):
    | ./build all_jail
    | ./build coreutils
    | ./build shell
    | ./build smtp_mail
    | ./jail/jail_user.sh user
    +——————————————————–
    | Remove old build data:
    | ./build clean
    | ./build clean_old_webapps
    +——————————————————–
    | Get latest build script or (and) data:
    | ./build update
    | ./build update_script
    +——————————————————–
    | Get data for current build script:
    | ./build update_data
    +——————————————————–
    | Recommended for experienced users only (!):
    | ./build php5-cli
    | ./build php6-cli
    | ./build php5-cgi
    | ./build php6-cgi
    | ./build todovecot
    +——————————————————–
    | You can pass a 2nd argument to automate the input:
    | ./build <option> d : do the default action
    | ./build <option> y : answer yes to all questions
    | ./build <option> n : answer no to all questions
    +——————————————————–

  • directadmin update versions

    cd /usr/local/directadmin/custombuild
    ./build update
    ./build clean
    ./build update_versions

  • 密码保护:debian下安装directadmin详细步骤

    此内容受密码保护。如需查阅,请在下方输入密码。

  • DirectAdmin下安装eAccelerator

    需要autoconf支持

    apt-get install autoconf

    下面安装eAccelerator
    cd /usr/local/src
    mkdir eAccelerator
    下载最新的eAccelerator 。
    cd eAccelerator
    wget eaccelerator-*.tar.bz2

    tar -xvjf eaccelerator-*.tar.bz2

    cd eaccelerator-*

    安装步骤:
    输出目录,安装目录
    export PHP_PREFIX=”/usr/local”

    $PHP_PREFIX/bin/phpize
    //显示你需要的phpize 配置安装
    ./configure \
    –enable-eaccelerator=shared \
    –with-php-config=$PHP_PREFIX/bin/php-config
    //编译
    make
    //安装
    make install

    #现在创建缓存的目录 或Cache directory

    cd /tmp

    mkdir eaccelerator

    chmod 0777 eaccelerator

    编辑 php.ini
    在[Zend]上面加
    [eaccelerator]
    zend_extension=”/usr/local/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so”
    eaccelerator.shm_size=”1″
    eaccelerator.cache_dir=”/tmp/eaccelerator”
    eaccelerator.enable=”1″
    eaccelerator.optimizer=”1″
    eaccelerator.check_mtime=”1″
    eaccelerator.debug=”0″
    eaccelerator.filter=””
    eaccelerator.shm_max=”0″
    eaccelerator.shm_ttl=”3600″
    eaccelerator.shm_prune_period=”3600″
    eaccelerator.shm_only=”0″
    eaccelerator.compress=”1″
    eaccelerator.compress_level=”9″
    eaccelerator.keys = “disk_only”
    eaccelerator.sessions = “disk_only”
    eaccelerator.content = “disk_only”

    重启apache

  • directadmin安装教程(英文)

    Quick Install Manual DirectAdmin Control Panel on supported Linux O/S
    1. Remove packages not needed for DirectAdmin install:
    service mDNSResponder stop
    service auditd stop
    service mysqld stop
    service mysql stop
    yum remove httpd php mysql dovecot cpuspeed webmin proftpd spamassassin
    2. Ensure the above services are completely removed, and does not start during the boot time.
    rm -rf /var/lib/mysql
    chkconfig auditd off
    chkconfig bluetooth off
    chkconfig mDNSResponder off
    chkconfig nifd off
    3. Install required packages :
    yum install gcc gcc-c++ flex bison xinetd perl make wget nano mc -y
    The result should show or similar:
    Installed: bison.x86_64 0:2.3-2.1 flex.x86_64 0:2.5.4a-41.fc6 gcc-c++.x86_64 0:4.1.2-44.el5
    mc.x86_64
    1:4.6.1a-35.el5 perl.i386 4:5.8.8-18.el5_3.1 xinetd.x86_64 2:2.3.14-10.el5
    4. Install DirectAdmin
    wget http://www.directadmin.com/setup.sh
    chmod 755 setup.sh
    ./setup.sh
    5. Provide appropriate details for :
    customer id:
    license id:
    FQDN:
    Network Interface: (just cofirm it if it was found by install, otherwise provide manually)
    IP address: (just cofirm it if it was found by install, otherwise provide manually)
    6. You now have 2 options for your apache/php setup.
    1. customapache or
    2. custombuild (newest version of install program with lot of Apache/PHP selection options)
    Choose option 2.
    Would you like the default settings of apache 2.2 and php 5 cli?
    Answer “y”
    If we have done everything correctly, “setup” will now begin automatic install. It will take 15-30
    minutes to complete.
    7. When setup done, it will show access information on screen. Copy paste them, and store them.
    8. Post installation checks :
    (1) Install Zend :
    cd /usr/local/directadmin/custombuild
    In file “options.conf”, change ‘zend enabled = no’ to ‘zend enabled = yes’
    Run ‘./build zend’
    Create a file “/var/www/html/info.php”, put this in the file :
    ‘<?phpinfo();?>’
    Save the file and access it in the browser using http://IPaddress/info.php
    Confirm everything is perfect on the php page.
    (2) Login to DirectAdmin page at http://IPaddress:2222
    Goto Admin level >> Services Monitor .
    Confirm all the services are running, if not, restart them. If any service fails to restart, fix them.
    The DirectAdmin set is now complete.

    If you get the following error
    If you get an error given below while installing DA in a Debian server,
    do the following FIX to solve it.
    *** Cannot find the named binary. Please install Bind ***
    /etc/bind/named.conf: No such file or directory
    /etc/bind/named.ca: No such file or directory
    *** g++ is required for compiling, please install g++ ***
    *** cannot find /usr/include/openssl/ssl.h. Please make sure libssl-dev
    is installed ***
    eg: apt-get install libssl-dev
    *** cannot find /usr/bin/make. Please make sure that make is installed ***
    Installation didn’t pass, halting install.
    *******************************************
    *******************************************
    Cannot find /usr/local/bin/php
    Please recompile php with custombuild, eg:
    cd /usr/local/directadmin/custombuild
    ./build all d
    *******************************************
    *******************************************
    FIX :
    apt-get install g++
    apt-get install libssl-dev
    apt-get install make
    apt-get install bind9 dnsutils
    Then restart the work with ./setup.sh

  • directadmin 更新PHP

    cd /usr/local/directadmin/custombuild
    ./build update
    wget -O php-5.2.15.tar.gz http://files.directadmin.com/services/custombuild/php-5.2.15.tar.gz
    perl -pi -e ‘s/php5:5.2.14:6dff7429a1b43aa1c76a43e909215608/php5:5.2.15:dbbb2beed6b51e05d134744f137091a9/’ versions.txt
    perl -pi -e ‘s|cd php-\$\{PHP5_VER\}|cd php-\$\{PHP5_VER\}\n\tperl -pi -e \”s#resolved_name\\[resolved_basedir_len\\]#resolved_name\\[resolved_basedir_len -1\\]#\” main/fopen_wrappers.c|’ build
    ./build php n

  • directadmin磁盘配额权限设置

    User test created

    Details

    Unix User created successfully

    Error with system Quotas
    setquota: Mountpoint (or device) / not found or has no quota enabled. setquota: Not all specified mountpoints are using quota.
    Debug Guide
    User’s data directory created successfully
    Domains directory created successfully
    Domains directory created successfully in user’s home

    Domain Created Successfully

    User added to ssh config file.

    安装后建立用户会提示没有磁盘配额权限,具体解决办法如下

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    /dev/xvda       /               ext3    noatime,errors=remount-ro,usrquota,grpquota 0       1
    /dev/xvdb       none            swap    sw              0       0
    ~

  • debian5安装Directadmin

    重装安装系统后,首先做一些准备工作
    修改源、升级、卸载预装的apache、安装一些东东gcc等 vi /etc/apt/sources.list

    修改内容为

    deb http://ftp.debian.org/debian lenny main contrib non-free

    deb http://security.debian.org/debian-security lenny/updates main contrib non-free

    deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free

    apt-get update //更新系统

    apt-get upgrade

    apt-get remove apache*  //卸载Apache

    apt-get autoremove

    apt-get install -y build-essential wget make libssl-dev

    apt-get update //更新系统

    apt-get upgrade
    安装DA

    wget www.directadmin.com/setup.sh

    chmod +x setup.sh

    ./setup.sh
    安装完成后手动启用垃圾过滤系统

    /usr/local/directadmin/scripts/spam.sh

    /usr/bin/spamd -d -c -m 15

  • CentOS上DirectAdmin安装教程

    DirectAdmin是一款付费的虚拟主机管理软件,通常简称为DA,DA比Cpanel功能上简单,但是内存占用也更少些,更重要的是价格也更便宜,一般自己用或者搞合租DA算是很合适的。

    安装前首先确保已经购买了DirectAdmin的授权,购买授权后会有Client ID,License ID,也需要在DA官网上或者DA销售商那里提交你的VPS或者服务器的IP和系统信息。

    1、安装CentOS的相关组件的命令如下:

    yum update -y
    yum install gcc-c++ gcc make automake wget flex -y
    2、安装DirectAdmin需要干净的系统,所以在装之前要卸载掉httpd、php、mysql。

    yum remove httpd* php* mysql* -y
    3、下载DirectAdmin安装脚本文件,执行命令:

    wget http://directadmin.com/setup.sh
    4、为DirectAdmin安装脚本文件添加执行权限,执行命令:

    chmod +x setup.sh
    5、执行DirectAdmin安装脚本文件:

    ./setup.sh
     
    运行DirectAdmin安装文件,然后在下面填入相关的信息。其中hostname最好最好使用二级域名不要使用顶级域名。

    DirectAdmin’s setup has a few more things you need to fill:
    Please enter your Client ID :                   //输入你的Client ID
    Please enter your License ID :                    //输入你的License ID
    Please enter your hostname \(server.domain.com\)                         //输入一个主机名,如:linode.vpser.net
    It must be a Fully Qualified Domain Name
    Do *not* use a domain you plan on using for the hostname:
    eg. don’t use domain.com. Use server.domain.com instead.
    Do not enter http:// or www
    Enter your hostname (FQDN) :
    Is this correct? (y,n) :                          //提示上面是否正确,正确请输入y
    Is eth0 your network adaptor with the license IP? (y,n) :             //输入y
    Is xx.xx.xx.xx the IP in your license? (y,n) :                           //确认IP是否是License上注册的IP
    DirectAdmin will now be installed on: Enterprise 5
    Is this correct? (must match license) (y,n) :               //输入y
    You now have 2 options for your apache/php setup.
    1: customapache: older, more tested. Includes Apache 1.3, php 4 and frontpage.
    2: custombuild 1.1: newer, less tested. Includes any Apache version, php 4, 5, or both in cli and/or suphp. Frontpage not available with Apache 2.x.
    Post any issues with custombuild to the forum: http://www.directadmin.com/forum/forumdisplay.php?f=61
    Enter your choice (1 or 2):        //一般选择2就行,使用php5
    经过这些步骤,DirectAdmin的安装已经完成了。

    安装完成后会提示:

    DirectAdmin的用户名密码及DirectAdmin的管理后台地址等。

    一般基于OpenVZ的VPS需要在使用前打开/usr/local/directadmin/conf/directadmin.conf这个文件,确认其中的ethernet_dev的值修改为:venet0:0 ,具体已ifconfig 为准。

    执行:service directadmin restart 重启DirectAdmin,用http://IP:2222 登录DirectAdmin后台。