首页 >>  正文

centos7.6下载

来源:baiyundou.net   日期:2024-09-24

作者:虹銷-雨霽

前言

       因工作需要,近期一直在研究LimeSurvey的部署安装。作为一个小白,在安装过程中,遇到了不少问题,也查阅了各种教程,无奈网上的各种教程要么涵盖不全,要么版本老旧,对新手不是很友好。本着我为人人,人人为我的分享精神,趁着正式部署的机会,收集了素材,把我的安装过程记录下来,方便以后自己查阅,也为各位同好提供参考。本教程旨在为初学者提供帮助,把我遇到的各种问题予以呈现并给出解决办法,难免啰嗦,希望各位大佬不要见笑。第一次发文,不妥之处也请大家多多指教。

       本文参考了一下文章,对原作者表示感谢。

       http://www.vue5.com/centos/22971.html

       https://www.cnblogs.com/it-tsz/p/13211464.html

       https://www.cnblogs.com/w-j-q/p/14995398.html

LimeSurve简介

       LimeSurvey(前身为PHPSurveyor)是一款在线问卷调查程序,它用PHP语言编写并可以使用MySQL,PostgreSQL或者MSSQL等多种数据库,同时它也是一个开源软件,其最新版本的软件包可以完全免费获取和使用。它集成了调查程序开发、问卷的设计、修改、发布、回收和统计等多项功能,使用它,用户不必了解这些功能的编程细节。 

       LimeSurve官方网站:https://www.limesurvey.org/

LimeSurve部署安装教程 

       本教程基于CentOS 7.6系统,其他版本可做参考。

       本教程假定在一个全新的CentOS系统中进行部署安装,需要安装Mariadb数据库和PHP,如已安装可跳过这两个步骤。

       本教程命令需在“root”账户下运行,如果不是,可使用“su”命令提权,或者在命令前添加“sudo”以获取root权限。

       首先更新系统版本。

yum clean all

yum -y update

    (一)安装Mariadb

       1、安装Mariadb

       通过yum安装mariadb-server,默认依赖安装mariadb,一个是服务端、一个是客户端。

yum install mariadb-server

       出现如下提示时,输入“y”,等待安装完成。

Install  1 Package (+9 Dependent packages)

Total download size: 21 M

Installed size: 110 M

Is this ok [y/d/N]: y

       2、配置Mariadb

       1)安装完成后首先要把MariaDB服务开启,并设置为开机启动。

systemctl start mariadb

systemctl enable mariadb

      出现如下提示时,表示设置成功。

Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to  /usr/lib/systemd/system/mariadb.service.

       2)首次安装需要进行数据库的配置。

mysql_secure_installatio

       3)配置出现的各个选项。

Enter current password for root (enter fornone):      # 输入数据库root密码(注意不是系统root密码),第一次安装还没有设置密码,直接回车即可

Set root password? [Y/n]         # 设置密码,y

New password:       # 输入您的新密码

Re-enter new password:       # 再次输入密码

Remove anonymous users? [Y/n]       # 移除匿名用户, y

Disallow root login remotely? [Y/n]       # 拒绝root远程登录,y

Remove test database and access to it?[Y/n]       # 删除test数据库,y

Reload privilege tables now? [Y/n]       # 重新加载权限表,y

       4)测试是否能够登录成功

mysql -u root -p

Enter password:     # 输入数据库root密码

       出现  MariaDB [(none)]> 就表示已经能够正常登录使用MariaDB数据库了。

Welcome to the MariaDB monitor.  Commands end with ; or g.

Your MariaDB connection id is 8

Server version: 5.5.60-MariaDB MariaDBServer

Copyright (c) 2000, 2018, Oracle, MariaDBCorporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' toclear the current input statement.

MariaDB [(none)]>

       5)登录到数据库服务器后,需要创建一个LimeSurvey安装数据库。

CREATE DATABASE limesurvey_db;        #创建名为limesurvey_db的数据库

GRANT ALL PRIVILEGES on limesurvey_db.* to 'root'@'localhost' identified by 'YourPassword';         # "YourPassword"更改为您的数据库root密码

FLUSH PRIVILEGES;

exit

    (二)安装PHP7

       本文写作时,LimeSurve最新版本是5.3.32,需要 PHP 7.2.5 或更高版本。

      1、更改yum源

       CentOS的yum源不存在php7.x,我们首先要更改yum源。

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

       如果出现以下错误,需要配置dns。

 //curl: (6) Could not resolve host: mirror.webtatic.com; Unknown error

//error: skipping https://mirror.webtatic.com/yum/el7/webtatic-release.rpm - transfer failed

       1)打开文件/etc/resolv.conf:

vi /etc/resolv.conf

       2)输入“i”添加以下内容:

nameserver 8.8.8.8

       3)输入“:wq”保存并退出编辑。

       4)重启网卡。

systemctl restart network

       2、安装PHP7

       1)查看目前能够安装的PHP版本

yum list php*

       可以看到可安装的PHP最新版为:php72w。

       2)安装php72w

yum -y install php72w

       3)安装拓展

yum install php72w-common php72w-fpm php72w-opcache php72w-gd php72w-mysqlnd php72w-mbstring php72w-pecl-redis php72w-pecl-memcached php72w-devel

       上述命令一共会安装30个拓展包,安装过程较慢,请耐心等待。

       安装的拓展包如下:

php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib

       4)查看PHP版本

php -v

       显示如下信息,说明php72w开发环境基本安装完成。

PHP 7.2.34 (cli) (built: Oct  1 2020 13:37:37) ( NTS )

Copyright (c) 1997-2018 The PHP Group

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

    with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies

       5)重启httpd服务,并设置为开机启动。

systemctl restart httpd.service

systemctl enable httpd.service

       出现如下提示时,表示设置成功。

Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

       6)安装httpd服务

       如果执行重启httpd服务出现以下提示,说明没有安装httpd服务。

Failed to restart httpd.service: Unit notfound.

       如果没有安装,则执行下面命令进行安装。

yum install httpd -y

       启动httpd服务,并设置为开机启动。

systemctl start httpd.service

systemctl enable httpd.service

    (三)安装LimeSurvey

       1、下载最新版LimeSurvey

       首先要做的是去LimeSurvey的下载页面,查看最新的稳定版本的LimeSurvey CE的下载链接,并使用wget命令下载。

       LimeSurvey下载页面:https://community.limesurvey.org/downloads/

wget https://download.limesurvey.org/latest-stable-release/limesurvey5.3.32+220817.zip     #加粗文字可换为最新的下载链接

       将LimeSurvey存档解压缩到服务器上的文档根目录。

unzip limesurvey5.3.32+220817.zip     #加粗文字需更换为下载的实际文件名 

       如果提示以下内容,说明未安装uzip。

-bash: uzip: command not found

       安装uzip。

yum install unzip

       移动limesurvey文件夹。

mv limesurvey /var/www/html/

       更改文件夹权限。

chown apache:apache -R /var/www/html/limesurvey/

       2、配置Apache Web服务器

       为您的LimeSurvey网站创建Apache虚拟主机。首先使用文本编辑器创建"/etc/httpd/conf.d/vhosts.conf"文件。

vi /etc/httpd/conf.d/vhosts.conf

       输入以下内容:

IncludeOptional vhosts.d/*.conf

       保存并关闭文件。接下来,创建虚拟主机。

mkdir /etc/httpd/vhosts.d/

vi /etc/httpd/vhosts.d/yourdomain.com.conf     #“yourdomain.com”更换为您的域名

       输入以下内容:

ServerAdmin [email protected]

DocumentRoot /var/www/html/limesurvey/

ServerName www.yourdomain.com     #“www.yourdomain.com”更换为您的域名

ErrorLog /var/log/httpd/www.yourdomain.com -error_log     #“www.yourdomain.com”更换为您的域名

CustomLog /var/log/httpd/www.yourdomain.com -access_log combined     #“www.yourdomain.com”更换为您的域名


DirectoryIndex index.html index.php

Options FollowSymLinks

AllowOverride All

Require all granted

       保存并关闭文件。重新启动apache服务以使更改生效:

systemctl restart httpd.service

       3、安装LimeSurvey

      在浏览器中输入您的域名或者IP地址,开始安装LimeSurvey。

       4、可能会出现的问题

       安装到第3步,有可能会报错,无法继续安装,如图所示:

       

       需要修改php.ini及php.conf两个文件:

vi /etc/php.ini

       找到session.save_path,删除前面的注释符“;”,路径改为“/tmp”,如图所示:

vi /etc/httpd/conf.d/php.conf

       找到session.save_path,路径改为“/tmp”,如图所示:

       保存并关闭文件。重新启动apache服务以使更改生效:

systemctl restart httpd.service  

       在浏览器中输入您的域名或者IP地址,重新开始安装LimeSurvey。(重要)

       如果还是报错,可能需要使用“reboot”命令重启系统后重试。

总结

       第一次发文,难免有疏漏之处,希望大家多批评指正。希望能对学习研究的朋友有所帮助。

   

","force_purephv":"0","gnid":"938b52228c91e49bb","img_data":[{"flag":2,"img":[{"desc":"","height":"505","title":"","url":"https://p0.ssl.img.360kuai.com/t012e3e5496b2cb9fab.jpg","width":"600"},{"desc":"","height":"288","title":"","url":"https://p0.ssl.img.360kuai.com/t017cd9968782931bbe.jpg","width":"600"},{"desc":"","height":"288","title":"","url":"https://p0.ssl.img.360kuai.com/t01b0d7760cfbc856e9.jpg","width":"600"},{"desc":"","height":"522","title":"","url":"https://p0.ssl.img.360kuai.com/t01675c9fde03793ad6.jpg","width":"600"},{"desc":"","height":"520","title":"","url":"https://p0.ssl.img.360kuai.com/t017e2c0a884c36bcf4.jpg","width":"600"},{"desc":"","height":"288","title":"","url":"https://p0.ssl.img.360kuai.com/t013a2ed0c00ae4b5fa.jpg","width":"600"},{"desc":"","height":"509","title":"","url":"https://p0.ssl.img.360kuai.com/t01a74c56c8b93d9c83.jpg","width":"600"},{"desc":"","height":"288","title":"","url":"https://p0.ssl.img.360kuai.com/t014a6122d0f7dabad4.jpg","width":"600"},{"desc":"","height":"288","title":"","url":"https://p0.ssl.img.360kuai.com/t01de83b08cbd25c5a1.jpg","width":"600"},{"desc":"","height":"299","title":"","url":"https://p0.ssl.img.360kuai.com/t01fa38f5f1536955db.jpg","width":"554"}]}],"original":0,"pat":"art_src_1,fts0,sts0","powerby":"hbase","pub_time":1663049763000,"pure":"","rawurl":"http://zm.news.so.com/4f0b377c4a40e964d5b0fcb4643d630b","redirect":0,"rptid":"2a9bb61c286197d5","s":"t","src":"什么值得买","tag":[],"title":"从零开始,在CentOS 7上部署安装LimeSurvey

耿咐钓4158如何用移动硬盘安装centos -
米夜澜19459096696 ______ 1、在Windows XP下预留最后一个分区,未分配空闲状态,用来安装CENTOS. 2、把下载的CentOS镜像文件放在FAT格式的任何一 个盘,假设E:\盘. 3、解压CENTOS镜像中isolinux文件夹 下的vmlinuz和initrd.img(如果只有vmlinuz0则使...

耿咐钓4158vmware workstation安装centos6怎么显示用户界面 -
米夜澜19459096696 ______ 1. 挂载光盘 mount /dev/cdrom /media/cdrom (需要提前在media下去创建一个目录cdrom)2. 创建自己的repo文件 vim /etc/yum.repos.d/local.repo [local] name=local baseurl=file:///media/cdrom enabled=1 gpgcheck=03. 修改yumRepo.py文件 vim ...

耿咐钓4158怎样安装才好,我安装centos7失败30+次了 -
米夜澜19459096696 ______ Centos7.0安装教程:centos7.0安装方式很多,我们选择以虚拟机来进行安装.首先,需要下载配置虚拟机,以最常用的VMware为例.1、打开虚拟机,选择新建虚拟机2、选择标准3、载入我们下载的centos7.0镜像文件4、选择操作系统和版本...

耿咐钓4158电脑双系统怎么安装 win7和centos -
米夜澜19459096696 ______ 估计你是用U盘安装的,上面的提示就是系统默认启动要挂载 /dev/sr0设备(这个设备就是你的安装盘或者是U盘),然后从/dev/sr0设备载入要安装的centos7. 由于mount 不上/dev/sr0,也就是说这个设备挂载不了,或者你没有这个设备.这样...

耿咐钓4158如何在CentOS 7中安装或升级到最新的内核版本 -
米夜澜19459096696 ______ 安装教程1、小编使用虚拟机安装系统,如果用户想要将自己的计算机重装成centos,那么可以下载软碟通(ultraiso)来进行启动盘的制作,再通过U盘安装系统.打开虚拟机后选择典型安装系统.2、如果用户觉得安装麻烦,且英语水平没问题...

耿咐钓4158win7安装好后 怎么安装centos7 -
米夜澜19459096696 ______ 放入win7系统光碟,运行安装程序,里面有系统修复,修复一下试试.

耿咐钓4158Centos怎么安装wine,详细一些 -
米夜澜19459096696 ______ 可以试着安装一下CrossOver(和wine一样,但是比它好用) 下面就给大家呈现具体安装过程: 1、去中文官网进行 CrossOver 下载,如果安装包的名字过长,可以修改成 crossover.bin,然后打开终端,首先要把 .bin 文件设置成可执行的:...

耿咐钓4158CentOS 6.7 和CentOS 6.6 哪个好 -
米夜澜19459096696 ______ 6.7只是6.6版本的一个小的升级,大的功能基本没有变.新版本固然会比旧版本好,因为修正了一些bug或者引入一些小的功能.建议还是使用6.7吧,下载地址如下,http://mirrors.ustc.edu.cn/centos/ 里面有centos所有的版本的包,http://mirrors.ustc.edu.cn/centos/6.7/isos/i386/ 里面有centos6.7的32位系统iso相关的信息.

耿咐钓4158centos6.7安装配置ftp -
米夜澜19459096696 ______ 启动命令:/etc/rc.d/init.d/vsftpd start这时候可以使用ftp客户端连接.vsftpd的权限貌似和系统权限有挂钩.下面是抄来的配置解释vsftpd的配置,例如root等.vsftpd.user_list:位于/etc目录下.该文件里的用户账户在默认情况下也不能访问FTP服...

耿咐钓4158win7下安装centos6.5双系统有哪些步骤 -
米夜澜19459096696 ______ 一.安装所需软件1.分区助手专业版(必需):用来对硬盘分区,将磁盘的一部分格式化成Linux可以识别的ext3格式2.Ext2Fsd(硬盘安装必需,光盘安装不用):因为Windows不能识别ext3格式的文件系统,所以需要借助这个软件将linux安装文...

(编辑:自媒体)
关于我们 | 客户服务 | 服务条款 | 联系我们 | 免责声明 | 网站地图 @ 白云都 2024