Centos6.4成功搭建LAMP+Discuz

本文详细介绍了在Centos6.4上搭建LAMP环境(Linux, Apache, Mysql, Php)及安装Discuz论坛的步骤,包括清理环境、安装apache、mysql和php,配置防火墙,数据库安全设置,以及安装和配置Discuz论坛,解决安装过程中遇到的权限问题。" 90244880,5597593,前端私有库搭建:Verdaccio 源码解析,"['前端开发', 'npm', '包管理', '私有仓库', 'Verdaccio']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

LAMP:Linux+Apache+Mysql+Php

安装之前,先把环境清干净了

#rpm -qa|grep httpd
#yum -y remove mysql mysql-server
#yum -y remove httpd
#yum -y remove php php-fmp

一、安装apache

1.1、安装apache

 [root@wxj local]# yum install httpd httpd-devel
 安装完成后查看下版本
 [root@wxj local]# httpd -version
Server version: Apache/2.2.15 (Unix)
Server built:   Jun 19 2018 15:45:13

1.2、启动apache服务并设置开机自启动

   [root@wxj libexec]# service httpd start
   [root@wxj libexec]# chkconfig httpd on
   [root@wxj libexec]# service httpd status
   httpd (pid  3718) 正在运行...

1.3 开启防火墙端口:

a、先查出apche服务所占的端口

[root@wxj libexec]# netstat -atlnp |grep httpd
tcp        0      0 :::36365                    :::*                        LISTEN      3116/httpd          
tcp        0      0 :::80                       :::*                        LISTEN      3718/httpd  

b、添加防火墙规则 通过命令行添加或通过在文件/etc/sysconfig/iptables中添加

    [root@wxj opt]# iptables -A INPUT -p tcp  -m state --state NEW -m tcp --dport 80 -j ACCEPT
    [root@wxj opt]# service iptables save
    iptables:将防火墙规则保存到 /etc/sysconfig/iptables:     [确定]

1.4修改服务配置

#修改允许.htaccess AllowOverride None 修改成AllowOverride All
#修改页面支持属性 在DirectoryIndex index.html 后面加:index.php
#新增支持.pl脚本
#AddHandler cgi-script .cgi修改成: AddHandler cgi-script .cgi .pl

二、安装mysql

2.1、mysql client和server端安装

 [root@wxj local]# yum -y install mysql mysql-server mysql-devel

2.2查询是否安装成功:

 [root@wxj libexec]# rpm -qa|grep mysql
    mysql-server-5.1.73-8.el6_8.x86_64
    mysql-libs-5.1.73-8.el6_8.x86_64
    mysql-devel-5.1.73-8.el6_8.x86_64
    mysql-5.1.73-8.el6_8.x86_64

2.3、启动mysql服务,并设置开机自启动

 [root@wxj libexec]#service mysqld start
 [root@wxj libexec]# chkconfig mysqld on

2.4数据库安全设置

[root@wxj local]# mysql_secure_installation
………………………………
Enter current password for root (enter for none): 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Enter current password for root (enter for none): 

**上述报错原因:root密码初始化时是空,但输入空无效,只能重新修改root密码
解决方法如下:

a、停止mysql服务
[root@wxj local]# service mysqld stop
b、root密码忘记了,所以越过授权
[root@wxj local]# /usr/bin/mysqld_safe --skip-grant-tables &
c、此时该窗口不能动了,另开一窗口
[root@wxj local]# mysql -uroot -p
Enter password: ----------->提示输入密码,直接回车就可以
d、 紧接着操作步骤如下图:在这里插入图片描述
e、重启mysql
[root@wxj bin]# service mysqld start
正在启动 mysqld: [确定]
f、再进行输入库安全设置就ok了

 [root@wxj libexec]# mysql_secure_installation
  

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Enter current password for root (enter for none): 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none): 
OK, successfully used password, moving on...    
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] Y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!
    
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.    
Disallow root login remotely? [Y/n] n
 ... skipping.    
By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.    
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!    
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

三、安装php

3.1 安装php

[root@wxj libexec]# yum -y install php

3.2 php和mysql进行关联

[root@wxj libexec]# yum -y install php-mysql

3.3 安装常用php模块

[wxj@wxj opt]$ sudo yum -y   install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp hp-soap curl curl-devel php-bcmath

3.4 测试php

[root@wxj opt]# cd /var/www/html
[root@wxj html]# vi info.php
增加如下内容,保存退出
<?php
  phpinfo();
?>

3.5 重启apache
3.6 在浏览器中输入:localhost/info.php或http://192.168.3.46/info.php
192.168.3.46是我的ip地址,出现如下图片,则是安装好了
在这里插入图片描述
四、安装discuz
到官方论坛下载:
http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_TC_UTF8.zip

4.1 下载:
# wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_TC_UTF8.zip
4.2 下载完成后
# unzip 包名解压
4.3 upload 目录放到web请求目录下:
[root@wxj local]# cd /opt
[root@wxj opt]# ls
ComsenzDiscuz-DiscuzX-master.zip DiscuzX rh
[root@wxj opt]# cd DiscuzX/
[root@wxj DiscuzX]# ls
readme README.md upload utility
[root@wxj DiscuzX]# cp -R upload/* /var/www/html
4.4 浏览器中输入我本机的ip地址
http://192.168.3.46/install安装时,目录、文件权限检查没过,加下权限重试下
在这里插入图片描述
给上述报错的目录加权限
[root@wxj html]# chmod -R 777 uc_server
[root@wxj html]# chmod -R 777 uc_client
[root@wxj html]# chmod -R 777 config
[root@wxj html]# chmod -R 777 data
刷新浏览器就ok了
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
到此就搭建完成了,可以访问了
在这里插入图片描述
设置的mysql数据库的root密码是:123456
discuz管理员密码是:admin
能访问成功
在这里插入图片描述

内容概要:本文详细探讨了基于MATLAB/SIMULINK的多载波无线通信系统仿真及性能分析,重点研究了以OFDM为代表的多载波技术。文章首先介绍了OFDM的基本原理和系统组成,随后通过仿真平台分析了不同调制方式的抗干扰性能、信道估计算法对系统性能的影响以及同步技术的实现与分析。文中提供了详细的MATLAB代码实现,涵盖OFDM系统的基本仿真、信道估计算法比较、同步算法实现和不同调制方式的性能比较。此外,还讨论了信道特征、OFDM关键技术、信道估计、同步技术和系统级仿真架构,并提出了未来的改进方向,如深度学习增强、混合波形设计和硬件加速方案。; 适合人群:具备无线通信基础知识,尤其是对OFDM技术有一定了解的研究人员和技术人员;从事无线通信系统设计与开发的工程师;高校通信工程专业的高年级本科生和研究生。; 使用场景及目标:①理解OFDM系统的工作原理及其在多径信道环境下的性能表现;②掌握MATLAB/SIMULINK在无线通信系统仿真中的应用;③评估不同调制方式、信道估计算法和同步算法的优劣;④为实际OFDM系统的设计和优化提供理论依据和技术支持。; 其他说明:本文不仅提供了详细的理论分析,还附带了大量的MATLAB代码示例,便于读者动手实践。建议读者在学习过程中结合代码进行调试和实验,以加深对OFDM技术的理解。此外,文中还涉及了一些最新的研究方向和技术趋势,如AI增强和毫米波通信,为读者提供了更广阔的视野。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值