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

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: 用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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
4月前
|
应用服务中间件 数据安全/隐私保护
Tomcat【部署 02】Web端403 Access Denied You are not authorized to view this page解决方法(Tomcat 10.2.12 版本)
Tomcat【部署 02】Web端403 Access Denied You are not authorized to view this page解决方法(Tomcat 10.2.12 版本)
126 0
|
4月前
|
关系型数据库 MySQL Apache
【XAMPP】中mysql的admin页面打不开
【XAMPP】中mysql的admin页面打不开
|
关系型数据库 MySQL PHP
【laravel-admin】使用php artisan admin:make时报错
【laravel-admin】使用php artisan admin:make时报错
292 0
【laravel-admin】使用php artisan admin:make时报错
|
Web App开发 监控 关系型数据库
CentOS安装Awstats分析nginx日志并通过htpasswd认证访问
这篇笔记记录了在CentOS7.6中安装Awstats7.7,使用Awstats分析nginx日志,以及使用php+nginx搭建web管理界面,通过htpasswd认证访问的过程
3778 0
|
应用服务中间件 nginx
NGINX虚拟目录alias和root目录
  假设nginx配置的域名是www.kazihuo.com,现有静态资源/home/www/oye目录需要通过nginx访问。 1、在nginx.conf中到处第二行添加内容‘include /usr/local/nginx/conf/conf.
1600 0
xadmin与admin设置
xadmin : 导入xadmin 1 pip install xadmin 路由设置: 1 import xadmin 2 3 urlpatterns = [ 4 url(r'^xadmin/', xadmin.
1234 0
|
API PHP 数据安全/隐私保护