当前位置:网站首页>征文投稿丨使用轻量应用服务器搭建博客环境
征文投稿丨使用轻量应用服务器搭建博客环境
2022-06-28 15:32:00 【InfoQ】
一、购买服务器

二、配置服务器
1、安装Node
[[email protected] ~]$ mkdir -p /usr/local/nodejs
[[email protected] nodejs]$ cd /usr/local/nodejs/
[[email protected] nodejs]$ wget https://npm.taobao.org/mirrors/node/v12.12.0/node-v12.12.0-linux-x64.tar.gz[[email protected] nodejs]$ tar -xvf node-v12.12.0-linux-x64.tar.gz[[email protected] nodejs]$ vim /etc/profileexport NODE_HOME=/usr/local/nodejs/node-v12.12.0-linux-x64
export PATH=$NODE_HOME/bin:$PATH[[email protected] nodejs]$ source /etc/profile[[email protected] nodejs]$ node -v[[email protected] nodejs]$ npm -v2、安装MySQL
[[email protected] nodejs]$ cd /home/admin
[[email protected] admin]$ mkdir downloads
[[email protected] admin]$ chmod 777 downloads
[[email protected] admin]$ cd downloads/[[email protected] downloads]$ wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
[[email protected] downloads]$ sudo rpm -ivh mysql80-community-release-el8-1.noarch.rpm[[email protected] downloads]$ sudo yum install -y mysql-server[[email protected] downloads]$ sudo systemctl start mysqld[[email protected] downloads]$ mysql -V[[email protected] downloads]$ mysql -u rootmysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '这里改成你自己的密码';mysql> exit[[email protected] downloads]$ firewall-cmd --add-port=3306/tcp --permanent[[email protected] downloads]$ systemctl restart firewalld.service # 重启防火墙[[email protected] downloads]$ mysql_secure_installation[[email protected] downloads]$ whereis my.cnf
my: /etc/my.cnf[[email protected] downloads]$ vi /etc/my.cnf
#修改1:增加client配置(文件开头)
[client]
default-character-set=utf8mb4
#修改2:增加mysqld配置(文件结尾)
#charset
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci[[email protected] downloads]$ systemctl restart mysqld3、安装Nginx
[[email protected] downloads]$ vim /etc/yum.repos.d/nginx.repo[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1[[email protected] downloads]$ yum -y install nginx[[email protected] downloads]$ systemctl stop nginx.service # 停止nginx服务
[[email protected] downloads]$ systemctl start nginx.service # 打开nginx服务
[[email protected] downloads]$ systemctl restart nginx.service # 重启nginx服务
[[email protected] downloads]$ systemctl status nginx.service # 查看nginx服务状态4、其它环境

三、总结&使用感受
边栏推荐
- PostgreSQL实现按年、月、日、周、时、分、秒的分组统计
- Talking about open source - Linus and Jim talk about open source in China
- [C language] implementation of binary tree and three Traversals
- SAP mts/ato/mto/eto topic 9: front and back desk operation in m+m mode, strategy 50, preparation of raw materials and semi-finished products in advance
- 验证回文串
- [leetcode] 13. Roman numeral to integer
- 从莫高窟到太平洋,海量数据找到了新家园
- With a return of 5000 times, the South African newspaper invested in Tencent to make a province
- Halcon basic summary (I) cutting pictures and rotating images
- High "green premium" of environmental protection products? How far is the low-carbon lifestyle from people
猜你喜欢

信创操作系统--麒麟Kylin桌面操作系统 (项目十 安全中心)

What! One command to get the surveillance?
![[C language] implementation of binary tree and three Traversals](/img/9f/384a73fb82265a76fc5eef884ce279.png)
[C language] implementation of binary tree and three Traversals

分布式理论须知

Privacy computing fat - offline prediction

使用Karmada实现Helm应用的跨集群部署
PostgreSQL实现按年、月、日、周、时、分、秒的分组统计

隐私计算 FATE - 离线预测

Installation and use of Jenkins

C#/VB. Net to convert PDF to excel
随机推荐
教育行业SaaS应用管理平台解决方案:助力企业实现经营、管理一体化
Oracle11g database uses expdp to back up data every week and upload it to the backup server
Visual Studio 2010 配置和使用Qt5.6.3
With 120billion yuan, she will ring the bell for IPO again
Curve 替换 Ceph 在网易云音乐的实践
S2b2c system website solution for kitchen and bathroom electrical appliance industry: create s2b2c platform Omni channel commercial system
环保产品“绿色溢价”高?低碳生活方式离人们还有多远
Expand Disk C (allocate the memory of disk d to Disk C)
Installation and use of Jenkins
分布式 CAP 定理的前世今生
C语言学习-19-全排列
智慧园区数智化供应链管理平台如何优化流程管理,驱动园区发展提速增质?
Web worker poll request
The past and present life of distributed cap theorem
石油化工行业供应链系统驱动管理模式创新升级,强化企业内部管理
C#/VB.NET 将PDF转为Excel
How can the digital intelligent supply chain management platform of the smart Park optimize process management and drive the development of the park to increase speed and quality?
Power battery is divided up like this
Talking about open source - Linus and Jim talk about open source in China
扩充C盘(将D盘的内存分给C盘)