RHEL

教你玩转Git-Linux 平台上安装

牧云@^-^@ 提交于 2019-11-29 23:29:12
导读 Git 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。Git 与常用的版本控制工具 CVS, Subversion 等不同,它采用了分布式版本库的方式,不必服务器端软件支持。 在使用Git前我们需要先安装 Git。 Linux 平台上安装 Git 的工作需要调用 curl,zlib,openssl,expat,libiconv 等库的代码,所以需要先安装这些依赖工具。 在有 yum 的系统上(比如 Fedora)或者有 apt-get 的系统上(比如 Debian 体系),可以用下面的 命令 安装: 各 Linux 系统可以使用其安装包管理工具(apt-get、yum 等)进行安装: Debian/Ubuntu Debian/Ubuntu Git 安装 命令 为: $ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \ libz-dev libssl-dev $ apt-get install git $ git --version git version 1.8.1.2 Centos /RedHat 如果你使用的系统是 Centos/RedHat 安装命令为: $ yum

Apache 2.4.x manual build and install on RHEL 6.4

别等时光非礼了梦想. 提交于 2019-11-29 23:10:20
OS: Red Hat Enterprise Linux Server release 6.4 (Santiago) The current yum installation of apache on this OS is 2.2.15. I require the latest 2.4.x branch so have gone about installing it manually. I have noted the complete procedure I undertook, including unpacking apr and apr-util sources into the apache sources beforehand, but I guess the following is the most important part of the procedure: GATHER LATEST APACHE AND APR $ cd ~ $ mkdir apache-src $ cd apache-src $ wget http://apache.insync.za.net//httpd/httpd-2.4.6.tar.gz $ tar xvf httpd-2.4.6.tar.gz $ cd httpd-2.4.6 $ cd srclib $ wget http:

mysql is dead but subsys locked

心已入冬 提交于 2019-11-29 23:06:56
I am using PHP-mysql on Linux (RHEL 5.0) For First Time When I tried to connect to MySQL from my PHP Script using mysqli_connect. It Displayed The Following Error: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'(2) After googling for hour I found solution to this as stated here . When I followed that approach and issued command: service mysqld status as a root user I got : mysql is dead but subsys locked Any one know how to solve this and cause of this error ? Also Restarting Starting And Stopping of MySQL is Giving Output as: FAILED But PHP is working fine. I've

【0911】linux软件包安装和卸载

廉价感情. 提交于 2019-11-29 20:54:01
【0911】linux软件包安装和卸载 一、安装软件包的三种方法 1、rpm工具:与win中的exe安装包类似,红帽子公司包管理系统 2、yum工具:属于一种用python开发的工具,支持自动的安装依赖的包 3、源码包:需要使用编译器把源码包编译成可使用的包 二、rpm包介绍及工具用法 1、rpm包介绍 2、rpm工具用法 (1)安装包:rpm -ivh rpm包文件 (2)升级包:rpm -Uvh rpm包文件 (3)卸载包:rpm -e 包名 (4)查询安装的包:rpm -qa (5)查询指定包是否安装:rpm -q 包名 (6)查询指定包信息:rpm -qi 包名 (7)列出包安装的文件:rpm -ql 包名 (8)查询一个文件是由哪个包安装的:rpm -qf 文件绝对路劲 (9)反引号查询命令对应的安装包 三、yum工具用法 1、列出可用rpm包:yum list 2、搜索包:yum search vim 3、安装包:yum install【-y】包名 4、可用组全部列出:yum grouplist (LANG=en 中文转换为英文) 5、卸载包:yum remove【-y】会将依赖的包也一起卸载掉 6、升级包:yum update【-y】不加包名默认系统内的所有包都升级 7、搜索命令由哪一个包能够安装到它: 四、yum搭建本地仓库 有时候yum不能用,是因为没有联网

Linux-Linux常用命令

倾然丶 夕夏残阳落幕 提交于 2019-11-29 18:17:40
su - root 和su root的区别 输入:su - root(或者其他用户名)这里加了"-"后表示也切换的当前的环境变量到新用户的环境变量。 su root(或者其他用户名)表示不切换环境变量到当前用户下。 移动文件夹或文件到指定目录和文件夹重命名 mv 旧文件夹名 新文件夹名 删除文件实例,将会-f强制删除/var/log/httpd/access.log这个文件 rm -f /var/log/httpd/access.log 删除文件夹实例,-r递归删除/var/log/httpd/access目录以及其下所有文件、文件夹 rm -rf /var/log/httpd/access 删除当前目录下的文件 rm -f * 显示当前目录所在位置 pwd 返回到根目录 cd / 返回到上一目录 cd .. 重启 reboot 清除屏幕 clear-linux cls-windows vim 命令中如何删除当前行 Shift + d vim 命令下删除文件中所有内容,只需要在非插入模式下输入".,$d" .,$d vim 命令进入recording状态,如何退出vim 先esc,然后q就可以退出 创建一个test文件夹 mkdir test 修改文件或文件夹权限 chmod 777 /package/ 备份配置文件 cp -f redis.conf redis.conf.bak

Centos7 安装zabbix-agent

↘锁芯ラ 提交于 2019-11-29 17:41:42
rpm -i https://repo.zabbix.com/zabbix/4.2/rhel/6/x86_64/zabbix-release-4.2-2.el6.noarch.rpm 可以到https://repo.zabbix.com/zabbix找到对应的版本 yum install zabbix-agent -y 出现Error: Package: zabbix-agent-4.2.6-1.el6.x86_64 (zabbix) Requires: libpcre.so.0()(64bit)的错误 找到vi /etc/yum.repos.d/zabbix.repo将里面的rhel/6改成rhel/7,保存 yum install zabbix-agent -y 修改配置文件 vi /etc/zabbix/zabbix_agentd.conf Server=127.0.0.1 #Server端的IP地址。 ServerActive=127.0.0.1 # zabbix server 端口10051可以默认。 Hostname=ZabbixServer #必须与zabbix server端创建主机时候输入的zabbix agent端的host name一致。 启动 systemctl enable zabbix-agent.service 开机自启动 systemctl

使用 yum-cron 自动更新 Linux系统

不打扰是莪最后的温柔 提交于 2019-11-29 17:10:00
我知道如何使用 yum 命令行 更新系统,但是我想用 cron 任务自动更新软件包。该如何配置才能使得 yum 使用 cron 自动更新系统补丁或更新呢? 首先需要安装 yum-cron 软件包。该软件包提供以 cron 命令运行 yum 更新所需的文件。如果你想要每晚通过 cron 自动更新可以安装这个软件包。 CentOS /RHEL 6.x/7.x 上安装 yum cron 输入以下 [yum 命令][3]: $ sudo yum install yum-cron 使用 CentOS/RHEL 7.x 上的 systemctl 启动服务: $ sudo systemctl enable yum-cron.service $ sudo systemctl start yum-cron.service $ sudo systemctl status yum-cron.service 在 CentOS/RHEL 6.x 系统中,运行: $ sudo chkconfig yum-cron on $ sudo service yum-cron start yum-cron 是 yum 的一个替代方式。使得 cron 调用 yum 变得非常方便。该软件提供了元数据更新、更新检查、下载和安装等功能。yum-cron 的各种功能可以使用配置文件配置,而不是输入一堆复杂的命令行参数。 配置

RedHat7&CentOS7 忘记用户密码后强行修改

六月ゝ 毕业季﹏ 提交于 2019-11-29 17:02:17
进入互动式命令环境 开机出现 grub boot loader 开机选项菜单时,立即点击键盘任意鍵, boot loader 会暂停。 按下 e ,编辑选项菜单。 移动上下鍵至 linux16 核心命令行: linux16 /vmlinuz-3.10.0-123.el7.x86_64 root=UUID=449d53d1-84c2-40c0-b05e-d1900591d71b ro rd.lvm.lv=vg_kvm7usb/swap crashkernel=auto vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rd.lvm.lv=vg_kvm7usb/root rhgb quiet LANG=en_US.UTF-8 rd.break 在核心命令行最后追加 rd.break 。 再按下Ctrl+X 重新以这个设定开机。 修改密码过程 开机后的互动式命令环境,并不是正常开机的系统,正常开机系统挂载在 /sysboot 且挂载成只读,必须重新挂载成可写入,才能修改密码,步骤如下: 重新挂载 /sysroot 成可读可写,并切换到 /sysroot 。 switch_root:/# mount –o remount,rw /sysroot switch_root:/# chroot /sysroot

RHEL + PHP : writing files outside /var/www/html?

旧巷老猫 提交于 2019-11-29 11:58:12
I'm trying to open a file for read/write. I've been developing on Ubuntu, and have had no problems whatsoever. Now it's time to deploy to the RHEL server, and I discover there seems to be some kind of restriction on the location of a file to be written. On RHEL, I can't open the file unless it's under /var/www/html. I can't figure out how to allow other locations. I need to manipulate files on a different volume, for disk space management reasons. The following is the bit of code that works fine on Ubuntu no matter what, but breaks on RHEL if the file is outside the web root: $repometa = fopen

Check RPM dependencies

陌路散爱 提交于 2019-11-29 11:33:08
问题 When you are installing a programming using .deb packages on Ubuntu, you can check dependencies of package using Ubuntu Packages Search. For example I can see dependencies of Wireshark from here. As you can see, dependencies marked by red bullet. If you know all packages your program depends them, you can download them and installing dpkg . Is there any alternative web site for RPM packages? Specially for RHEL? I know that I can get these packages's name by other methods such as when