随笔分类 -  linux

摘要:rewriter配置nginx.conf配置 server { listen 80; server_name 127.0.0.1; index index.php; root /usr/share/nginx/html; #rewrite ^/projects/BookLib... 阅读全文
posted @ 2014-05-13 14:02 忆殇之痕 阅读(232) 评论(0) 推荐(0)
摘要:确实费了不少周折,必须记下来。CentOS服务器上已有相关环境:apache2、php5.3.10需要安装:oracle客户端、pdo_oci扩展、oci8扩展Let's do it !一、 准备文件1) oracle客户端rpm包,http://www.oracle.com/technology/... 阅读全文
posted @ 2014-05-12 17:46 忆殇之痕 阅读(840) 评论(0) 推荐(0)
摘要:安装svn:yum -y install subversion检查版本:svnserve--version创建svn版本库 mkdir -p /opt/svn/repos svnadmin create /opt/svn/repos 阅读全文
posted @ 2014-04-16 16:08 忆殇之痕 阅读(122) 评论(0) 推荐(0)
摘要:vi /etc/sysconfig/iptables重启防火墙service iptables restart关闭防火墙iptables -F 阅读全文
posted @ 2014-04-16 10:52 忆殇之痕 阅读(108) 评论(0) 推荐(0)
摘要:下载地址:wget http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel=release-6.8.noarch.rpm安装rpm包:rpm -ivh 阅读全文
posted @ 2014-04-16 10:40 忆殇之痕 阅读(146) 评论(0) 推荐(0)
摘要:一、开启ssh服务 : service sshd start二、使用root用户更改配置: /etc/ssh/sshd_config 将PermitRootLogin no 改为yes 并且打开三、关闭防火墙:iptables -F上传下载安装lrzsz : yum -y install lrzsz... 阅读全文
posted @ 2014-04-15 15:00 忆殇之痕 阅读(243) 评论(0) 推荐(0)
摘要:开启、停止、重启服务service xxx startservice xxx stopservice xxx restart服务进程:ssh:sshd网卡:network查看可用的yum安装包 yum list | grep xxxgrep -v 忽略内容head -2 test.txt 显示前2行... 阅读全文
posted @ 2014-04-15 10:02 忆殇之痕 阅读(111) 评论(0) 推荐(0)
摘要:sudo !! 以sudo执行上一条命令python -m simpleHTTPServer 以http方式共享文件夹:w !sudo tee %在 以 普 通 用 户 打 开 的 VIM 当 中 保 存 一 个ROOT 用户文件cd -切换回上一个目录cp filename{,.bak}快速备份一个文件echo {a,b,c}{a,b,c}{a,b,c} 排序 阅读全文
posted @ 2014-04-04 15:51 忆殇之痕 阅读(100) 评论(0) 推荐(0)
摘要:curl-v:可以查看发送的头信息等-H:可以发送自定义header头 阅读全文
posted @ 2014-03-17 15:38 忆殇之痕 阅读(91) 评论(0) 推荐(0)
摘要://linux下的内存空间 dev/shm一、查看每个文件有多少行 wc -l二、查询文本文件中的内容 grep xxx xxx.txt三、查看一个文件夹有多大 du -sh ./ 阅读全文
posted @ 2013-10-11 15:47 忆殇之痕 阅读(142) 评论(0) 推荐(0)
摘要:apt-get install openssh-server //安装sshapt-get install vnc-server //安装vncapt-get install mysql-server mysql-client //安装mysqlapt-get install nginx //安装nginx /etc/init.d/nginx start 启动nginxapt-get install php5-fpm //安装php5-fpm安装Php各种扩展apt-get install php5-mysql php5-curl php5-g... 阅读全文
posted @ 2013-03-28 14:45 忆殇之痕 阅读(155) 评论(0) 推荐(0)
摘要:安装reids服务器 apt-get install redis-server测试是否安装成功 redis-cli安装phpredis扩展 #wgethttps://github.com/nicolasff/phpredis/downloads #tar -zxvf nicolasff-phpredis-2.1.3-124-gd4ad907.tar.gz # mv nicolasff-phpredis-d4ad907 php-5.3.8/ext/phpredis/ # cd php-5.3.8/ext/phpredis/ # /usr/local/php/bin/phpize ... 阅读全文
posted @ 2013-03-28 10:36 忆殇之痕 阅读(176) 评论(0) 推荐(0)
摘要:安装之前需要先安装libevent-dev支持 apt-get install libevent-devubuntu下安装beanstalkd sudo apt-get install beanstalked 阅读全文
posted @ 2013-03-27 18:03 忆殇之痕 阅读(249) 评论(0) 推荐(0)
摘要:HTTPSQS安装ulimit -SHn 65535wget http://httpsqs.googlecode.com/files/libevent-2.0.12-stable.tar.gztar zxvf libevent-2.0.12-stable.tar.gzcd libevent-2.0.12-stable/./configure --prefix=/usr/local/libevent-2.0.12-stable/makemake installcd ../wget http://httpsqs.googlecode.com/files/tokyocabinet-1.4.47.ta 阅读全文
posted @ 2013-03-26 13:43 忆殇之痕 阅读(243) 评论(0) 推荐(0)
摘要:一、configure: error: bzlib.h is required解决: 升级安装:apt-get install libbz2-dev 阅读全文
posted @ 2013-03-26 13:36 忆殇之痕 阅读(150) 评论(0) 推荐(0)
摘要:一、创建shell脚本 touch test //shell脚本不需要任何后缀名二、编写shell脚本 #!/bin/sh echo '这是一个sh脚本';三、运行shell脚本 ./test第二种方式为了区分shell脚本 一般采用.sh命名脚本名:test.sh运行脚本 sh test.sh 阅读全文
posted @ 2013-03-19 14:13 忆殇之痕 阅读(215) 评论(0) 推荐(0)
摘要:一、mysql的启动、停止和重启 /etc/init.d/mysql start /etc/init.d/mysql stop /etc/init.d/mysql restart二、进入mysql mysql -u root -p三、mysql基本命令使用//查询所有数据库show databases;//进入数据库use xxx;//查看所有表show tables;//增、删、改、查//暂时略过//查询内容存为文件 into outfileselect * FROM TABLENAME INTO outfile 'TEST.TXT' //将查询的字段存储到另一张表" 阅读全文
posted @ 2013-03-19 11:26 忆殇之痕 阅读(197) 评论(0) 推荐(0)
摘要:一、运行php文件 php5 /var/www/dsa.php二、apache的启动、结束、重启 /etc/init.d/apache2 start /etc/init.d/apache2 stop /etc/init.d/apache2 restart 阅读全文
posted @ 2013-03-19 11:20 忆殇之痕 阅读(131) 评论(0) 推荐(0)
摘要:一、启动与停止 ubuntu下启动、停止与重启cron sudo /etc/init.d/cron start sudo /etc/init.d/cron stop sudo /etc/init.d/cron restart二、查看cron是否在运行 pgrep cron三、crontab命令主要有3个参数-e :编辑用户的crontab。-l :列出用户的crontab的内容。-r :删除用户的crontab的内容。* * * * * 分 时 日 月 年四、完整操作crontab -e* * * * * /var/www/dsa.php >> /var/www/cron.txt 阅读全文
posted @ 2013-03-19 11:05 忆殇之痕 阅读(210) 评论(0) 推荐(0)