yum install -y php.x86_64 php-fpm.x86_64 httpd.x86_64 mariadb.x86_64 mariadb-server.x86_64 memcached.x86_64
yum install epel-release.noarch -y
yum install phpmyadmin
vi /etc/my.cnf #改配置文件
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
innodb_file_per_table=1
systemctl restart mariadb.service
systemctl enable mariadb.service
echo "<?php phpinfo();?>" > /var/www/html/info.php #测试 http://ip/index.html
mysqladmin -u root password 1234 #数据库密码
mysql -u root -p #登陆
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '1234' WITH GRANT OPTION; #允许远程登录
flush privileges; #刷新
vim /etc/httpd/conf.d/phpMyAdmin.conf
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
<Directory /usr/share/phpMyAdmin/>
options none
AllowOverride Limit
Require all granted
</Directory>
systemctl restart httpd
wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UTF8.zip #下载diszuz 网址可能不对
unzip DX31_R20141225_SC_UTF8.zip #解压
cp -Rf upload/ /var/www/html/
chown apache:apache /var/www/html/upload/ -Rf
chcon -R -t httpd_sys_rw_content_t /var/www/html/upload/
vi /etc/httpd/conf/httpd.conf
DocumentRoot "/var/www/html/upload"
DirectoryIndex index.html index.php
systemctl restart httpd.service
浏览器 192.168.1.142 查看