
Linux
文章平均质量分 57
跳动的咸鱼
程序猿
展开
-
Linux centos7防火墙配置
CentOS7默认的防火墙不是iptables,而是firewalle。1、禁用/停止自带的firewalld服务#停止firewalld服务systemctl stop firewalld#禁用firewalld服务systemctl mask firewalld systemctl stop firewalld.service #停止firewallsyst原创 2017-03-13 11:41:42 · 358 阅读 · 0 评论 -
Linux下的mysql主从配置
主服务器:192.168.110.129从服务器:192.168.110.130 注:主从服务器同步的数据库类型、引擎保持一致1. 修改主服务器mysql/etc/my.cnf配置[mysqld]#打开日志(主机需要打开)log-bin=mysql-bin#服务器idserver-id=1#给从机同步的库binlog-do-db=数据库名#自动清理1天前的log文件expire_logs_days...原创 2018-05-25 11:16:54 · 403 阅读 · 0 评论 -
linux下mysql备份
利用crontab定时任务执行脚本,定时备份#!/bin/sh#判断是否存在某个文件夹,不存在则创建path="/data/mysql/`date +%Y%m%d`";//判断文件夹是否存在,不存在则创建if [[ ! -d "${path}" ]]; then mkdir -p ${path}fi //获取当前时间:年月日时分秒datetime=`date +...原创 2018-05-25 16:19:47 · 1198 阅读 · 0 评论 -
php编译报错configure: error: C++ preprocessor “/lib/cpp” fails sanity check 以及解决办法
php安装报错,其中一个小细节:checking how to run the C++ preprocessor... /lib/cppconfigure: error: in `/usr/local/src/php-7.0.10':configure: error: C++ preprocessor "/lib/cpp" fails sanity checkSee `config.log'...原创 2018-05-26 10:19:57 · 3942 阅读 · 0 评论 -
win7宿主机访问linux 虚拟机的tomcat、nginx
首先强调下,主机与VMware搭建的虚拟机之间的以NAT 方式通信。粗略描述成功访问服务步骤:1、确保你的虚拟机里已经开启tomcat 或者nginx 服务;2、在虚拟机里添加端口转发配置,在vmware 菜单栏 编辑->虚拟网络编辑器... 弹出类似下图:点击 ”添加...“ 添加你想要通过主机的哪个端口转发到虚拟机上的哪个服务端口,如图:点击确定,基本搞定。如果本地访问不上 你...转载 2018-05-24 16:48:21 · 1707 阅读 · 0 评论 -
linux swoole 创建脚本开机启动
常规的swoole服务,每次linux重启之后,就得手动开启,比较麻烦,所以更换成linux开机自启的方式。在/etc/init.d目录下创建start_websocket文件vi start_websocket#!/bin/sh# chkconfig: 23456 90 10 # description: websocket startcd xxx #进入程序目录nohup php i...原创 2018-06-07 18:31:48 · 3386 阅读 · 1 评论 -
Linux下添加自定义脚本到开机自启动
写一个脚本,名字为:autostart.sh,放在/etc/init.d/目录下,赋予权限chmod +x /etc/init.d/autostart.sh代码如下#!/bin/sh#chkconfig:2345 90 20 #description:Autostart server daemon#shell脚本主体自定义#....... start ....#.........转载 2018-06-07 18:56:04 · 1374 阅读 · 0 评论 -
linux 安装vsftpd
通过yum安装vsftpdyum install -y vsftpd修改vsftpd的配置文件vi /etc/vsftpd/vsftpd.conf修改配置文件如下:1.不允许匿名访问anonymous_enable=NO2.允许使用本地帐户进行FTP用户登录验证local_enable=YES3.使用户不能离开主目录当chroot_list_enable=YES,chroot_local_user...原创 2018-06-01 15:51:40 · 545 阅读 · 0 评论 -
xunsearch(讯搜)部署安装
(1)下载.源码包 cd /usr/local/srcwget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2 (2)解压源码包 tar -jxvf xunsearch-full-latest.tar.bz2 注意:如果压缩包解压出错,则执行:yum -y install bzip2 (3)安...原创 2018-09-18 10:59:59 · 12752 阅读 · 0 评论 -
linux-php-redis安装
安装下载,解压,编译:①wget http://download.redis.io/releases/redis-4.0.9.tar.gz②tar xzf redis-4.0.9.tar.gz③cd redis-4.0.9④make 编译(安装redis时遇到zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录则执行:m...原创 2018-05-07 10:51:17 · 248 阅读 · 0 评论 -
php-swoole安装配置
1. 下载源码cd /usr/local/srcgit clone https://gitee.com/swoole/swoole.git cd swoole使用phpize执行生成configure等文件(find / -name phpize进行查找) 2. 编译安装①./configure --with-php-config=/usr/bin/php-config②make③make ins...原创 2018-05-05 18:35:38 · 650 阅读 · 0 评论 -
lamp环境搭建
Linux-apache安装1.安装yum -y install httpd2.开启apache服务systemctl start httpd.service3.设置apache服务开机启动systemctl enable httpd.service Linux-php 安装更新安装源rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-releas...原创 2018-05-04 16:09:59 · 181 阅读 · 0 评论 -
Linux git服务器
1.yum安装Git服务器[root@git ~]# cd src/[root@git src]# wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm[root@git src]# rpm -ivh epel-release-5-4.noarch.rpmPreparing...原创 2017-03-13 12:00:02 · 277 阅读 · 0 评论 -
Linux centos7一键安装lamp
phpStudy for Linux (lnmp+lamp一键安装包)phpStudy Linux版&Win版同步上线 支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6phpStudy for Linux 支持Apache/Nginx/Tengine/Lighttpd,支持php5.2/5.3/5.4/5.5切换 已经在centos-6.5,de转载 2017-03-13 12:15:05 · 7432 阅读 · 1 评论 -
Linux Apache多站点配置
1.环境搭建(参考本站的配置文章)2.编写配置文件cd /etc/httpd/confvi httpd.conf在httpd.conf的文件末尾加上Include /etc/httpd/conf/vhost.conf同时在 /etc/httpd/conf/conf目录下,vi vhost.conf 内容如下:NameVirtualHost *:80原创 2017-03-30 10:59:07 · 2668 阅读 · 0 评论 -
Linux crontab定时任务
crontab -e 编写任务crontab -l 查看定时执行PHP文件(1分钟执行一次)*/1 * * * * php /var/www/html/666.php定时执行sh文件(1分钟执行一次)*/1 * * * * /bin/sh /var/www/html/test.shCrontab命令的书写格式原创 2017-04-27 15:33:27 · 814 阅读 · 0 评论 -
Linux 接口并发压力测试
webbench安装:wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz(wget http://www.ha97.com/code/webbench-1.5.tar.gz) tar zxvf webbench-1.5.tar.gzmakesudo make install 执行:原创 2017-12-21 14:47:59 · 7224 阅读 · 0 评论 -
centos7下yum安装ffmpeg
安装EPEL Release,因为安装需要使用其他的repo源,所以需要EPEL支持 yum install -y epel-release如果出现缺少Code提示,可以:sudo rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7安装完成之后,可以查看是否安装成功yum repolist 安装Nux-Dextop源导入一个Codesudo rpm –i...转载 2018-02-24 16:07:39 · 3017 阅读 · 1 评论 -
lnmp环境搭建
Linux-nginx安装更新安装源:rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm 安装:yum -y install nginx Nginx命令:service nginx start 开启service nginx restart 重启ser...原创 2018-05-04 15:55:42 · 280 阅读 · 0 评论