GVKun编程网logo

CentOS删除安装的程序(centos删除安装包)

14

本文将带您了解关于CentOS删除安装的程序的新内容,同时我们还将为您解释centos删除安装包的相关知识,另外,我们还将为您提供关于CentOS7需要安装的常用工具,及centos安装fcitx搜狗

本文将带您了解关于CentOS删除安装的程序的新内容,同时我们还将为您解释centos删除安装包的相关知识,另外,我们还将为您提供关于CentOS 7 需要安装的常用工具,及centos安装fcitx 搜狗输入法的坑旅、CentOS 7上安装WordPress详细步骤 centos7忘记 centos7的pxe centos7加、centos RPM安装的挂载、centos – 如何从denyhosts删除IP地址的实用信息。

本文目录一览:

CentOS删除安装的程序(centos删除安装包)

CentOS删除安装的程序(centos删除安装包)

以MysqL举例:

首先查询安装包:

rpm -qa|grep MysqL

查询到的一个结果为:MysqL-community-libs-5.7.13-1.el6.x86_64

yum 删除

yum -y remove MysqL-community-libs-5.7.13-1.el6.x86_64

rpm 删除(仅用 "-e" 判断依赖)

rpm -e MysqL-community-libs-5.7.13-1.el6.x86_64


-------------------------------------- 以下情况,绝大部分情况用不到---------------------------------------


rpm 删除("--nodeps" 不判断依赖直接删除,慎用)

rpm -e --nodeps MysqL-community-libs-5.7.13-1.el6.x86_64

rpm 删除("--noscripts" 卸载之前已经删除了目录或目录不完整,则强制卸载,慎用)

rpm -e --noscripts MysqL-community-libs-5.7.13-1.el6.x86_64

rpm 删除("–allmatches" 系统里一个包被安装两次(由于某些异常引起的)的强制卸载)

rpm -e multi-installed-pkgs –allmatches MysqL-community-libs-5.7.13-1.el6.x86_64

CentOS 7 需要安装的常用工具,及centos安装fcitx 搜狗输入法的坑旅

CentOS 7 需要安装的常用工具,及centos安装fcitx 搜狗输入法的坑旅

https://blog.csdn.net/tham_/article/details/41868831

 

Centos常用设置

1.当最大化时隐藏标题栏

或者使用tweak tool 在字体中将标题栏字体设置为0...建议这个方法.


2.添加epel源  

yum -y --nogpgcheck install http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm

 

3 添加 elrepo 源:
1 导入 key:
wget -c https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm --import RPM-GPG-KEY-elrepo.org
2 添加源:rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

4  更新资源

yum -y install yum-fastestmirror //安装插件fastestmirror,可以让yum管理器自动搜索最快源下载
yum makecache //重建repolist资源缓存
yum update //更新。

5.安装基本工具

gnome2 的 “注册表编辑器” gconf-editor 正在被  dconf-editor 所取代,更多的隐藏设置也可以通过 dconf-editor 进行修改。不过目前您修改 gconf-editor 同样生效。

yum install dconf-editor

yum install gconf-editor

yum install ntfs-3g  读取ntfs硬盘

yum -y install alacarte   自定义应用程序快捷方式

6.安装shell扩展
yum install gnome-tweak-tool

https://extensions.gnome.org/

使用默认火狐进入这个网站。。只有火狐安装了插件Gnome Shell Integration 才能正常访问 会安装到

TaskBar  设置头部图标

Topicons   会把fcitx输入法图标移动到顶部栏上

alt+f2 输入r  重起gnome shell

7.安装rar工具  注意不要下载错版本。这里用的是64位的

wget http://rarlab.com/rar/rarlinux-x64-5.1.1.tar.gz
tar -zxvf rarlinux-x64-5.1.1.tar.gz
cd rar
su root
make
make install

8安装输入法  国内一位兄台的源  https://copr.fedoraproject.org/coprs/mosquito/myrepo/。感谢分享

1 安装源

# wget https://copr.fedoraproject.org/coprs/mosquito/myrepo/repo/epel-7/mosquito-myrepo-epel-7.repo -O /etc/yum.repos.d/mosquito-myrepo-epel-7.repo
2. 安装搜狗输入法
# yum install sogou-pinyin sogou-pinyin-skins
3. 配置fcitx
以登陆用户运行以下命令,关闭ibus键盘监听  这个是普通用户执行。。root不行
# gsettings set org.gnome.settings-daemon.plugins.keyboard active false
切换输入法
# imsettings-switch fcitx
最后,最好重启系统,输入法会自动启动。
4. “美化”
- 输入法图标在底部的通知栏,安装gnome3的 top-icon 扩展,可以使图标移到顶部任务栏;
- 安装 gnome-shell 的 InputMethod Panel 扩展,使用与gnome3风格统一的输入法样式;
- sogou-pinyin-skins 包提供了 58 款皮肤,右击输入法图标,可以选择喜欢的皮肤

9. 安装cinnamon 

yum install cinnamon*

输入法有问题

vi ~/.bashrc

if [ $DESKTOP_SESSION == "cinnamon" ]; then
export GTK_IM_MODULE=xim
fi

搜狗输入法不能自启动的话

sudo rm /etc/xdg/autostart/fcitx-ui-sogou-qimpanel.desktop

cat /home/zhepama/.config/autostart/sogou-qimpanel.desktop
[Desktop Entry]
Type=Application
Exec=sogou-qimpanel
Hidden=false
Nodisplay=false
X-GNOME-Autostart-enabled=true
Name[zh_CN]=sogou-qimpanel
Name=sogou-qimpanel
Comment[zh_CN]=sogou-qimpanel
Comment=sogou-qimpanel

10.关闭selinux

vi /etc/selinux/config

#SELINUX=enforcing #注释掉

#SELINUXTYPE=targeted #注释掉

SELINUX=disabled #增加

:wq! #保存退出

11.完成内核更新后。 再执行。。
vi /etc/grub.d/40_custom

menuentry "win7"{
set root=(hd0,1)
chainloader +1
}

grub2-mkconfig -o /boot/grub2/grub.cfg

12 禁用触摸版  在系统工具==启动应用程序中 添加启动项目

/usr/local/bin/FingerSensingPad.sh off

 
CentOS 7下安装fcitx  搜狗输入法

CentOS 7下安装fcitx输入法的方法如下。

加入EPEL源

EPEL7几乎是CentOS必备的源:

$ wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm
$ sudo rpm -ivh epel-release-7-1.noarch.rpm
$ sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

添加mosquito-myrepo源

mosquito-myrepo是一个私人制作的第三方源,其中包含了fcitx输入法以及基于fcitx的搜狗输入法。

  • 项目地址: https://copr.fedoraproject.org/coprs/mosquito/myrepo/
  • 支持的发行版: Fedora 19/20/21/rawhide 以及RHEL/CentOS 7
$ yum-config-manager --add-repo=https://copr.fedoraproject.org/coprs/mosquito/myrepo/repo/epel-7/mosquito-myrepo-epel-7.repo

安装搜狗输入法 安装

$ yum install sogou-pinyin sogou-pinyin-skins

配置

首先关闭gnome-shell 对键盘的监听,然后切换输入法为fcitx: (启用键盘键盘监听后,依然可以用键盘默认的ibus输入法

$ gsettings set org.gnome.settings-daemon.plugins.keyboard active false
$ imsettings-switch fcitx
 
    
  1. 重载 fcitx,启动搜狗面板 
    $ fcitx -r; fcitx-configtool 
    $ sogou-qimpanel

安装完后,fcitx 及搜狗输入法会出现在右下角的通知栏,这时候需要重启gnome-3桌面 按住”alt+F2" 输入 r ,fcitx状态即可出现在上面的状态栏。

似乎需要重启,或者退出用户重新登陆。

安装其他输入法

搜狗输入法基本够用了,也可以安装其他中文输入法:

$ yum install fcitx-googlepinyin fcitx-cloudpinyin # 谷歌拼音输入法
$ yum install fcitx-rime fcitx-cloudpinyin # 中州韵输入法
$ yum install fcitx-libpinyin fcitx-cloudpinyin # libpinyin输入法
$ yum install fcitx-sunpinyin sunpinyin-data fcitx-cloudpinyin # sunpinyin输入法
清理工作

mosquito-myrepo在不断地支持更多的软件,这也进一步造成该repo中的软件与base、EPEL中的软件存在版本冲突,在该repo的项目主页中建议安装yum的优先级插件yum-plugin-priorities,这在一定程度上会缓解版本冲突问题,但无法从根本上避免。

鉴于多个repo的版本冲突会造成一些麻烦,最好的办法还是在安装完需要的软件之后就禁用该repo,需要的时候再启用。

编辑/etc/yum.repos.d/mosquito-myrepo-epel-7.repo,将其中的enable=1改成enable=0即可。

CentOS 7上安装WordPress详细步骤 centos7忘记 centos7的pxe centos7加

CentOS 7上安装WordPress详细步骤 centos7忘记 centos7的pxe centos7加

一、搭建wordpress服务器环境需求:

php 5.2.4 或者更高版本、MySQL 5.0 或者更高版本。
登录后复制

二、搭建Wordpress平台:
以下以Wordpress3.92版本为例进行说明,如果大家想安装最近版本的话,安装完成后再管理界面可以自动升级安装最新版本。

1、建立一个临时文件夹,下载最新版本的Wordpress3.92,中英文都可以:

mkdir /tmp/wp

cd /tmp/wp

wget http://wordpress.org/latest.zip
登录后复制

2、解压缩到网站根目录:  由于我是使用的LAMP一键安装包安装的LAMP,所以默认网站根目录为/data/www/default,大家在实际安装过程中注意自己的根目录。

unzip -q latest.zip -d /data/www/default/
登录后复制

3、更改wordpree文件夹属主和权限

chown -R apache:apache /data/www/default/wordpresschmod -R 755 /data/www/default/wordpress
登录后复制

4、创建一个可以上传的目录upload,并将属主改为apache

mkdir -p /data/www/default/wordpress/wp-content/uploads

chown -R :apache /data/www/default/wordpress/wp-content/uploads
登录后复制

5、修改配置文件,以便可以访问数据库

cd /data/www/default/wordpress/

cp wp-config-sample.php wp-config.php

vim wp-config.php

修改部分分别为数据库名称、数据库用户名、数据库用户密码,大家根据实际修改:

define(''DB_NAME'', ''wp_database''); define(''DB_USER'', ''root''); define(''DB_PASSWORD'', ''root'');

修改完成后 :wq!
登录后复制

6、浏览器浏览 安装

浏览器输入http://http://127.0.0.1/wordpress/wp-admin/install.php 后就可以进行最后的登陆安装:
输入站点名称,登陆户名,密码,邮箱就可以完成Wordpress的安装。
由于我是本地搭建的,所以是127.0.0.1,如果申请了域名,这里就是域名了。
登录后复制

7、开启支持网站固定链接修改和重定向功能。  编辑主配置文件:

vi /etc/httpd/conf/httpd.conf

AllowOverride None

修改为:

AllowOverride All

然后重启服务:

systemctl restart httpd.service

创建.htaccess文件:

touch /data/www/default/wordpress/.htaccess

编辑.htaccess文件:

vim /data/www/default/wordpress/.htaccess

看是否有以下内容,没有自己添加,有可能网站会自动生成。

<ifmodule>

RewriteEngine On

RewriteBase /wordpress/

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /wordpress/index.php [L]</ifmodule>

修改.htaccess文件权限:

chmod 664 /data/www/default/wordpress/.htaccess

修改为664可以让网站支持自动更新,也可以修改为644。
登录后复制

至此,Wordpress在Centos7上已经完全安装了,可以用它搭建你想要的任意网站了。

 本文转载自:http://www.linuxprobe.com/centos7-install-wordpress-detail-steps/
免费提供最新Linux技术教程书籍,为开源技术爱好者努力做得更多更好:http://www.linuxprobe.com/

以上就介绍了CentOS 7上安装WordPress详细步骤,包括了wordpress,centos 7方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

centos RPM安装的挂载

centos RPM安装的挂载

  1. 链接光盘

wKiom1g3o0iD8BjEAABTfKjSVRw080.png-wh_50

2.mkdir /mnt/cdrom 创建挂载目录
并且挂载mount /dev/cdrom /mnt/cdrom

wKioL1g3o0iRXCMkAAAFktE0CFk418.png-wh_50

3.进入/mnt/cdrom/Packager进行RPM的安装


wKiom1g3o9iAsBy4AAApxXD3CxU320.png-wh_50

centos – 如何从denyhosts删除IP地址

centos – 如何从denyhosts删除IP地址

我正在尝试从我的家用电脑上使用denyhosts,现在它已经阻止了我的ip地址并输入了/etc/hosts.deny.

现在我的ip不是静态的,它每周都会打开,所以我可以在hosts.allow中修复ip.

我尝试从/etc/hosts.deny手动删除该ip,并在5分钟后再次添加该地址.

如何从denyhosts手动删除被阻止的IP地址

CentOS的

您实际上需要停止denyhosts,然后从其他6个文件中删除有问题的条目并重新启动它.
受影响的文件是:

> / var / lib / denyhosts / hosts
> / var / lib / denyhosts / hosts-restricted
> / var / lib / denyhosts / hosts-root
> / var / lib / denyhosts / hosts-valid
> / var / lib / denyhosts / users-hosts
> /etc/hosts.deny

这是我创建的Python脚本,用于执行相同的操作 – 用法是sudo ./unban.py ip-goes-here

#!/usr/bin/python
import re
import sys
import subprocess
from subprocess import call
import tempfile
import logging
import os
import datetime
import re 

#http://daniweb.com/code/snippet216475.html
#http://www.doughellmann.com/PyMOTW/tempfile/
#http://www.daniweb.com/forums/thread73705.html
#http://pbe.lightbird.net/tempfile-module.html
#http://www.palewire.com/posts/2008/04/07/python-recipe-open-multiple-files-search-for-matches count-your-hits-on-the-fly/
#http://docs.python.org/library/logging.html
#http://docs.python.org/library/subprocess.html#module-subprocess
#http://docs.python.org/tutorial/errors.html#handling-exceptions

#You actually need to stop denyhosts and remove the offending entry from 5 other files. '/var/lib/denyhosts/hosts','/var/lib/denyhosts/hosts-restricted','/var/lib/denyhosts/hosts-root','/var/lib/denyhosts/hosts-valid','/var/lib/denyhosts/users-hosts','/etc/hosts.deny'
#Here is a link to a ruby script to do so,http://robotplaysguitar.com/2009/10/30/remove-an-ip-banned-by-denyhosts/
#Or here is a Python script I created to do the same thing -- usage is sudo python ./unban.py ip-goes-here



def returnTime():
  dt = datetime.datetime.Now()
  str(dt)
  return dt.strftime("%Y%m%d_%H:%M:%s")

#########################################
#  Uncomment these below for debugging  #
#########################################
#print sys.argv[1]
#print len(sys.argv)
#########################################  
#  Change these values for logging      #
#########################################
LOG_FILENAME = './unban.log'
logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
logging.debug("---------------" + returnTime() + "----------------------") # initialize debugging

denyhosts=("/etc/init.d/denyhosts")
start="start"
stop="stop"
denyhosts_files=['/var/lib/denyhosts/hosts','/var/lib/denyhosts/users-invalid','/etc/hosts.deny']

if len(sys.argv) <> 2:
  print "Wrong number of args"
  print "Usage: sudo python ./unban.py ip"
else:
  if subprocess.call([denyhosts,stop]) == 0:
    logging.debug("/etc/init.d/denyhosts stopped at:\t" + returnTime())
    print "/etc/init.d/denyhosts stopped"
  else:
    print "error stopping denyhosts..."
    logging.debug("Error stopping /etc/init.d/denyhosts\t" + returnTime())
    sys.exit("bork =(")

  ip = sys.argv[1]

  for f in denyhosts_files:
    tf = tempfile.NamedTemporaryFile(delete=False)
    print "Temp Filename is:" + tf.name + " Real file name is: " + f

    try:
      text = open(f,"r")
      data_list = text.readlines()  
      logging.debug("File: "+ f + " is being worked on.\t"+returnTime())
    except IOError as (errno,strerror):
      print "I/O error({0}): {1}".format(errno,strerror)

    for line in data_list:  
      if re.search(ip,line):
        print line    
        # just do nothing here -- because we are writing all the good IP's to a file!  genius! 
        logging.debug("Deleting ip: " + ip + " because we found a match.\t" + returnTime())
      else:
        tf.write(line)
    ####
    #  Close the temporary file
    ####                 
    try:
      text.close()
      tf.close()
      logging.debug('This is where the text file: ' + tf.name + ' is closed.\t' + returnTime() )
    except OSError:  
      print "OS error({0}): {1}".format(errno,strerror)
    except:
      print "Unexpected error:",sys.exc_info()[0] 

    try:
      os.rename(f,f+"_tmp") 
    except OSError:
      print "OS error({0}): {1}".format(errno,sys.exc_info()[0]
    try:
      os.chmod(f+"_tmp",0644) # this makes the temp file 644
    except OSError:
      print "OS error({0}): {1}".format(errno,sys.exc_info()[0]  
    try:
      os.rename(tf.name,f)  
    except OSError:
      print "OS error({0}): {1}".format(errno,sys.exc_info()[0]
    try:    
      os.chmod(f,0644) # this make the newly edited file 0644
      logging.debug("File: "+ f + " has been renamed. - " + returnTime())
    except OSError:
      print "OS error({0}): {1}".format(errno,sys.exc_info()[0]



###
#  Clean up and restart denyhosts
###  
if subprocess.call([denyhosts,start]) == 0:
  print "/etc/init.d/denyhosts Started"
  logging.debug("/etc/init.d/denyhosts succesfully restarted!\t" + returnTime()) 
else:
  print "There was an error starting /etc/init.d/denyhosts...\t"
  logging.debug("/etc/init.d/denyhosts did not restart successfully \t" + returnTime())

今天的关于CentOS删除安装的程序centos删除安装包的分享已经结束,谢谢您的关注,如果想了解更多关于CentOS 7 需要安装的常用工具,及centos安装fcitx 搜狗输入法的坑旅、CentOS 7上安装WordPress详细步骤 centos7忘记 centos7的pxe centos7加、centos RPM安装的挂载、centos – 如何从denyhosts删除IP地址的相关知识,请在本站进行查询。

本文标签: