kindquiet素食勤俭敬老孝慈

centos 7 支持ntfs、exfat(fat64)文件系统

FUSE:用户空间文件系统(Filesystem in Userspace),是Linux 中用于挂载某些网络空间,如SSH,到本地文件系统的模块。

rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
ntfs分区读写支持:
yum install fuse-ntfs-3g

exfat(fat64)支持是通过fuse模块的方式支持的
http://download1.rpmfusion.org/free/el/updates/6/SRPMS/repoview/index.html
wget http://download1.rpmfusion.org/free/el/updates/6/SRPMS/fuse-exfat-1.0.1-2.el6.src.rpm
wget http://download1.rpmfusion.org/free/el/updates/6/SRPMS/exfat-utils-1.0.1-2.el6.src.rpm

useradd mockbuild

yum install scons gcc
yum install fuse-devel

rpm -ihv fuse-exfat-1.0.1-2.el6.src.rpm exfat-utils-1.0.1-2.el6.src.rpm
cd /root/rpmbuild/
cd SPECS/
rpmbuild -ba fuse-exfat.spec
rpmbuild -ba exfat-utils.spec
cd ../RPMS/x86_64/
rpm -ihv exfat-utils-1.0.1-2.el7.centos.x86_64.rpm fuse-exfat-1.0.1-2.el7.centos.x86_64.rpm

centos 7 添加第三方yum源

EPEL源

rpm -Uvh http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm

Remi源
rpm -Uvh http://mirrors.hustunique.com/remi/enterprise/remi-release-7.rpm

RPM Fusion源

rpm -Uvh http://download1.rpmfusion.org/free/el/updates/6/x86_64/rpmfusion-free-release-6-1.noarch.rpm

yum install yum-priorities -y

EPEL源
EPEL,即Extra Packages for Enterprise Linux,是由 Fedora 社区创建维护,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。EPEL中含有大量的软件,对官方标准源是一个很好的补充。
“EPEL (Extra Packages for Enterprise Linux ) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL).”
wiki:http://fedoraproject.org/wiki/EPEL
Fedora EPEL 下载:http://mirrors.fedoraproject.org/publiclist/EPEL/
EPEL 下载地址:http://fedoraproject.org/wiki/EPEL

Remi源
Remi源中的软件几乎都是最新稳定版。
Remi下载地址:http://rpms.famillecollet.com/

RPM Fusion源

RPM Fusion provides software that the Fedora Project or Red Hat doesn’t want to ship. That software is provided as precompiled RPMs for all current Fedora versions and Red Hat Enterprise Linux 5 , 6 and 7; you can use the RPM Fusion repositories with tools like yum and PackageKit.

RPM Fusion is a merger of Dribble, Freshrpms, and Livna; our goal is to simplify end-user experience by grouping as much add-on software as possible in a single location.

RepoForge源
RepoForge(前RPMForge)是CentOS系统下的软件仓库,拥有4000多种的软件包,被CentOS社区认为是最安全也是最稳定的一个软件仓库。The RepoForge project maintains RPM packages for Red Hat Enterprise Linux (RHEL), CentOS Linux. It provides a set of repositories compatible with various RHEL-derived distributions.

http://repoforge.org/use/

rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

centos 6 参考http://veryi.com/w/706.html

WordPress 加载 fonts.googleapis.com慢解决办法

如何解决WordPress一直加载”fonts.googleapis.com”.WordPress博客主题中引用了google字体库(fonts.googleapis.com)中的字体,导致网站打开速度超级慢,在国内使用google提供的网络服务都比较慢,建议最好不要使用。

第一步,新建google-font.css 放在\wp-includes\css目录中(附该css文件的内容如下):
cd wp-includes/
vim google-font.css
@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 300;
src: local(‘Open Sans Light’), local(‘OpenSans-Light’), url(../fonts/google/DXI1ORHCpsQm3Vp6mXoaTRa1RVmPjeKy21_GQJaLlJI.woff) format(‘woff’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 400;
src: local(‘Open Sans’), local(‘OpenSans’), url(../fonts/google/u-WUoqrET9fUeobQW7jkRT8E0i7KZn-EPnyo3HZu7kw.woff) format(‘woff’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 600;
src: local(‘Open Sans Semibold’), local(‘OpenSans-Semibold’), url(../fonts/google/MTP_ySUJH_bn48VBG8sNSha1RVmPjeKy21_GQJaLlJI.woff) format(‘woff’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: italic;
font-weight: 300;
src: local(‘Open Sans Light Italic’), local(‘OpenSansLight-Italic’), url(../fonts/google/PRmiXeptR36kaC0GEAetxrsuoFAk0leveMLeqYtnfAY.woff) format(‘woff’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: italic;
font-weight: 400;
src: local(‘Open Sans Italic’), local(‘OpenSans-Italic’), url(../fonts/google/xjAJXh38I15wypJXxuGMBtIh4imgI8P11RFo6YPCPC0.woff) format(‘woff’);
}
@font-face {
font-family: ‘Open Sans’;
font-style: italic;
font-weight: 600;
src: local(‘Open Sans Semibold Italic’), local(‘OpenSans-SemiboldItalic’), url(../fonts/google/PRmiXeptR36kaC0GEAetxmWeb5PoA5ztb49yLyUzH1A.woff) format(‘woff’);
}

第二步,修改 \wp-includes\script-loader.php 文件,找到:
vim script-loader.php

$open_sans_font_url = “//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600subset=$subsets”;

替换成:

$open_sans_font_url = “/wp-includes/css/google-font.css”;

Blue Grace主题不须以下修改。
第三步,在WordPress模板文件中找到functions.php,使用”//“注释掉引用google字体库部分即可。这里根据每个模板的不同而有所差异:
cd ..
cd wp-content/
cd themes/
vim twentyfourteen/functions.php
$font_url = add_query_arg( ‘family’, urlencode( ‘Lato:300,400,700,900,300italic,400italic,700italic’ ), “//fonts.googleapis.com/css” );

在WordPress模板文件中找到functions.php
将本地URL加上并使用”//“注释掉引用google字体库部分即可。
function twentyfourteen_font_url() {
$font_url = ‘//www.amznz.com/wp-content/themes/twentyfourteen/fonts/fonts.css’;
/*

  • Translators: If there are characters in your language that are not supported
  • by Lato, translate this to ‘off’. Do not translate into your own language.
    */
    // if ( ‘off’ !== _x( ‘on’, ‘Lato font: on or off’, ‘twentyfourteen’ ) ) {
    // $font_url = add_query_arg( ‘family’, urlencode( ‘Lato:300,400,700,900,300italic,400italic,700italic’ ), “//fonts.googleapis.com/css” );
    // }
    return $font_url;
    }

Discuz! X3.1 升级到 Comsenz Discuz! X3.2 正式版

查看论坛版本是GBK还是utf8,在论坛任意一个页面,查看源代码,找到这行
meta http-equiv=”Content-Type” content=”text/html; charset=utf-8” /
那个carset=后面就可以知道你的论坛是GBK还是utf8 。

下载
wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UTF8.zip
cd temp
unzip ../Discuz_X3.2_SC_UTF8.zip

cd bbs
cd config
vim config_global.php

升级:
1. DiscuzX 程序 1.0, 1.5 2.0 , 2.5Beta, 2.5RC,2.5, 3.0
1)备份数据库
nice -5 tar cf - bbs —exclude=’uc_server/data/tmp’ —exclude=’data/*’ |nice -10 gzip -1 forums-html-date +%F.tar.gz
/usr/local/mysql/bin/mysqldump -uroot -p —opt —single-transaction —flush-logs —master-data=2 forumsdb2 |gzip -1 forumsdb2-date +%F.sql.gz

2)建立文件夹 old,旧程序除了 data , config, uc_client, uc_server 目录以外的程序移动进入 old目录中
mkdir old
mv bbs/* old
mv old/{data,config,uc_client,uc_server} bbs

3) 上传 3.2 程序(压缩包中 upload 目录中的文件), 如上传时候提示覆盖目录,请选择“是”
\cp -af * ../../bbs/
cd ../utility/
cp update.php ../../bbs/install/

4)上传安装包 utility 目录中的 update.php 到论坛 install 目录,删除 install 目录中的index.php
cd ../../bbs/install/
mv index.php /tmp/
pwd
cd ../data/
pwd
ls -al
rm update.lock

执行 http://你的域名/论坛路径/install/update.php

参照提示进行升级即可。升级时间随着数据的大小和服务器性能而变。

升级完毕,进入后台,更新缓存,并测试功能。
升级成功后,old目录中的文件可以删除了。

cd ../install/
rm update.php

复制表情图片:
cp -a ../../../../old/static/image/smiley/heshi/ .

增加表情图片操作步骤:
1.找一组用作表情的图片,放在同一文件中,命名。建议用名件文用英文数字,有汉字很可能会不成功,没有具体测试。
本实例中选择的百度表情。表情文件夹名“heshi”
2.运用FTP工具,将表情文件夹传输到服务器端的“/www/static/image/smiley/”目录下。
3.然后在后台管理页面 界面——表情管理——启用——命名——更新 ,到详情中勾选编号。

参考:
http://www.discuz.net/forum-10-1.html
全新安装:请参照以往版本的安装过程进行,上传程序,并执行 http://你的域名/论坛/install/

补丁包下载和升级
wget http://download.comsenz.com/DiscuzX/3.2/patch/DX32_R20140618_SC_UTF8.zip
cd temp/
unzip ../DX32_R20140618_SC_UTF8.zip
cd ..
tar cfz dz-sst.tgz bbs/{source,static,template}
tar tvfz dz-sst.tgz |less
\cp -a temp/* bbs/
补丁升级完成。

RHEL完全兼容的linux发行版使用yum安装升级及第三方软件库

CentOS默认自带CentOS-Base.repo源,但官方源中去除了很多有版权争议的软件,而且安装的软件也不是最新的稳定版。Fedora自带 的源中也找不到很多多媒体软件,如果需要安装,必需先添加其他源,如RPMFusion和RPMForge等第三方软件库。以下软件库适用于与RHEL完 全兼容的linux发行版,如CentOS,Fedora,Scientific Linux。

RHEL系列使用yum安装升级,删除原有的yum源:

rpm -aq | grep yum|xargs rpm -e --nodeps

使用CentOS 6.5 x86_64的yum源

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm

rpm -ivh yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm

rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

rpm -ihv PackageKit-yum-0.5.8-21.el6.x86_64.rpm PackageKit-yum-plugin-0.5.8-21.el6.x86_64.rpm

清理yum缓存

yum clean all

yum makecache

第三方源

rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

介绍:

EPEL源

EPEL,即Extra Packages for Enterprise Linux,是由 Fedora 社区创建维护,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。EPEL中含有大量的软件,对官方标准源是一个很好的补充。

EPEL (Extra Packages for Enterprise Linux ) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL).

wiki:http://fedoraproject.org/wiki/EPEL

Fedora EPEL 下载:http://mirrors.fedoraproject.org/publiclist/EPEL/

EPEL 下载地址:http://fedoraproject.org/wiki/EPEL

64位,6.0版安装:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

http://dl.fedoraproject.org/pub/epel/

Remi源

Remi源中的软件几乎都是最新稳定版。

Remi下载地址:http://rpms.famillecollet.com/

RPMForge源

RPMForge是CentOS系统下的软件仓库,拥有4000多种的软件包,被CentOS社区认为是最安全也是最稳定的一个软件仓库。

RPMForge官方网站:http://repoforge.org/

RPMForge下载地址:

32位:http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/

64位:http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/

RPMFusion源

如果您现在正在使用Fedora,各种音频软件如MPlayer在标准源中是没有的,一般先安装RPMFusion源,之后就可以放便地yum install各种需要的软件。

CentOS官方说RPMFusion软件库里面的软件稳定性不如rpmforge。

RPMFusion官网:http://rpmfusion.org/

RHEL 6/CentOS 6

su -c 'rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/6/i386/rpmfusion-free-release-6-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/6/i386/rpmfusion-nonfree-release-6-0.1.noarch.rpm'

其他版本请详见:

http://rpmfusion.org/Configuration

如何使用各种源

以上源对CentOS等系统完全兼容,但各软件库之间并不能保证完全兼容没有冲突。如果您需要使用以上源,您需要安装yum-priorities插件。安装yum-priorities插件后,您可以给各个源设置优先级priority。一般设置官方标准源优先级为1,最高,第三方推荐10

priority=N (N为1到99的正整数,数值越小越优先)

[base], [addons], [updates], [extras] priority=1

[CentOSplus],[contrib]  priority=2

其他第三的软件源为:priority=N (推荐N10)

vim CentOS-Base.repo

[base]

name=CentOS-$releasever - Base

mirrorlist=http://mirrorlist.centos.org/?release=$releaseverarch=$basearchrepo=os

#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

priority=1