天天看点

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

一、 个人基本信息的介绍

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

第二部分--搭建的过程

用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

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]

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

 - Removing privileges on test database...

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n]

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

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

上传   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

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

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

Vim /etc/php.ini

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

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

可以继续安装了

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

创建一个测试用户

安装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

然后安装

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

完成了

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

个人的案例展示

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