当前位置:网站首页>征文投稿丨使用轻量应用服务器搭建博客环境
征文投稿丨使用轻量应用服务器搭建博客环境
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、其它环境

三、总结&使用感受
边栏推荐
- R语言ggplot2可视化:patchwork包将一个ggplot2可视化结果和一个plot函数可视化结果横向组合起来形成最终结果图、两个可视化的组合结果对齐、并为组合图像的每个子图添加标题
- Complete model training routine (I)
- C#/VB. Net to convert PDF to excel
- Installation and use of Jenkins
- WPF 视频硬解码渲染播放(无空域)(支持4K、8K、高帧率视频)
- Facebook! Adaptive gradient defeats manual parameter adjustment
- 完整的模型训练套路(一)
- Technical secrets of ByteDance data platform: implementation and optimization of complex query based on Clickhouse
- ROS知识点——话题消息的定义与使用
- Li Kou today's question -522 Longest special sequence
猜你喜欢

深度学习基础汇总

Installation and use of Jenkins
![[C language] implementation of binary tree and three Traversals](/img/9f/384a73fb82265a76fc5eef884ce279.png)
[C language] implementation of binary tree and three Traversals

隐私计算 FATE - 离线预测

See how the interface control devaxpress WinForms creates a virtual keyboard

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

Complete model training routine (I)

Facebook出手!自适应梯度打败人工调参

MongoDB 在腾讯零售优码中的应用

Talking about open source - Linus and Jim talk about open source in China
随机推荐
华为能成“口红一哥”,或者“带货女王”吗?
What! One command to get the surveillance?
Cross cluster deployment of helm applications using karmada
R语言ggplot2可视化:使用patchwork包将两个ggplot2可视化结果横向构成新的结果可视化组合图(使用|符号)
Case driven: a detailed guide from getting started to mastering shell programming
一文教你快速生成MySQL数据库关系图
看界面控件DevExpress WinForms如何创建一个虚拟键盘
C语言基础语法
【黑马早报】腾讯回应大批用户QQ号被盗;薇娅丈夫公司被罚19万;中国恒大被申请清盘;关晓彤奶茶店回应被加盟商起诉...
R语言ggplot2可视化:使用patchwork包(直接使用加号+)将一个ggplot2可视化结果和一段文本内容横向组合起来形成最终结果图
openGauss内核:SQL解析过程分析
A bug liver a week I can't help mentioning issue
How to build a 100000 level QPS large flow and high concurrency coupon system from zero
如何从零搭建10万级 QPS 大流量、高并发优惠券系统
C#/VB. Net to convert PDF to excel
ROS knowledge points - ROS create workspace
抽奖动画 - 鲤鱼跳龙门
Power battery is divided up like this
C语言学习-19-全排列
After QQ was stolen, a large number of users "died"