linux
橙橙同学
这个作者很懒,什么都没留下…
展开
-
centos学习:iptables学习
iptables 是一个软件启动指令:service iptables start 重启指令:service iptables restart 关闭指令:service iptables stop [root@localhost init.d]# which iptables /sbin/iptablesiptables 配置文件 /etc/init.d# config: /etc/sy原创 2017-06-29 15:24:26 · 274 阅读 · 0 评论 -
记一次Nginx反向代理负载均衡配置
环境:centos6.5一、编辑安装nginx http://nginx.org/en/download.html 使用Stable version 稳定版本./configure –prefix=/usr/local/nginx vim nginx.conf 主要修改这几个地方user daichen; 让子进程都是自定义用户 不能root worker_processes原创 2017-11-29 21:16:54 · 196 阅读 · 0 评论 -
centos学习:手动编译apache2.4.26
一、下载需要的包apache24 http://httpd.apache.org/download.cgi#apache24APR && APR util Unix Source: apr-1.6.2.tar.gz [PGP] [MD5] Unix Source: apr-util-1.6.0.tar.gz [PGP] [MD5] http://apr.apache.org/downloa原创 2017-06-30 18:08:33 · 424 阅读 · 0 评论 -
把php卸载干净~
想把PHP卸载干净,直接用yum的remove命令是不行的,需要查看有多少rpm包,然后按照依赖顺序逐一卸载。 1.首先查看机器上安装的所有php相关的rpm包 [root@localhost nginx]# rpm -qa | grep php php-cli-5.3.3-22.el6.x86_64 php-pdo-5.3.3-22.el6.x86_64 php-gd-5.3.3-22.e原创 2017-09-15 16:46:44 · 3828 阅读 · 1 评论 -
linux 编译php扩展 openssl
首先 进入php 源码目录 ext 找到openssl的源码文件然后使用 /usr/local/php/bin/phpize 处理接着 ./configure make make install 编译完成以后 系统会显示一个路径 /usr/local/php/lib/php/extensions/no-debug-zts-20131226/openssl.so 类似这种~ 编译成功怎原创 2017-08-19 16:05:05 · 420 阅读 · 0 评论 -
centos学习:编译安装PHP
1、选择版本 下载地址 http://php.net/downloads.php 本节课我们使用5.6.x系列。大家也可以使用PHP7。目前本课程不使用这个版本2、同样是使用./configure 使用最简单的方式编译安装 ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/myapache/bin/apxs PHP并不是完全独原创 2017-06-30 15:52:33 · 299 阅读 · 0 评论 -
centos学习:模拟软件升级之下载命令和sed文件读取指定行
涉及命令: wget 下载远程文件 ! -f 文件不存在 sed -n '1p' conf.txt>licence 读取文件中的第一行 并输出到licence rm -f cong.txtRAR_FILE="http://www.jtthink.com/test/d.rar" CONF_FILE="http://www.jtthink.com/test/conf.txt" ZIP_FILE原创 2017-06-22 15:38:11 · 273 阅读 · 0 评论 -
centos学习:用shell写一个日志记录功能~
vim init.sh#定义变量 类似于临时环境变量 ERR_LOGFILE="error.log" #获取当前时间 注意 这个符号可以赋值 `` CUR_TIME=`date +'%Y-%m-%d %H-%M-%S'` #-f 判断文件存在 if [ -f $ERR_LOGFILE ] then // >> 追加写入 >直接写入 覆盖原创 2017-06-22 15:07:55 · 3305 阅读 · 0 评论 -
centos学习:shell开始 批处理?777权限? rwx怎么控制
[root@localhost shell]# ls -l total 16 -rw-r--r--. 1 root root 5 Jun 22 06:04 aaa -rwxr-xr-x. 1 root root 6464 Jun 22 06:01 test -rw-r--r--. 1 root root 68 Jun 22 06:00 test.c 代表普通文件 d 代表目录 一共十位,原创 2017-06-22 13:33:16 · 1048 阅读 · 0 评论 -
centos学习:什么是fgetc() fgets() cat more是怎么来的?
fgetc 读一个字符 指针后移一位 直到读取到 EOF 停止fgets 读取一行 指针向下移动一位 直到feof(FILE *fp)来判断是否读完char chs[定义一个长度] fgets(chs,一次读取多少字节,fp) vim god_more.c#include <stdio.h> #include <stdlib.h> int main(int argc,char *argv[])原创 2017-06-22 12:47:17 · 167 阅读 · 0 评论 -
centos学习:什么是fgetc() fgets() cat more是怎么来的?
fgetc 读一个字符 指针后移一位 直到读取到 EOF 停止fgets 读取一行 指针向下移动一位 直到feof(FILE *fp)来判断是否读完char chs[定义一个长度] fgets(chs,一次读取多少字节,fp) vim god_more.c#include <stdio.h> #include <stdlib.h> int main(int argc,char *argv[])原创 2017-06-22 12:43:45 · 291 阅读 · 0 评论 -
centos学习:动态链接库 .so "dll"?
一 、生成linux动态链接库gcc -o libme.so age.c -shared二、调用动态链接库[root@localhost study]# gcc -L /root/study -l me daichen.c -o daichen [root@localhost study]# ls age.c age.h daichen daichen.c libme.so makefil原创 2017-06-21 11:43:03 · 1678 阅读 · 0 评论 -
centos学习:理解main函数的两个参数
#include <stdio.h> int main(int argc,char *argv[]){ int i; if(argc == 2){ printf("%s",argv[1]); } /* for(i=0;i<argc;i++){ printf(原创 2017-06-21 23:05:15 · 337 阅读 · 0 评论 -
centos学习:理解环境变量 临时、永久
临时变量操作name=dai echo $name name=$name"chen" //连接 echo $name#include <stdio.h>int main(int argc,char *argv[]){ char *getResult=getenv("PATH"); printf(" PATH is %s\n",getResult); i原创 2017-06-22 01:14:04 · 1436 阅读 · 0 评论 -
centos学习:探一探apache工作模式之prefork worker event
回顾:如果使用的apachectl这个工具来运行,那么它的配置文件在 /usr/local/你的目录/conf/httpd.conf文件里执行 ps -ef | grep httpd 会发现默认出现四个进程。这是为什么?Apache的启动方式有两种,一种是直接执行httpd这个可执行程序(但是不好控制,不推荐) 还有一种是使用apachectl (apache贴心管理小工具) 如果你启动的是原创 2017-06-30 15:39:10 · 248 阅读 · 0 评论 -
centos学习 明白命令行、make编译、指针
一、/bin/ 里的命令行是什么都是写好的文件 只要存放在这个目录 就可以使用命令行访问 类似windows里的system32二、linux下编译cyum install gcc yum install gcc-c++三、编写c程序&makefile 为什么可以用make编译?vim daichen.c include <stdio.h> include 'age.h' //原创 2017-06-21 11:15:20 · 1312 阅读 · 0 评论 -
CRONTAB
不错的资料: http://www.cnblogs.com/peida/archive/2013/01/08/2850483.html 是什么? 安装检查CRONTAB服务 检查工具是否安装 crontab -l 检查服务是否启动 service crond status 安装cron - yum install vixie-cron - yum instal...原创 2018-02-08 18:32:21 · 274 阅读 · 0 评论