录
一、Linux安装LAMP环境
二、安装配置Discuz论坛
一、Linux安装LAMP环境
1、安装Apache
rpm -qa | grep httpd
yum remove -y "httpd*"
yum install -y httpd
systemctl status httpd
systemctl enable httpd
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
firewall-cmd --query-port=80/tcp
touch /var/www/html/index.html
echo "this is a apache test"
使用浏览器访问ip地址,页面显示"this is a apache test"表示成功
2、MySQL
rpm -qa | grep mariadb
yum remove -y "mariadb*"
yum install -y mariadb-server
systemctl start mariadb.server
systemctl status mariadb
systemctl enable mariadb
mysqladmin -uroot password 'yourpassword'
mysql -uroot -p
MariaDB[(none)]>set password=password('123456');
MariaDB[(none)]> grant all on *.* to 'newuser'