易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux 判断机器的字节顺序

#include <fcntl.h>
int main(void)
{
    typedef union un{
        short s;
        char c[sizeof(short)];
    }un;
    un myun;
    myun.s = 0x0102;
    if(sizeof(short) == 2){
        if(myun.c[0] == 1 && myun.c[1] == 2)
                printf("big-endian\r\n");
        else if(myun.c[0] == 2 && myun.c[1] == 1)
                printf("little-endian\r\n");
        else
                printf("unkown\r\n");
       
    }
    return 0;
}
摘自《Unix 网络编程》


相关文档:

Linux命令行下网络配置

动态获取IP
虚拟机的网卡使用NAT的连接方式(没办法,单位一个端口只允许1个IP,连hub都没法用)
pwd> vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO的值改为dhcp,并保存
ifdown eth0; ifup eth0;重启网卡
ifconfig 发现被分配了个IP:10.0.2.15
ping www.163.com 通过
静态设置IP
待续.... ......

Linux下nginx的安装问题

最近准备给公司的网站架构做下调整,安装部署新机器的时候遇到一些问题,nginx在安装的时候一直提示未找到openssl
./configure --prefix=/usr/local/nginx
 程序代码
./configure: error: the HTTP cache module requires md5 functions from OpenSSL library.  You can either disable the module by us ......

贪心安装64位linux的尴尬

administer@administer-laptop:~/tem/tt$ cat hello.asm
[section .data]
strHello db "Hello, world!",0Ah
STRLEN  equ $-strHello
[section .text]
global _start
_start: 
mov edx,STRLEN
mov ecx,strHello
mov ebx,1
mov eax,4
int  0x80
mov  ......

Linux下Apache的安装

地址:http://httpd.apache.org/
下载地址:http://httpd.apache.org/download.cgi
1,解压缩
tar -xzvf httpd-2.0.63.tar.gz
2,配置
./configure --prefix=/usr/local/apache --enable-module=all --enable-shared=max
3,编译
make
4,安装
make install
5,管理
apachectl start
apachectl stop
apachectl rest ......

使用 Vmware Player在WIndows内构建Linux环境

1, 下载 VMWare Player
http://www.vmware.com/products/player/

单注册一下,就可以下载了。
2, 生成 VMWare 的种子文件
http://www.easyvmx.com/new-easyvmx.shtml
3,
下载 你想要的Linux 的 ISO 文件。
4, 解压缩 2 中的 VMWare种子文件, 双击其中的
扩展名为vmx的文件。 然后在VMWarePlayer 中 设置 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号