root

Centos7安装配置Apache(httpd)+php+mysql+phpMyAdmin

被刻印的时光 ゝ 提交于 2020-01-01 00:27:35
一、安装mysql 执行命令: wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm 执行 yum -y install mysql mysql-server mysql-devel,安装成功。再次使用该命令,然后得到以下信息 打开mysql服务 :service mysqld start 进入mysql客户端 mysql -u root -p 回车 密码为空 直接回车登录 选择数据库:use mysql;(记得输分号) 修改root用户密码:使用 update user set password = password ( 'root' ) where user = 'root' ; 但是5.7版本中不存在password字段,所有我们要用以下修改进行重置密码: update user set authentication_string= password ( 'root' ) where user = 'root' ; 执行: flush privileges ; 退出:quit; 重新使用命令 mysql -u root -p 输入你刚才修改的密码(root)显示登录成功

mycat实现读写分离,实现数据库负载均衡

可紊 提交于 2019-12-31 23:22:44
系统存在2个Mariadb 10.3数据库主从集群 数据库 master slave 用户名 密码 mall 192.168.1.100 192.168.1.110 root 123456 member 192.168.1.150 192.168.1.160 root 123456 schema.xml文件如下: <?xml version="1.0"?> <!DOCTYPE mycat:schema SYSTEM "schema.dtd"> <mycat:schema xmlns:mycat="http://io.mycat/"> <schema name="mall" checkSQLschema="false" sqlMaxLimit="100" dataNode="mall_dn" > </schema> <schema name="member" checkSQLschema="false" sqlMaxLimit="100" dataNode="member_dn" > </schema> <dataNode name="mall_dn" dataHost="malldbhost" database="mall" /> <dataNode name="member_dn" dataHost="memberdbhost" database="member" />

pipenv 管理python环境

三世轮回 提交于 2019-12-31 23:18:47
pipenv 安装 pip install pipenv 使用 每个项目应该有一个独立的虚拟环境,我们首先要创建一个项目文件夹,就是我们的工程目录 # 创建工程目录 mkdir demo cd demo # 创建虚拟环境,指定python版本,会生成一个Pipfile文件 pipenv --python 3.7 输出如下, 我默认的python在/root/anaconda3/envs/lx 生成的在/root/.local/share/virtualenvs/pro-KBx7JhzM/bin/python Creating a virtualenv for this project… Pipfile: /root/pro/Pipfile Using /root/anaconda3/envs/lx/bin/python ( 3.7.5 ) to create virtualenv… ⠏ Creating virtual environment .. .Already using interpreter /root/anaconda3/envs/lx/bin/python Using base prefix '/root/anaconda3/envs/lx' New python executable in /root/.local/share/virtualenvs/pro

软件测试常用的Linux命令

◇◆丶佛笑我妖孽 提交于 2019-12-31 22:44:23
linux常用shell命令=命令+选项+参数 find 查找文件/目录 cd (change directory)切换目录 cd #root根目录 cd / #系统根目录 cd ../../ #返回上上一层目录 ls/dir (list)列出目录下文件 ls -a (--all) #列出所有文件 ls -d (--directory) #列出目录 ls -i (--inode) #显示每个文件的inode 号(索引节点号,可以理解为文件的存储地址) ls -l (-long) #较长格式列出 ls -lh (--human-readable)与-l #人性化阅读输出 clear清屏 dirs 显示目录记录、 dirs +n #显示从左边算起第n笔的目录。 dirs -n #退一级目录的路径 dirs -l #显示目录完整的记录。 mv (move)移动或更名现有的文件或目录 mv -b (--backup)+ 目标文件或路径   #移动到目标目录,若覆盖文件,则先备份 mv -f (--force )+ 目标文件或路径 #强制覆盖,没有目标文件时相当于备份 mv -i (--interactive)+ 目标文件或路径  #覆盖前先行询问用户 mv -u (--update)+ 目标文件或路径   #在移动或更改文件名时,若目标文件已存在,且其文件日期比源文件新,则不覆盖目标文件。

linux 守护进程

蓝咒 提交于 2019-12-31 22:29:22
Linux系统在启动的时候就已经启动了很多的进程信息。 root@ubuntu:/# ps -ef (系统启动就有了,相当于windows的服务) UID PID PPID C STIME TTY TIME CMD root 1 0 0 04:27 ? 00:00:01 /sbin/init auto noprompt root 4 2 0 04:27 ? 00:00:00 [kworker/0:0H] root 6 2 0 04:27 ? 00:00:00 [mm_percpu_wq] root 7 2 0 04:27 ? 00:00:00 [ksoftirqd/0] root 8 2 0 04:27 ? 00:00:00 [rcu_sched] 守护进程是后台运行的,随着操作系统的启动而启动。相当于windows的服务。 守护进程分为2大类:1.系统级守护进程(硬件管理级的,登陆级的)。2.网络级的守护进程(蓝牙,拨号,web服务器,应用服务器,ftp服务器,邮件服务器,)。 (ps是查看进程信息) root@ubuntu:/# ps -ef | grep init root 1 0 0 04:27 ? 00:00:01 /sbin/init auto noprompt (init进程) root 5177 5136 0 05:12 pts/2 00:00:00 grep -

adb pull -> device not found

左心房为你撑大大i 提交于 2019-12-31 19:21:15
问题 I have a rooted phone and running adb in root mode. I used adb shell to successfully access the phone. I can browse directorys, even those who require root. When i try to use: adb pull /data/data/my.app.path/databases/mydatabase.db /home/admin/Desktop/ I get the following error: error: device not found The adb shell stays connected and i can go on browsing the sdcard. Can anyone tell me where this error comes from and how i can fix it to pull the file? 回答1: Stay out of shell during adb pull .

adb pull -> device not found

≯℡__Kan透↙ 提交于 2019-12-31 19:21:03
问题 I have a rooted phone and running adb in root mode. I used adb shell to successfully access the phone. I can browse directorys, even those who require root. When i try to use: adb pull /data/data/my.app.path/databases/mydatabase.db /home/admin/Desktop/ I get the following error: error: device not found The adb shell stays connected and i can go on browsing the sdcard. Can anyone tell me where this error comes from and how i can fix it to pull the file? 回答1: Stay out of shell during adb pull .

Genymotion: Edit /system/etc/hosts file

浪子不回头ぞ 提交于 2019-12-31 10:38:07
问题 I am currently trying hard to modify my Genymotion Android emulator's hosts file. The well-known way of remounting, pulling and pushing does not seem to work at all when using Genymotion, as the filesystem is always read-only and remounting is denied. Earlier I recognized that Genymotion VMs are already shipped with superuser, so I opened the shell and su'd, but the problem is the same: the filesystem is read-only. Does anyone have an idea how to change that file in a Genymotion VM? Thanks

How to set the DOCUMENT_ROOT and site root in my local PHP dev setup?

一个人想着一个人 提交于 2019-12-31 08:13:53
问题 I'm doing a job for a guy with a site online. It's an alien site to me, and I'm slowly working through the strange code. I have MAMP locally and my http://localhost/ has many client folders coming off from that. Inside this code there is a lot of $_SERVER['document_root'] commands and references like which are just getting lost on my local PHP dev area. How can I easily set the document_root reference to what it should be (just locally though, don't really want to mess with the site files, as

安装nginx

梦想与她 提交于 2019-12-31 00:57:42
/*--> */ /*--> */ 1 、下载需要安装的源码安装包 wget http://nginx.org/download/nginx-1.13.0.tar.gz wget https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz wget wget http://zlib.net/zlib-1.2.11.tar.gz wget http://www.openssl.org/source/openssl-fips-2.0.10.tar.gz 2 、源码安装 需要安装 C++ 编译环境 yum install gcc-c++ tar -xvf nginx-1.13.0.tar.gz tar -xvf openssl-fips-2.0.10.tar.gz tar -xvf pcre-8.40.tar.gz tar -xvf zlib-1.2.11.tar.gz openssl 的安装: cd 文件目录; sudo ./config && make && make install 安装的时候报错: /*--> */ /*--> */ Permission denied ;可能是 sudo 获取的权限不足吧 切换到 root 用户进行安装即可 whereis openssl 简单查看一下文件目录 openssl: /usr/bin/openssl