一、 個人基本資訊的介紹
本人就讀于資訊安全技術專業,現在已經是三年級了,因為專業的原因是有接觸到伺服器的,虛拟機之類的,之前就注冊了阿裡雲的賬号,之前聽朋友說過這個學生機,後來在阿裡雲的網站上就找到了學生機,後來就了解到了 飛天加速計劃·高校學生在家實踐”活動,就試用了,因為最近的事情特别多,就在這踩點的時間才發表文章來分享了,希望可以過。
第二部分--搭建的過程
用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

上傳 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
遇到問題了,去改配置檔案
Vim /etc/php.ini
[root@beiping-1 ucadmin]# systemctl restart httpd
可以繼續安裝了
建立一個測試使用者
安裝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
然後安裝
完成了
第三部分,通過飛天加速計劃·高校學生在家實踐”活動,我體會了利用經典的LAMY架構來搭建網站,而且是在公網的條件下,可供多人通路。不是像之前的區域網路環境搭建。更重要的是搭建過程的排錯,讓人記憶特别深刻,是以學習的意義重大。
個人的案例展示