LINUX
linux
zhexiao27
Keep going.
展开
-
Centos 安装 docker
Centos 安装 dockerDocker安装Centos 7移除旧版本$ sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \原创 2021-03-16 16:10:06 · 168 阅读 · 0 评论 -
Centos7 包安装Mysql 5.7
下载Mysql安装包$ wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.31-linux-glibc2.12-x86_64.tar.gz删除系统自带的 mariadb$ rpm -qa|grep mariadb$ sudo rpm -e --nodeps mariadb-libs-5.5.68-1.el7.x86_64创建Mysql用户组$ cat /etc/group |grep mysql$ sudo g.原创 2021-03-15 20:01:33 · 85 阅读 · 3 评论 -
Centos7修改yum镜像源
sudo mv /etc/yum.repos.d/centos.repo /etc/yum.repos.d/centos.repo.baksudo wget -O /etc/yum.repos.d/centos.repo http://mirrors.aliyun.com/repo/Centos-7.reposudo yum clean allsudo yum makecachesudo yum -y update原创 2021-03-15 16:39:27 · 302 阅读 · 0 评论 -
Docker 部署 Springboot 项目
Docker 部署 Springboot 项目下载docker$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -$ sudo apt-key fingerprint 0EBFCD88$ s原创 2020-09-03 16:54:30 · 123 阅读 · 0 评论 -
Nginx全局变量
nginx重写中的用到的变量:$arg_PARAMETER #这个变量包含GET请求中,如果有变量PARAMETER时的值。$args #这个变量等于请求行中(GET请求)的参数,例如foo=123&bar=blahblah;$binary_remote_addr #二进制的客户地址。$body_bytes_sent #响应时送出的body字节数数量。即使连接中断,原创 2013-03-27 11:55:06 · 720 阅读 · 0 评论 -
Ubuntu下网络连接图标丢失后获得方法
sudo service network-manager stopsudo rm /var/lib/NetworkManager/NetworkManager.statesudo service network-manager startsudo gedit /etc/NetworkManager/nm-system-settings.conf把false改成trues原创 2013-03-27 00:28:50 · 756 阅读 · 0 评论 -
ubuntu下SVN服务器安装配置和钩子
一、SVN安装1.安装包1.$ sudo apt-get install subversion2.创建项目目录$ sudo mkdir /home/xiaozhe/svn$ cd /home/xiaozhe/svn/$ sudo mkdir mypro3.创建svn文件仓库$ sudo svnadmin create /home/原创 2013-03-27 00:48:32 · 1819 阅读 · 0 评论 -
U盘安装ubuntu后 设置开机启动项
使用U盘进入Ubuntu的试用系统,打开终端。首先你需要知道自己的ubuntu系统到底装到啦哪个分区里了假设为已经知道我把ubuntu系统安装到了 /dev/sda7 里面,$ sudo mount /dev/sda7 /mnt $ sudo grub-install --boot-directory=/mnt/boot /dev/sda 如果你不知道你的/boot安装到哪里了,就可以原创 2017-03-28 11:27:23 · 2978 阅读 · 0 评论 -
Nginx的Rewrite规则与实例
Nginx Rewrite 规则相关指令相关指令有if,rewrite,set,return,break等,其中最关键的就是rewrite.一个简单的Nginx Rewrite规则语法如下:rewrite ^/b/(.*)\.html /play.php?video=$1 break;1.break指令默认值:none ;使用环境:server,location,i原创 2013-03-27 10:59:37 · 954 阅读 · 0 评论 -
使用fastcgi后,配置PHP文件
当我们使用的是fastcgi来执行php文件,那PHP的配置文件就不和原来一样存在于PHP中了,而是存在于cgi目录中。例如我的配置文件是在:/etc/php5/cgi/php.ini (Ubuntu系统) sudo vim /etc/php5/cgi/php.ini由于我是使用的Ubuntu的自动安装命令分开安装的原创 2013-03-27 00:45:48 · 690 阅读 · 0 评论 -
nginx出现403 Forbidden解决方法
1)有可能是权限问题?1shell>chmod-R 755 /usr/local/nginx/html2)有可能是没有开启目录显示?12345location / {原创 2013-03-27 00:53:54 · 3375 阅读 · 0 评论 -
Ubuntu下Memcache的安装与基本使用
关于Memcache与memcachedMemcache是项目名,memcached是服务名。让很多初接触的人感觉很是莫名其妙。个人认为正确的应该是用前者用更为正确一点。安装MemcacheMemcache分为两部分,Memcache服务端和客户端。Memcache服务端是作为服务来运行的,所有数据缓存的建立,存储,删除实际上都是在这里完成的。客户端,在这里我们指的是PHP原创 2013-03-27 00:49:09 · 647 阅读 · 0 评论 -
Ubuntu下CoreSeek搜索系统建立指南PHP+MySQL
第一步:安装 安装coreseek请参考:BSD、Linux、Windows系统安装测试说明文档; 安装后,请确保安装测试说明文档中的各项测试都可以通过,以便coreseek做好准备,为你服务! 第二步:配置: 在BSD/Linux安装包的testpack/etc目录下,放置了演示的配置文件; 在Windows安装包的etc目录下,也放置了演示的配置文件原创 2013-03-27 00:37:13 · 582 阅读 · 0 评论 -
Coreseek支持中文utf8全文检索
第一步:操作在source里面Coreseek-3.2.14与4.0.1更新http://www.coreseek.cn/news/12/99/增加sql_query_info_pre指令:#索引数据前,设置正确的字符集sql_query_pre = SET NAMES utf8#查询数据库,获取需要索引的数据sql_q原创 2013-03-27 00:37:47 · 712 阅读 · 0 评论 -
Ubuntu下安装CoreSeek
ubuntu-10.04的安装环境coreseek安装需要预装的软件:shell>apt-get install make gcc g++ automake libtool m4 autoconf mysql-client libmysqlclient15-dev libxml2-dev libexpat1-dev 一、基础安装:(此时尚不支持MySQL,原创 2013-03-27 00:36:35 · 1039 阅读 · 1 评论 -
Ubuntu下Lamp服务器的性能优化
安装Zend Optimizer要求PHP版本为5.2,不支持Ubuntu10.04的PHP5.3,请参照PHP5.2。下载Zend Optimizer。直接贴下载地址,参考版本号改(这是32位的),不然主页要注册才能下http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i3原创 2013-03-27 00:31:45 · 576 阅读 · 0 评论 -
Ubuntu服务器绑定固定IP地址
配置基于IP的虚拟主机IP别名的概念很简单,可以在一块网卡上绑定多个IP地址。在Linux上可以通过ifconfig和route命令添加IP别名。现在我们在eth0上添加两个IP别名192.168.0.111和192.168.0.112:Shell>ifconfig eth0:1 192.168.0.111 broadcast 192.168.0.255 netmask 2原创 2013-03-28 11:18:50 · 2526 阅读 · 0 评论 -
Ubuntu安装LNMP架构FastCgi配合
安装nginx?1sudo apt-get install nginxUbuntu安装之后的文件结构大致为:所有的配置文件都在/etc/nginx下,并且每个虚拟主机已经安排在了/etc/nginx/sites-available下程序文件在/usr/sbin/nginx日志放在了/va原创 2013-03-27 00:53:11 · 770 阅读 · 0 评论 -
执行脚本出现bin/bash: bad interpreter: No such file or directory的解决办法
今天用Filezilla上传一脚本到服务器上,执行时发现如下错误。已经确定脚本本身是没有问题的,执行权限也加了。后GOOGLE之,找到如下解决办法,顺利解决此问题。怀疑是FTP软件在上传过程中自动将脚本当作ASCII文件传输,且换行方式采用的是MS-DOS换行,才会出现问问题。用VIM打开后执行: :set ff=unixbin/bash: b原创 2013-04-13 00:47:09 · 4358 阅读 · 0 评论 -
vagrant + docker + pycharm 建立一套完整的Python开发环境
vagrant服务针对Vagrantfile配置,我的主要配置有这几个:# 系统版本config.vm.box = "ubuntu/xenial64"# 配置IPconfig.vm.network "private_network", ip: "192.168.33.33&am原创 2018-09-18 15:15:42 · 1803 阅读 · 0 评论 -
Ubuntu16 创建用户
新建只能在控制台下登录的用户$ sudo su$ useradd ccnu# 键入新用户密码$ passwd ccnu# 为用户指定命令解释程序$ usermod -s /bin/bash ccnu# 为用户指定用户主目录$ mkdir /home/ccnu$ chown -R ccnu:ccnu /home/ccnu/$ usermod -d /home/ccnu...原创 2018-06-19 17:57:47 · 1964 阅读 · 0 评论 -
Celery 项目架构和使用 systemctl 正式版部署
基本实例项目layouttest/__init__.py /celery_app.py /tasks.py /t1.pycelery_app.py(保存celery应用)from celery import Celeryapp = Celery( 'celery_app', broker='redis://localhost:63...原创 2018-06-21 11:59:40 · 1141 阅读 · 0 评论 -
crontab 的使用
crontab定义 .---------------- 分钟(1 - 59) | .------------- 小时(0 - 23) | | .---------- 日 (1 - 31) | | | .------- 月 (1 - 12) | | | | .---- 星期(0 - 6,0代表星期天) | | | | | * * * * * 执行的命令# 表示每晚的21...原创 2018-06-06 13:57:57 · 299 阅读 · 0 评论 -
本地服务器安装 GITLAB 服务
安装安装依赖> sudo apt-get install -y curl openssh-server ca-certificates安装邮件系统> sudo apt-get install -y postfix安装gitlab> curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh原创 2017-11-15 09:07:20 · 1404 阅读 · 0 评论 -
Nginx 反向代理 + 负载均衡
安装nginx> sudo apt-get update> sudo apt-get install nginx配置安装完成后,配置文件默认路径: /etc/nginx我们在/etc/nginx/nginx.conf中的http模块可以看到:### Virtual Host Configs##include /etc/nginx/conf.d/*.conf;include /etc/n原创 2017-10-24 10:57:24 · 361 阅读 · 0 评论 -
本地服务器安装 GITLAB 服务
安装依赖> sudo apt-get install -y curl openssh-server ca-certificates安装邮件系统> sudo apt-get install -y postfix安装gitlab> curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee原创 2017-10-31 14:37:37 · 519 阅读 · 0 评论 -
Ubuntu 16 安装FTP服务器
安装服务> sudo apt-get update> sudo apt-get install vsftpd创建FTP用户创建用户目录> sudo mkdir /usr/ftpu创建用户 ftpu> sudo useradd -d /home/ftpu -s /bin/bash ftpu设置用户密码> sudo passwd ftpu配置编辑配置文件,添加下面的配置:> sudo vim /etc原创 2017-09-26 15:04:21 · 367 阅读 · 0 评论 -
vagrant 和 virtualbox在linux上的安装和使用
$ sudo apt-get install virtualbox$ sudo apt-get install vagrantEX: Ubuntu 14.04配置与安装 我假设建立一个 VPC 文件夹,里面将放置所有的vagrant虚拟环境$ mkdir ~/VPC建立一个子文件夹,里面将放置第一个虚拟环境$ mkdir ~/VPC/python_1$ cd ~/VPC/python_原创 2017-03-28 11:33:52 · 1659 阅读 · 0 评论 -
Configuring the Apache MPM on Ubuntu
Now that you know where the files are, let's look at how to tell apache to stay within the memory available to your Ubuntu server.The apache MPMPart of the apache web server installation is转载 2013-06-21 04:19:43 · 714 阅读 · 0 评论 -
Ubuntu中Lamp的一些配置
配置Apache文件路径1>apache 的配置文件路径 /etc/apache2/apache2.conf2>apache 网站字符编码配置路径 /etc/apache2/conf.d/charset3>php.ini 路径 /etc/php5/apache2/php.ini4>mysql配置文件路径 /etc/mysql/my.cnf一般不要使用,尤其是新手原创 2013-03-27 00:29:52 · 918 阅读 · 0 评论 -
控制fastcgi的shell命令
# -------------------------------------------------------------------------# Shell to Script to start / stop PHP FastCGI using php-cgi, spawn-fcgi .# ----------------------------------------------原创 2013-03-27 00:45:03 · 1162 阅读 · 0 评论 -
控制Nginx的shell命令
整理了下自己用的脚本。# # Shell to Script to start / stop PHP Nginx.# ------------------------------------------------------# Copyright (c) 2013 for project # This script is licensed under GNU GPL v原创 2013-03-27 00:46:37 · 1457 阅读 · 0 评论 -
Ubuntu下CoreSeek搜索系统建立指南…
第一步:安装 安装coreseek请参考:BSD、Linux、Windows系统安装测试说明文档; 安装后,请确保安装测试说明文档中的各项测试都可以通过,以便coreseek做好准备,为你服务! 第二步:配置: 在BSD/Linux安装包的testpack/etc目录下,放置了演示的配置文件; 在Windows安装包的etc目录下,也放置了演示的配置文件; 如果是mys原创 2013-03-28 21:58:55 · 545 阅读 · 0 评论 -
ubuntu apt-get 安装的程序
安装包下载到 \var\cache\apt\archives 。查看安装的一些路径:dpkg -L 包名这里的包名是你用apt-get安装时的名称,不是文件名原创 2013-03-28 21:58:52 · 572 阅读 · 0 评论 -
我的linux学习10 例行命令
cron:例行任务,工作持续干下去。at:工作执行一次就从linux系统任务分配中取消。首先开启atd服务(使用root权限):/etc/init.d/atd restart设置开机启动:chkconfig --level 35 atd on先找/etc/at.allow,写作这个文件中的用户才能使用at,如果没有这个文件则找/etc/at.deny,写在里面的用户不能使用at,如原创 2013-03-28 21:56:12 · 398 阅读 · 0 评论 -
在Ubuntu或者Debian中安装PCRE库
我需要编译一些应用程序,同时也需要Perl 5兼容正则表达式库(PCRE)。在CentOs下,我可以使用一个叫pcre-devel,但是Debian可就不一样了。我怎样在Debian/Ubuntu Linux下安装pcre-devel呢?Perl-compatible regular expression library. PCRE has its own nativeAPI, bu原创 2013-03-28 21:56:05 · 3198 阅读 · 0 评论 -
ubuntu下LAMP环境安装(最佳的PHP环…
最近新换了Xubuntu,安装配置配PHP环境坡费了些周折,下面将安装过程写下来,希望能给大家以后的安装有所帮助!Linux系统下源代码包方式安装前准备本节的源代码包安装方式,使用的Linux操作系统主要以Xubuntu操作系统系列为主。获取软件包软件名称下载地址httpd-2.2.9.tar.gzhttp://www.apache.org/原创 2013-03-28 21:55:27 · 597 阅读 · 0 评论 -
设置Ubuntu系统和Vim字符集为utf8
设置Ubuntu系统和Vim字符集为utf8Ubuntu编码设置首先我们将ubuntu系统设置为utf8的字符集:假设我们安装中文包:1、安装中文语言包Shell>apt-get install language-pack-zh2、用vim配置语言环境变量Shell>vim /etc/environmentShell>vim /etc/default/locale原创 2013-03-28 21:55:25 · 3331 阅读 · 0 评论 -
Lvs dr服务器脚本配置
Lvs Dr模式的模拟测试dr服务器脚本配置" TITLE="Lvs dr服务器脚本配置" />1.用ifconfig配置IP,Lvs的ip为200.168.10.1, realserver1的ip为200.168.10.2,realserver2的ip为200.168.10.3,虚拟IP 为200.168.10.10。 2.Lvs server配置:Shell>ifconfig原创 2013-03-28 21:55:20 · 549 阅读 · 0 评论 -
我的linux笔记4 文件的压缩与打包
compress[-drc]:一个普通的压缩命令,比较古老了,原来是unix上的。压缩后缀名:*.Z。了解下就好gzip[-cdt#]:用来压缩文件,后缀名为:*.gz。zcat:用来读取压缩文件内容,与cat差不多。bzip2[-cdt#]:用来压缩文件,后缀名为:*.bz,*.bz2,*.tbz,*.tbz2。解压可加参数-d或者bunzip2代替bzip2 -d。bzc原创 2013-03-28 21:54:26 · 596 阅读 · 0 评论