本人的一些信息分享和记一次用LAMP搭建Ucenter和Ucenter-home网站

本文涉及的产品
RDS AI 助手,专业版
RDS MySQL DuckDB 分析主实例,集群系列 4核8GB
RDS MySQL DuckDB 分析主实例,基础系列 4核8GB
简介: 用yum源下载apache、mysql、php搭建ucenter网站

一、 个人基本信息的介绍

       本人就读于信息安全技术专业,现在已经是三年级了,因为专业的原因是有接触到服务器的,虚拟机之类的,之前就注册了阿里云的账号,之前听朋友说过这个学生机,后来在阿里云的网站上就找到了学生机,后来就了解到了 飞天加速计划·高校学生在家实践”活动就试用了,因为最近的事情特别多,就在这踩点的时间才发表文章来分享了,希望可以过。

 

第二部分--搭建的过程

用yum源安装对应的软件包

  因为服务器环境是centos7系列,mysql被mariadb 替代,所以

 

yum install -y httpd mariadb-server mariadb php php-mysql

 

 

 

[root@beiping-1 ~]# httpd -v

Server version: Apache/2.4.6 (CentOS)

Server built:   Nov 10 2021 14:26:31

 

 

[root@beiping-1 ~]# mysql -V

mysql  Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1

 

 

启动服务

[root@beiping-1 ~]# systemctl start httpd

[root@beiping-1 ~]# systemctl enable httpd

 

配置mariadb 安全选项

 

 

[root@beiping-1 ~]# mysql_secure_installation

 

[root@beiping-1 ~]# mysql_secure_installation

 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB

     SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

 

In order to log into MariaDB to secure it, we'll need the current

password for the root user.  If you've just installed MariaDB, 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):

OK, successfully used password, moving on...

 

Setting the root password ensures that nobody can log into the MariaDB

root user without the proper authorisation.

 

Set root password? [Y/n] n  

... skipping.

 

By default, a MariaDB installation has an anonymous user, allowing anyone

to log into MariaDB 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]

... 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]

... Success!

 

By default, MariaDB 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]

- 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]

... Success!

 

Cleaning up...

 

All done!  If you've completed all of the above steps, your MariaDB

installation should now be secure.

 

Thanks for using MariaDB!

测试php功能,写入phpinfo

[root@beiping-1 ~]# cd /var/www/html/

[root@beiping-1 html]# ls

[root@beiping-1 html]# vim index.php

phpinfo();

?>

 

[root@beiping-1 html]# systemctl restart httpd

 

图片.png

 

 

 

上传   UCenter_1.5.0_SC_UTF8.zip

 

解压

 

[root@beiping-1 ~]# unzip -d ./ucenter UCenter_1.5.0_SC_UTF8.zip

 

 

[root@beiping-1 ucenter]# mkdir /var/www/html/ucadmin

[root@beiping-1 ucenter]# mv upload/ /var/www/html/ucadmin

[root@beiping-1 ucenter]# cd /var/www/html/ucadmin

 

 

[root@beiping-1 ucadmin]# ls -ld data/

drwxr-xr-x 8 root root 4096 Dec 12  2008 data/

[root@beiping-1 ucadmin]# chown apache:apache data/ -R

 

图片.png

 

遇到问题了,去改配置文件

Vim /etc/php.ini

 

图片.png

[root@beiping-1 ucadmin]# systemctl restart httpd

 

可以继续安装了


图片.png

 

 

图片.png


 

创建一个测试用户

 

 

安装UCenter_home

 

[root@beiping-1 ucenter_home]# unzip -d ./ucenter_home UCenter_home_2.0_SC_UTF8.zip

 

[root@beiping-1 ~]# cd  ucenter_home/

[root@beiping-1 ucenter_home]# mv upload/* /var/www/html/

 

 

[root@beiping-1 ucenter_home]# cd /var/www/html/

 

[root@beiping-1 html]# cp config.new.php config.php

[root@beiping-1 html]# chown apache:apache config.php

[root@beiping-1 html]# chown apache:apache attachment/ data/  uc_client/ -R

 

然后安装

图片.png

图片.png


 图片.png

图片.png



 

完成了

 

 

 

 

 

 

第三部分,通过飞天加速计划·高校学生在家实践”活动我体会了利用经典的LAMY架构来搭建网站,而且是在公网的条件下,可供多人访问。不是像之前的局域网环境搭建。更重要的是搭建过程的排错,让人记忆特别深刻,因此学习的意义重大。

 

个人的案例展示

 


 图片.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

相关实践学习
自建数据库迁移到云数据库
本场景将引导您将网站的自建数据库平滑迁移至云数据库RDS。通过使用RDS,您可以获得稳定、可靠和安全的企业级数据库服务,可以更加专注于发展核心业务,无需过多担心数据库的管理和维护。
MySQL数据库入门学习
本课程通过最流行的开源数据库MySQL带你了解数据库的世界。   相关的阿里云产品:云数据库RDS MySQL 版 阿里云关系型数据库RDS(Relational Database Service)是一种稳定可靠、可弹性伸缩的在线数据库服务,提供容灾、备份、恢复、迁移等方面的全套解决方案,彻底解决数据库运维的烦恼。 了解产品详情: https://www.aliyun.com/product/rds/mysql 
相关文章
|
人工智能 监控 前端开发
springboot数字化智慧城市管理系统源码
支持对城市街道画面进行实时分析,系统可以实现违规摆摊检测、街道垃圾监测、违章停车识别、违规广告、出店经营检测、公共设施破坏、游摊小贩识别等违规识别。AI视频智识别分析系统通过AI技术手段提高城管对城市各个街道的巡查监管的工作效率。可以真正做到事前预警、事中高效检测预警。
350 5
|
存储 Prometheus 监控
Prometheus 存储方案与优化
【8月更文第29天】Prometheus 是一个流行的开源监控系统,它使用时间序列数据库来存储监控数据。Prometheus 的时间序列数据库是基于本地文件系统的,这种设计提供了高吞吐量的读写能力,但同时也带来了存储方面的挑战。本文将详细介绍 Prometheus 存储的工作原理,并提出一些优化策略以减少磁盘占用。
1729 1
|
存储 Kubernetes 调度
|
XML 存储 安全
探索 doc 和 docx 文件格式的区别
探索 doc 和 docx 文件格式的区别
1490 3
|
算法 Python
Python3,不知道Python内置库函数,不要错过这篇,必须收藏!!!
Python3,不知道Python内置库函数,不要错过这篇,必须收藏!!!
399 0
|
算法
STM32智能小车 0基础教学
STM32智能小车 0基础教学
634 0
|
JavaScript 前端开发 应用服务中间件
项目性能优化之用compression-webpack-plugin插件开启gzip压缩,以vue为例
项目性能优化之用compression-webpack-plugin插件开启gzip压缩,以vue为例
1191 0
|
XML 存储 JSON
|
Java 数据库连接 mybatis
【Mybatis】MyBatis的各种查询功能(查实体类对象,查集合,查单个数据,查询结果为map集合)
【Mybatis】MyBatis的各种查询功能(查实体类对象,查集合,查单个数据,查询结果为map集合)
660 0