安装笔记
1、安装Apache
2、安装PHP
-
yum install php -y
-
yum install php-* --skip-broken // 根据需要安装php相关模块,这里懒省事全装了
3、安装Mariadb客户端及服务器
-
yum install mariadb mariadb-server -y
-
systemctl start mariadb.service // 启动Mariadb
-
mysql_secure_installation // 设置root密码
-
mysql -u root -p
-
MariaDB [(none)]> create database phpmyfaq;
-
MariaDB [(none)]> exit
4、
打开防火墙的80端口、关闭SELinux
-
firewall-cmd --add-service http
-
vi /etc/selinux/config
-
SELINUX=enforcing 修改成 SELINUX=disabled
5、启动Apache并安装phpMyFAQ
下载地址:
-
tar -zxvf phpmyfaq-2.8.17.tar.gz
-
mv phpmyfaq/* /var/www/html/
-
cd /var/www/html/
-
mkdir attachments data images
-
chmod -R 777 attachments/ config/ data/ images/
-
systemctl start httpd.service
访问 IP Addr>/install/setup.php
填写数据库及phpMyFAQ的管理员信息,其他默认就可以,以后可以修改的。
6、删除安装文件
-
rm install/setup.php install/update.php -f
~~~ 可能遇到的错误 ~~~
错误1:
No supported database detected! Please install one of the following database systems and enable the corresponding PHP extension in php.ini:
-
MySQL 5.x, MariaDB 5.x (ext/mysqli)
-
MySQL 5.x (ext/mysql, deprecated)
-
PostgreSQL 8.x
-
SQLite
-
SQLite 3 (only PHP 5.3+, experimental)
-
MS SQL Server 2005 / 2008
-
SQL Server Driver for PHP (experimental)
PHP的相关模块没有安装,请参考2.2,需要重启Apache。
错误2:
The following directories could not be created or are not writable:
-
/attachments
-
/config
-
/data
-
/images
Please create them manually and/or change access to chmod 755 (or greater if necessary).
需要创建相关文件夹并给予读写执行的权限。
参考官方文档:http://www.phpmyfaq.de/documentation.2.8.en.php#2.2
错误3:
phpMyFAQ 2.8.17 Setup
Did you already read the documentation carefully before starting the phpMyFAQ setup? :-)
没有任何表示,原因是没有找到指定的数据库。参考3.4、3.5,创建好数据库后重新刷新页面即可。
阅读(2495) | 评论(0) | 转发(0) |