随笔分类 -  Linux

Linux操作系统的使用、开发等
摘要:https://www.prestashop.com/en/system-requirements 阅读全文
posted @ 2015-06-08 20:50 samu 阅读(113) 评论(0) 推荐(0)
摘要:github私有仓库是收费的,有些代码不方便托管到外面的git仓库,因此就产生了自己搭建git服务器的需求。好在有广大的开源人士的贡献,有了gitlab这一神器。手动配置较多,直接用集成包:bitnami-gitlab-6.4.3-1-linux-x64-installer.run=========... 阅读全文
posted @ 2015-05-19 11:59 samu 阅读(2729) 评论(0) 推荐(0)
摘要:一、为什么需要大批量添加用户; 我们什么时候才需要大批量添加用户呢?有时我们需要让几十个或更多的用户在主机上完成相同或相似的任务,比如我们想同时添加一堆的ftp 用户,这些ftp用户归属同一组,但不允许他们通过终端或远程登录服务器;有时我们可能为了教学,比如我们有50个学生,并且每个学生在服务器上... 阅读全文
posted @ 2015-01-06 12:18 samu 阅读(315) 评论(0) 推荐(0)
摘要:1. mysql client2. libmysqlclient-devel3. PDO_MYSQL 阅读全文
posted @ 2014-12-20 00:12 samu 阅读(187) 评论(0) 推荐(0)
摘要:原先的字串./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --enable-zip --enable-calendar --with-mysql=/usr/local/mysql --with-... 阅读全文
posted @ 2014-12-19 19:18 samu 阅读(283) 评论(0) 推荐(0)
摘要:对比表,以 apache / httpd 为例任务旧指令新指令使某服务自动启动chkconfig --level 3 httpd onsystemctl enable httpd.service使某服务不自动启动chkconfig --level 3 httpd offsystemctl disab... 阅读全文
posted @ 2014-12-10 13:27 samu 阅读(395) 评论(0) 推荐(0)
摘要:download SDL 1.2.xxx version source code.1) configure2) make & make instlldownload recent ffmpeg source code.1) configure --enable-ffplay2) vi ffplay.... 阅读全文
posted @ 2014-10-28 23:55 samu 阅读(132) 评论(0) 推荐(0)
摘要:一)、bash shell中expr命令下几种的使用expr在linux中是一个功能非常强大的命令。通过学习做一个小小的总结。1、计算字符串的长度。我们可以用awk中的length(s)进行计算。我们也可以用echo中的echo ${#string}进行计算,当然也可以expr中的expr leng... 阅读全文
posted @ 2014-10-19 23:23 samu 阅读(251) 评论(0) 推荐(0)
摘要:1、C++ effective指导原则2、C++标准库3、数据结构算法4、C++设计模式5、shell脚本6、python 阅读全文
posted @ 2014-09-26 22:17 samu
摘要:http://duartes.org/gustavo/blog/post/how-the-kernel-manages-your-memory/After examining thevirtual address layoutof a process, we turn to the kernel a... 阅读全文
posted @ 2014-08-23 15:40 samu 阅读(275) 评论(0) 推荐(0)
摘要:在当期用户的主目录下创建文件.vimrc,打开编辑内容(~/.vimrc):filetype onsyntax on 阅读全文
posted @ 2014-04-21 20:44 samu 阅读(193) 评论(0) 推荐(0)
摘要:一、利用select多路复用I/O的Web服务应用模型/* 可读、可写、异常三种文件描述符集的申明和初始化。*/ fd_set readfds, writefds, exceptionfds; FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptionfds); int max_fd; /* socket配置和监听。*/ sock = socket(...); bind(sock, ...); listen(sock, ...); /* 对socket描述符上发生关心的事件进行注册。*/ FD_SET(&r 阅读全文
posted @ 2014-03-21 20:23 samu 阅读(712) 评论(0) 推荐(0)
摘要:#include #include int main(){ FILE* stream = popen ("sort", "w"); fprintf (stream, "This is a test.\n" ); fprintf (stream, "Hello, world.\n"); fprintf (stream, "My dog has fleas.\n"); fprintf (stream, "This program is great.\n"); fprintf (s 阅读全文
posted @ 2014-03-21 19:55 samu 阅读(215) 评论(0) 推荐(0)
摘要:#include #include #include #include int main(){ int fds[2]; pid_t pid; pipe( fds ); pid = fork(); if( pid == (pid_t)0 ) { close( fds[1] ); dup2(fds[0], STDIN_FILENO ); execlp( "sort", "sort", 0 ); } ... 阅读全文
posted @ 2014-03-21 19:51 samu 阅读(245) 评论(0) 推荐(0)
摘要:#include #include #include int main (){int segment_id;char* shared_memory;struct shmid_ds shmbuffer;int segment_size;const int shared_segment_size = 0x6400;/* Allocate a shared memory segment. */segment_id = shmget (IPC_PRIVATE, shared_segment_size,IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR);/* Attach 阅读全文
posted @ 2014-03-20 20:30 samu 阅读(387) 评论(0) 推荐(0)
摘要:Shared memory permits processes to communicate by simply reading and writing to a specified memory location.Mapped memory is similar to shared memory, except that it is associated with a file in the filesystem.Pipes permit sequential communication from one process to a related process.FIFOs are simi 阅读全文
posted @ 2014-03-20 20:18 samu 阅读(159) 评论(0) 推荐(0)
摘要:#include int thread_flag;pthread_cond_t thread_flag_cv;pthread_mutex_t thread_flag_mutex;void initialize_flag (){/* Initialize the mutex and condition variable.pthread_mutex_init (&thread_flag_mutex, NULL);pthread_cond_init (&thread_flag_cv, NULL);/* Initialize the flag value. */thread_flag 阅读全文
posted @ 2014-03-20 20:10 samu 阅读(193) 评论(0) 推荐(0)
摘要:IPC mechanisms supported by Linux include pipes, named pipes, semaphores, message queues, shared memory, and futexes. 阅读全文
posted @ 2014-02-22 20:35 samu 阅读(132) 评论(0) 推荐(0)
摘要:CentOS 6.5自动内核升级的主要步骤:1)内核文件下载到/usr/src/kernel/目录下;如:2.6.32-431.5.1.el6.x86_64编译后差不多有48M大小;2)生成的引导文件放置在/boot/目录下;3)修改/boot/grub/grup.conf配置文件。uname -a"Linux sam.lilya 2.6.32-431.5.1.el6.x86_64 #1 SMP Wed Feb 12 00:41:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux"cat /etc/redhat-release"C 阅读全文
posted @ 2014-02-21 20:57 samu 阅读(220) 评论(0) 推荐(0)