當(dāng)前位置:首頁 > IT技術(shù) > Web編程 > 正文

單機版Discuz網(wǎng)站LAMP架構(gòu)部署
2021-10-18 17:36:59

查看LAMP環(huán)境,需要的軟件包
# rpm -qa |grep mysql
# rpm -qa |grep php
# rpm -qa |grep httpd

1、安裝apache:
# yum install -y httpd
# vim /etc/httpd/conf/httpd.conf

96 #下面這行的意思是允許所有計算機通過ip地址訪問本地80端
97 ServerName localhost:80
98 ServerName www.lamp.com:80
165 <IfModule dir_module>
166 DirectoryIndex index.html index.php
167 </IfModule>

重啟apache

# systemctl start httpd
# systemctl enable httpd

查看apache端口
# netstat -antp |grep httpd

查看apache版本
# httpd -v

2、安裝mysql
# wget https://repo.mysql.com/mysql80-community-release-el7-5.noarch.rpm
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
# yum install -y mysql-community-server

啟動mysql
# systemctl restart mysqld
# systemctl enable mysqld

設(shè)置mysql的root密碼
# mysql_secure_installation
# mysql -uroot -pcentos

3、安裝php
# yum install -y php
# systemctl restart httpd
# ll /var/www/html/

4、安裝discuz項目

下載discuz網(wǎng)站:https://gitee.com/ComsenzDiscuz/DiscuzX
# unzip discuz.zip
# cd discuz/
# mv * /var/www/html/
# chmod -R a+w /var/www/html/
# yum -y install php-mysqli
# systemctl restart httpd

本文摘自 :https://www.cnblogs.com/

開通會員,享受整站包年服務(wù)立即開通 >