CentOS6.2 下安装Vufind 2.2

#安装“最快镜像源”插件,加速下载

yum install yum-plugin-fastestmirror.noarch

#升级centos系统

yum update

#安装软件源

rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/epel-release-6-5.noarch.rpm


#安装Apache
yum install httpd

#安装MySQL5
yum install mysql mysql-server

##要创建MySQL系统的启动键链接启动MySQL服务器
chkconfig –-levels 235 mysqld on

##启动MySQL服务
service mysqld start
##mysql安全设置
/usr/bin/mysql_secure_installation

#PHP安装与配置
yum install php php-devel php-cli php-common php-intl php-ldap php-mysql php-xsl php-gd php-mbstring php-soap php-xml php-xmlrpc php-pdo php-mcrypt


##配置系统在引导时启动Apache
chkconfig --levels 235 httpd on

##启动Apache
/etc/init.d/httpd start

#安装Java 1.6
yum install java-1.6.0-openjdk-devel

#Download & Extract VuFind 2.2
yum install wget
cd /tmp
wget http://downloads.sourceforge.net/vufind/vufind-2.2.tar.gz?use_mirror=osdn -O vufind-2.2.tar.gz

tar xzvf vufind-2.2.tar.gz
mv vufind-2.2 /usr/local/vufind

#Install VuFind 2.2
cd /usr/local/vufind
php install.php


##为Apache授权访问Vufind Code
cd /usr/local/vufind/
chcon -R unconfined_u:object_r:httpd_sys_content_t:s0 *
setsebool -P httpd_can_network_relay=1
setsebool -P httpd_can_sendmail=1

##为Apache授权写权限-产生Cache和基础配置文件
chown -R apache:apache /usr/local/vufind/local/cache
chcon -R unconfined_u:object_r:httpd_sys_rw_content_t:s0 /usr/local/vufind/local/cache
chown -R apache:apache /usr/local/vufind/local/config
chcon -R unconfined_u:object_r:httpd_sys_rw_content_t:s0 /usr/local/vufind/local/config

##Setup VuFind's command line tools
mkdir /usr/local/vufind/local/cache/cli
chmod 777 /usr/local/vufind/local/cache/cli

#Link VuFind to Apache
chcon system_u:object_r:httpd_config_t:s0 /usr/local/vufind/local/httpd-vufind.conf
ln -s /usr/local/vufind/local/httpd-vufind.conf /etc/httpd/conf.d/vufind.conf

#Apache启动失败,因为权限问题,读取/etc/httpd/conf.d/vufind.conf失败。解决办法:The status of selinux should either be Disabled or Permissive。我采用的是将selinux设置为Permissive mode,命令如下:
setenforce 0


#设定环境变量
echo export VUFIND_HOME="/usr/local/vufind"  >> /etc/profile
echo export VUFIND_LOCAL_DIR="/usr/local/vufind/local"  >> /etc/profile

source /etc/profile

#打开防火墙80端口
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
/etc/rc.d/init.d/iptables save
service iptables restart

你可能感兴趣的:(vufind)