“安装” 标签页面:

  • CentOS安装git

    CentOS默认源是没有git的,所以希望通过yum install来安装的童鞋们,不要在错误的道路上越走越远……

    所以,要从源安装,对应的命令:

    yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel

    wget http://git-core.googlecode.com/files/git-1.7.7.5.tar.gz

    ./configure –prefix=/usr/local/git

    make

    make install

    然后对执行文件进行链接,当然,如果安装在/usr/local目录的话,就不用这步了。

    ln -s /usr/local/git/bin/git /usr/local/bin/git

    ln -s /usr/local/git/bin/gitk /usr/local/bin/gitk

    ln -s /usr/local/git/bin/git-shell /usr/local/bin/git-shell

    ln -s /usr/local/git/bin/git-upload-pack /usr/local/bin/git-upload-pack

    ln -s /usr/local/git/bin/git-cvsserver /usr/local/bin/git-cvsserver

    ln -s /usr/local/git/bin/git-receive-pack /usr/local/bin/git-receive-pack

    ln -s /usr/local/git/bin/git-upload-archive /usr/local/bin/git-upload-archive

    常见问题

    1、如果出现“git: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory”

    在确认已经安装iconv库的情况下,执行以下命令:

    echo "/usr/local/lib" > /etc/ld.so.conf.d/git.conf

    /sbin/ldconfig

    2、如果在“git clone https://***”时出现“error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing”

    在使用git前加上“GIT_SSL_NO_VERIFY=true”的环境变量,即:

    env GIT_SSL_NO_VERIFY=true git clone https://***

    2012.01.09 / 1 条评论 / 分类: 所谓技术

  • CentOS下安装使用start-stop-daemon

    CentOS是没有start-stop-daemon的,因为start-stop-daemon在debian的dpkg包里。要安装的话,需要自己折腾。

    相关命令如下:

    wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz

    tar zxf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz

    mv apps/sys-utils/start-stop-daemon-IR1_9_18-2/ ./

    rm -rf apps

    cd start-stop-daemon-IR1_9_18-2/

    cc start-stop-daemon.c -o start-stop-daemon

    cp start-stop-daemon /usr/local/bin/start-stop-daemon

    至此安装完成。可以看到:

    [root@localhost ~]# start-stop-daemon –help
    start-stop-daemon 1.9.18 for Debian – small and fast C version written by
    Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>, public domain.

    Usage:
      start-stop-daemon -S|–start options … — arguments …
      start-stop-daemon -K|–stop options …
      start-stop-daemon -H|–help
      start-stop-daemon -V|–version

    Options (at least one of –exec|–pidfile|–user is required):
      -x|–exec <executable>        program to start/check if it is running
      -p|–pidfile <pid-file>       pid file to check
      -c|–chuid <name|uid[:group|gid]>
                    change to this user/group before starting process
      -u|–user <username>|<uid>    stop processes owned by this user
      -n|–name <process-name>      stop processes with this name
      -s|–signal <signal>          signal to send (default TERM)
      -a|–startas <pathname>       program to start (default is <executable>)
      -N|–nicelevel <incr>         add incr to the process’s nice level
      -b|–background               force the process to detach
      -m|–make-pidfile             create the pidfile before starting
      -R|–retry <schedule>         check whether processes die, and retry
      -t|–test                     test mode, don’t do anything
      -o|–oknodo                   exit status 0 (not 1) if nothing done
      -q|–quiet                    be more quiet
      -v|–verbose                  be more verbose
    Retry <schedule> is <item>|/<item>/… where <item> is one of
    -<signal-num>|[-]<signal-name>  send that signal
    <timeout>                       wait that many seconds
    forever                         repeat remainder forever
    or <schedule> may be just <timeout>, meaning <signal>/<timeout>/KILL/<timeout>

    Exit status:  0 = done      1 = nothing done (=> 0 if –oknodo)
                  3 = trouble   2 = with –retry, processes wouldn’t die

    本文参考了此文档

    2011.12.20 / 2 条评论 / 分类: 梦溪笔记

  • Windows下编译安装Privoxy

    首先,要安装MingW。在此不赘述。当然,用cygwin也可以,但是这样编译出来的Privoxy没有GUI图形界面。PS:Privoxy在jcc.c那里已经自动识别了MingW,并且嵌入了Windows GUI的API,因此编译出来就可以自己采用图形界面了。

    然后,在这里下载Privoxy的源代码,本文以privoxy-3.0.18-stable为例。

    进入privoxy-3.0.18-stable源码目录,执行以下命令,进入bash:

    bash

    执行以下命令,进行配置:

    autoheader
    autoconf
    ./configure –prefix=/r/privoxy –enable-mingw32 –disable-pthread

    稍微解释以下configure的各个参数。–prefix参数指明privoxy的安装目录,/r/privoxy是mingw表示windows文件系统的方式,即R盘的privoxy文件夹。–enable-mingw32指明了为mingw环境配置,其实不指明配置程序也会自动检测得到。–disable-pthread是禁用POSIX的pthread,privoxy会自动使用windows API的thread来实现线程,具体参照errlog.c的部分代码:

    /*********************************************************************
     *
     * Function    :  get_thread_id
     *
     * Description :  Returns a number that is different for each thread.
     *
     *                XXX: Should be moved elsewhere (miscutil.c?)
     *
     * Parameters  :  None
     *
     * Returns     :  thread_id
     *
     *********************************************************************/
    static long get_thread_id(void)
    {
       long this_thread = 1;  /* was: pthread_t this_thread;*/
    
    #ifdef __OS2__
       PTIB     ptib;
       APIRET   ulrc; /* XXX: I have no clue what this does */
    #endif /* __OS2__ */
    
       /* FIXME get current thread id */
    #ifdef FEATURE_PTHREAD
       this_thread = (long)pthread_self();
    #ifdef __MACH__
       /*
        * Mac OSX (and perhaps other Mach instances) doesn't have a debuggable
        * value at the first 4 bytes of pthread_self()'s return value, a pthread_t.
        * pthread_t is supposed to be opaque... but it's fairly random, though, so
        * we make it mostly presentable.
        */
       this_thread = abs(this_thread % 1000);
    #endif /* def __MACH__ */
    #elif defined(_WIN32)
       this_thread = GetCurrentThreadId();
    #elif defined(__OS2__)
       ulrc = DosGetInfoBlocks(&ptib, NULL);
       if (ulrc == 0)
         this_thread = ptib -> tib_ptib2 -> tib2_ultid;
    #endif /* def FEATURE_PTHREAD */
    
       return this_thread;
    }

    配置成功后,编译安装:

    make

    make install

    其实,make后已经有privoxy.exe,可以下载官方的Win32版本的ZIP包,替换里面的privoxy.exe即可使用,无需再make install。

     

    一些注意的问题:

    1、编译时提示未定义“NI_MAXSERV”

    编译时出现如下错误:

    jbsockets.c: In function ‘get_host_information’:

    jbsockets.c:979:22: error: ‘NI_MAXSERV’ undeclared (first use in this function)

    jbsockets.c:979:22: note: each undeclared identifier is reported only once for e

    ach function it appears in

    make: *** [jbsockets.o] Error 1

    修改jbsockets.c,在

    const char jbsockets_h_rcs[] = JBSOCKETS_H_VERSION;

    前面加上:

    /* MOD BY Creke START */

    #ifndef NI_MAXSERV

    #define NI_MAXSERV    32

    #endif

    /* MOD BY Creke END */

    说实话,这是configure没有识别getnameinfo和getaddrinfo,因此config.h中没有定义HAVE_RFC2553所致。这些依赖于官方修复,再次仅拷贝ws2tcpip.h中的相关值进来,作临时修补。

    2、MingW默认安装的话,需要额外的库吗?

    需要zlib库,在mingw中又称为libz,可以在这里下载。当然,如果需要将privoxy拷贝到其它电脑运行,需要将libz-1.dll拷贝到privoxy程序目录中。

    3、额外的DLL?

    libgcc_s_dw2-1.dll

    4、编译好如何发行和安装?

    推荐下载官方发行的win32的zip包,将编译好的privoxy.exe覆盖。同时别忘记拷贝依赖的dll。

    2011.12.07 / 8 条评论 / 分类: 所谓技术

  • BIND-dlz联合数据库DNS服务器安装小记

    BIND是DNS服务程序,既可以做面向用户的DNS服务器,也可以做面向域名的DNS服务器,或者两者混合的DNS服务器。我要做的是面向域名的那种,为域名进行解析。

    下载编译安装是以下指令:

    wget ftp://ftp.isc.org/isc/bind/9.8.0-P4/bind-9.8.0-P4.tar.gz

    cd bind-9.8.0-P4

    ./configure –with-dlz-mysql –enable-largefile –enable-threads –with-openssl –prefix=/usr/local/bind

    make

    make install

    然后在/usr/local/bind/etc/named.conf输入以下内容:

    key "rndc-key" {
    algorithm hmac-md5;
    secret "gOszdwp5stjsnfI7MybyIg==";
    };

    controls {
    inet 127.0.0.1 port 953
    allow { 127.0.0.1; } keys { "rndc-key"; };
    };

    options{
    directory "/usr/local/bind/etc";
    #forwarders {8.8.8.8;};
    pid-file "/usr/local/bind/etc/named.pid";
    statistics-file "/usr/local/bind/etc/named.stats";
    recursion no;
    allow-query {any;};
    allow-transfer {none;};
    };

    logging {
    channel bind_info {
    file "/var/www/logs/bind.log" versions 20 size 20m;
    print-category yes;
    print-time yes;
    severity notice;
    };

    category default {
    bind_info;
    };
    };

    include "/usr/local/bind/etc/view_crekebind.conf";

    接着,从ftp://ftp.rs.internic.net/domain/named.root下载ROOT SERVER地址列表到/usr/local/bind/etc/。并在/usr/local/bind/etc/view_crekebind.conf输入以下内容:

    #any-view
    view "any_view" {
    match-clients { ANY; };
    allow-query-cache { ANY; };
    #allow-recursion { ANY; };
    #allow-transfer { ANY; };

    dlz "Mysql zone" {
       database "mysql
        {host=localhost dbname=crekebind user=root pass=123456 ssl=false}
            {SELECT ‘TRUE’ FROM canonical WHERE content = ‘$zone$’ limit 1}
        {SELECT ttl, type, priority, CASE WHEN lower(type)=’txt’ THEN concat(’\"’, data, ‘\"’) ELSE data END AS data FROM record, canonical WHERE content = ‘$zone$’ and host = ‘$record$’ AND zone = domain}
        {}
            {SELECT ttl, type, host, priority, case when lower(type)=’txt’ then concat(’\"’, data, ‘\"’) else data end AS data FROM record, canonical WHERE zone = domain
            AND content = ‘$zone$’}
            {SELECT ‘TRUE’ FROM xfr, canonical WHERE zone = domain AND content = ‘$zone$’
            AND client = ‘$client$’}";
    };

    zone "." IN {
    type hint;
    file "named.root";
    };

    };

    上面的dlz配置对应myantdns,这是一个开源的PHP+MYSQL的DNS管理前端。

    根据官方文档,这里解释一下“dlz "Mysql zone"”一节的相关内容。如果用的是其他前端,则相关配置可能如下所示:

      1. dlz "Mysql zone" {
      2.    database "mysql
      3.    {host=localhost dbname=dns_data ssl=tRue}
      4.    {select zone from dns_records where zone = ‘$zone$’}
      5.    {select ttl, type, mx_priority, case when lower(type)=’txt’ then concat(’\"’, data, ‘\"’)
      6.         else data end AS data from dns_records where zone = ‘$zone$’ and host = ‘$record$’
      7.         and not (type = ‘SOA’ or type = ‘NS’)}
      8.    {select ttl, type, mx_priority, data, resp_person, serial, refresh, retry, expire, minimum
      9.         from dns_records where zone = ‘%zone%’ and (type = ‘SOA’ or type=’NS’)}
      10.    {select ttl, type, host, mx_priority, case when lower(type)=’txt’ then concat(’\"’, data, ‘\"’)
      11.         else data end AS data, resp_person, serial, refresh, retry, expire,
      12.         minimum from dns_records where zone = ‘$zone$’ and not (type = ‘SOA’ or type = ‘NS’)}
      13.    {select zone from xfr_table where zone = ‘$zone$’ and client = ‘$client$’}
      14.    {update data_count set count = count + 1 where zone =’$zone$’}";
      15. };

    第一行声明使用DLZ驱动,第二节声明使用MYSQL。这些一般都是规定不变的。

    第三行声明MYSQL的链接信息,这一行可以用到的参数还有dbname、port、host、user、pass、socket、compress、ssl、space。

    第四行是查询DNS服务器中是否存在被请求域名$zone$,如果返回一行或以上结果,则被判断为存在,否则返回不存在改域名的应答。

    第五行至第七行是返回域名记录,如果在下面紧接着的定义中定义了查询SOA和NS记录的语句,则本行必须过滤掉相应的SOA和NS记录,如本例子所示;如果下面没定义,则本行必须返回相应的SOA和NS记录,如上面的例子所示。

    第八行则是刚刚说的用于返回SOA和NS记录的语句,如果上面的没有返回,则如例子所示设置;如果已经返回,则设为“{}”,注意其中不能用空格及其他字符。

    第十至十二行是返回AXFR时所有的域名记录,如果这是包括SOA和NS记录,则第八行须设为空,否则须在第八行返回SOA和NS记录。

    第十三行是查询当前请求AXFR的请求者$client$是否符合请求$zone$的授权,只要返回一行或以上记录就算符合。

    第十四行是访问$zone$时的为相应的记录加一。

    其中从第八行值第十四行的记录均为可选项。

    说实话,配置bind dlz并不算麻烦,麻烦的是,现在找不到像模像样的PHP管理前端,webmin的开发得挺好,但是它不仅仅是bind管理,所以比较庞大,安装比较麻烦。这次我没装,有空会好好研究一下。

    2011.08.21 / 4 条评论 / 分类: 所谓技术

  • Ubuntu Server 10.04安装GCC3

    下载GCC3的deb包

    这里选择一个镜像进入,看到有一堆deb包。

    Ubuntu软件包命名遵循下列约定: <1>_<2>-<3>_<4>.deb

    * <1>软件包名称(Package Name):

    * <2>版本(Version Number):

    * <3>修订号(Build Number):

    * <4>平台(Architecture):

    o i386

    o all: 平台无关. 即适用于所有平台.

    例如

    * nano_1.3.10-2_i386.deb

    o 软件包名称: nano

    o 版本: 1.3.10

    o 修订号: 2

    o 平台: i386

    我们下载其中的(64位系统的请用对应的amd64的deb包):

    • cpp-3.4_3.4.6-6ubuntu5_i386.deb
    • g++-3.4_3.4.6-6ubuntu5_i386.deb
    • gcc-3.4_3.4.6-6ubuntu5_i386.deb
    • gcc-3.4-base_3.4.6-6ubuntu5_i386.deb
    • libstdc++6-dev_3.4.6-6ubuntu5_i386.deb

    安装GCC3的deb包

    使用下列命令安装deb包:

    sudo dpkg -i *.deb

    修改为默认使用GCC3

    使用下面命令可以查看当前系统安装和使用的GCC:

    ls /usr/bin/gcc* -ll

    ls /usr/bin/g++* -ll

    ls /usr/bin/cpp* -ll

    使用下面命令修改为默认使用GCC3.4

    ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc

    ln -sf /usr/bin/g++-3.4 /usr/bin/g++

    ln -sf /usr/bin/cpp-3.4 /usr/bin/cpp

    好啦,终于折腾完了。

    2011.04.17 / 暂无评论 / 分类: 所谓技术

  • 英文Ubuntu安装中文包(locale)的方法

    查看系统内安装的locale:

    locale -a

    如果没有“zh-CN.UTF-8”,则表示系统内没有安装中文locale。这会导致“LC_CTYPE: cannot change locale (zh_CN.UTF-8)”的警告。

    输入以下命令安装:

    cd /usr/share/locales
    sudo ./install-language-pack zh_CN

    然后重开终端,就可以发现中文locale已经安装完毕,警告已经不再出现了。

    当然,还可以执行:

    sudo locale-gen

    重建locale。

    而要删除locale,则是“/usr/share/locales”对应的“remove-language-pack”。

    参考连接:

    1. 修改locale
    2. locale在哪儿怎么配置才能用fcitx?

    2010.09.18 / 2 条评论 / 分类: 所谓技术

  • Sharetronix在IIS下安装及ISAPI_Rewrite的httpd.ini规则

    首先我们得承认:Sharetronix安装程序会检测是不是Apache服务器,以及有没有mod_rewrite模块。如果是IIS而不是Apache,则会终止安装。这时候,我们可以修改安装文件的检测步骤来跳过这个检测。

    但有更简单的方法,就是在本地Apache环境下安装好Sharetronix,再上传安装好的目录及数据库。别忘了要更改配置文件conf_main.php来适应主机上的设置哦。

    怎么rewrite呢?这里以ISAPI_Rewrite的httpd.ini为例。IIS7已经可以转换.htaccess为web.config了,就不用这么麻烦。

    httpd.ini代码,假设程序安装在“sharetronix”目录下:

    [ISAPI_Rewrite]

    # 3600 = 1 hour
    CacheClockRate 3600

    RepeatLimit 32

    RewriteCond URL /sharetronix(?!/api/|/i/|/system/|/themes/|/uc_client/).*
    RewriteRule /sharetronix(.*) /sharetronix/_chineseuri.php?$1 [I]

    httpd.ini上传至相应文件夹,每个主机商都会不一样,这个自己要注意。

    然后把一下内容保存为“_chineseuri.php”,以“UTF-8 无BOM”格式保存。上传至sharetronix的安装目录。

    <?php
    
    // IIS Mod-Rewrite
    if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
    $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
    }
    // IIS Isapi_Rewrite
    else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
    $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
    }
    else
    {
    // Use ORIG_PATH_INFO if there is no PATH_INFO
    if ( !isset($_SERVER['PATH_INFO']) && isset($_SERVER['ORIG_PATH_INFO']) )
    $_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
    
    // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
    if ( isset($_SERVER['PATH_INFO']) ) {
    if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
    $_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
    else
    $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];
    }
    
    // Append the query string if it exists and isn't null
    if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
    $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
    }
    }
    
    require("index.php");
    
    ?> 

    OK!Sharetronix在IIS下完美运作!

    下次将向大家介绍一些Sharetronix联合QQ机器人。现在我已经装了个预览版,可以在这里围观:http://t.lufie.net/sharetronix/

    2010.08.05 / 1 条评论 / 分类: 所谓技术

  • StatusNet配置文件config.php(安装参考)

    StatusNet安装配置。

    以下是config.php刷屏,O(∩_∩)O~

    //使用URL Rewrite
    $config['site']['fancy'] = true;
    //对手机浏览友好
    $config['site']['mobile'] = true;
    
    //Settings
    $config ['location']['share'] = false; // 设置是否显示“地理共享”选择框(checkbox);
    $config ['location']['sharedefault'] = false; //设置用户地理共享默认选择,设置为false,则所有新注册的用户均关闭地理位置
    $config['attachments']['uploads'] = false; //关闭上传
    
    //卸载不需要的插件
    unset($config['plugins']['default']['Mapstraction']);//关闭地理信息分享
    unset($config['plugins']['default']['OStatus']);//关闭Ostatus
    unset($config['plugins']['default']['OpenID']);//关闭OpenID
    unset($config['plugins']['default']['WikiHashtags']);//关闭WikiHashtags
    unset($config['plugins']['default']['Geonames']);//关闭Geonames
    
    // Twitter 设置
    $config['admin']['panels'][] = 'twitter';//将twitter选项加到管理员菜单中
    $config['twitter']['signin'] = false;
    
    // Twitter integration source attribute. Note: default is StatusNet
    $config['integration']['source'] = 'StatusNet';
    
    // Enable bidirectional Twitter bridge
    //
    // NOTE: if you enable this you must also set $config['avatar']['path']
    //
    $config['twitterimport']['enabled'] = true;
    
    // Twitter OAuth settings. Documentation is at http://apiwiki.twitter.com/OAuth-FAQ
    //下面设置在twitter中注册的API
    $config['twitter']['consumer_key']    = '';
    $config['twitter']['consumer_secret'] = '';
    
    //打开twitter连接插件
    addPlugin('TwitterBridge');
    
    //打开MobileProfile插件,为手机浏览行方便
    addPlugin('MobileProfile');

    其中,“$config['integration']['source']”是你注册twitter api时的API名字。如果有中文,记得把config.php保存为“UTF 无BOM”编码格式。

    2010.06.05 / 暂无评论 / 分类: 所谓技术

  • Ubuntu Server安装配置使用注意事项

    本文以Ubuntu Server  9.10为例。

    安装注意事项

    分区什么的,用默认的有LVM的就行,或者第一项没有LVM的。要么就自己分吧,手贱分错了就杯具了哈。

    询问用户目录是否加密时,选择“否”,要不然启动时会无法载入某分区。

    安装AMP、JAVA/TOMCAT之类的,请参阅这里:(待添加)

    安装桌面图形环境清参阅这里:(待添加)

    Console显示“口”,不显示中文?那就只让它显示英文吧。

    原因是当年安装Server时,手贱地选择了中文,在中文环境下安装,所以……

    sudo nano /var/lib/locales/supported.d/local
    修改为:
    a. en_US.UTF-8 UTF-8
    运行:locale-gen –purge

    b. nano /etc/default/locale
    修改为:
    LANG="en_US.UTF-8"
    LANGUAGE="en_US:en"

    重启OK

    恢复命令行,取消gdm自启动

    其实如果只是想搞个GUI桌面环境,根本不用搞gdm,这玩意儿是用来管理登陆的。你都要恢复命令行了,还装它作甚……不过,如果你已经装了,又不想卸载,那还是有办法的。网上的老方法在9.04下还可,9.10已经不行了。

    如果只是取消gdm自启动,采取下面方法。

    /etc/init/gdm.conf:13行
    默认是stop on runlevel [016]
    改成: stop on runlevel [0216] 重启即可

    如果要恢复完全的命令行字符界面的启动和禁止gdm,则采取下面方法。

    /etc/default/grub
    在COMMAND_LINE_DEFAULT处,
    加上 text 就是不启动GDM
    去掉quiet splash 就是可以看到启动的信息输出
    如果要完全恢复text mode boot up和禁用GDM,则既删除quiet splash又将text添加在该位置即可。

    如果在运行中希望关闭X,回到字符界面,可以采取以下方法。

    sudo /etc/init.d/gdm stop

    或者

    按ctrl+alt+F1

    如果要启动X,则直接输入“startx”并回车即可。

    安装配置SSH

    安装SSH:

    sudo apt-get install openssh-server

    配置:

    sudo vi /etc/ssh/sshd_config

    先将StrictModes关闭,否则可能因为没有私钥导致无法登陆SSH。

    接着,重载配置:

    sudo /etc/init.d/ssh reload

    然后,打开SSH客户端登录。

    注意,新建用户后,需要用

    sudo passwd USER

    更改或者重新输入一遍用户密码,否则SSH不能登录。这个纳闷了我N久……

    安装配置AMP。

    还是用Apache,不用nginx。

    安装MySQL:

    sudo apt-get install mysql-server mysql-client

    安装Apache和PHP:

    sudo apt-get install apache2 apache2-utils php5 php5-mysql php5-curl php5-gd php5-mcrypt php5-mhash php5-xmlrpc libapache2-mod-php5

    这里之所以要单独列出libapache2-mod-php5,主要是由于php5的依赖关系没有做好,有可能会安装上libapache-mod-php4的包,所以为了避免不必要的麻烦,干脆还是单独指定比较好。如果有朋友还是会出现问题,请在新立得中查找libapache-mod-php4包,如果安装的话请将其删除。

    然后就OK了。

    Apache2的配置文件在“/etc/apache2/apache2.conf”,而网站的配置文件在“/etc/apache2/sites-enabled/000-default”这个文件里。在apache2.conf可以看到这玩意儿Include了一堆配置文件,每个配置文件负责不同的部分,真是够囧。

    安装配置FTP。

    都说用vsftpd?但还是Pure-ftpd好啊。

    安装pure-ftpd:

    sudo apt-get install pure-ftpd

    配置什么的,参考这里:连接1连接2。配置很纠结吧?那就用WEB管理吧:User manager for PureFTPd。

    差不多了,先写到这里。

    2010.04.16 / 暂无评论 / 分类: 所谓技术

  • CentOS+Cpanel安装配置教程

    安装过程选择英文,不要手痒选中文,否则会很纠结的。

    选择软件时,我由于测试缘故,选了Desktop和Server。但实践证明,CentOS的GUI不好玩,而装CP会把你的Server大部分软件卸了。这里为了精简系统的目的,把所有默认的复选项的勾全部去掉,然后只选择“Development Tools”(开发工具)一项。

    如果不装CP,那么应该选择下面软件包:

    勾选:Editors, Text-based Internet, Development Libraries, Development Tools, DNS Name Server, FTP Server, Mail Server, MySQL Database, Server Configuration Tools, Web Server, Administration Tools, Base, and System Tools

    CentOS配置系统启动时默认的启动模式(字符、图形)

    方法:
    1、vi /etc/inittab
    2、找到id:x:initdefault:,我的系统是id:3:initdefault:,即默认以字符模式启动。
    3、将3改为5即可,即id:5:initdefault:
    4、reboot

    startx是在字符模式进入图形模式
    init 3是在图形模式进入字符模式

    vm下centos上不了网解决办法:
    仅供参考:如果本机也是通过路由上网的话,把vmwear的网卡设置成桥接看看,本机拨号上网的话,设置成nat。测试下看看

    安装Cpanel:

    wget http://layer1.cpanel.net/latest

    然后用sh命令执行下载回来的脚步即可。等待10-70分钟就装好了。

    安装完成Cpanel之后,重启系统。然后,访问https://你的IP:2087/,用户名是root,密码是你的root密码。如果提示证书问题,点信任以继续。进入WHM安装向导。前往这里查看WHM安装向导。看不懂英文?那还混啥……

    然后到控制台,运行“/scripts/phpextensionmgr install IonCubeLoader ZendOpt”安装两个PHP扩展。前者用于运行CP破解脚本,后者是著名的PHP加速器。

    然后破解什么的,就OK了。当然,如果找不到最新版的CP的破解,也是很正常的。

    2010.04.16 / 15 条评论 / 分类: 梦溪笔记