当前位置:网站首页>Deployment of web server, personal experience
Deployment of web server, personal experience
2022-04-22 04:40:00 【Watch the moon and listen to the wind】
Overall architecture

Generally, use as much as possible yum install ,yum Automatic adaptation installation will be carried out , Save a lot of steps , however yum The version of warehouse software is very low , Need to update the software yum Source .
download mysql
download musql Of yum Warehouse , To get a new version mysql
Website links 
Select the corresponding version to download , Or use wget download

have access to yum Installation can also be downloaded mysql Software , Installation
maven install
link

We can go straight to linux Download the installation package on the system and use the command
wget -i -c link
for example :
wget -i -c https://dlcdn.apache.org/maven/maven-3/3.8.5/binaries/apache-maven-3.8.5-bin.tar.gz
tomcat install
link
Files are downloaded in a similar form
How to use window towards linux Upload files
The simple way is to download some tools , for example :
xshell etc.
The other is through the cmd The form of the command line :
First find the path corresponding to the file
pscp file name user name @ip: Pathname
# The pathname is linux Where to store in

install decompression zip Tools for
Search for files
yum list unzip* # List with unzip The first package
yum install -y unzip.x86_64 # -y That is, when confirmation is required during installation , All as allowed
# This is a ubutun in The form of search software
sudo apt-cache search java sdk
# install
apt-get install sun-java6-sdk
``` #### install jdk ```bash yum list jdk # Select an installation from the list yum -y install jdk java -verison# If it can output normally, the installation is successful ``` #### install maven Decompress first And then put bin Put the command in the environment variable , You can use it directly ```bash vim /etc/profile ``` # add to  ```bash source /etc/profile # Let the configuration file take effect echo $PATH # Check the information mvn -version ```  Change it maven Mirror image  ```bash <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> ``` #### install mysql ```bash yum install -y mysql Of yum Warehouse source yum list mysql # Select a version to install yum list instal mysql 5.7 ``` For the first time mysql It's a random password , ```bash grep 'password' /var/log/mysqld.log ``` Use this random password to log in Log in and change your password  Then log in with a new password unzip -d Decompression path file Import files into the database  #### install redis direct yum install ```bash systmctl start redis # start-up redis ``` #### install kafka Unzip it all the way The configuration file   Background start kafka Start... First zookeeper  ```bash bin/zookeeper-server-start.sh -daemon config/zookeeper.properties ``` start-up kafka  ```bash nohup bin/kafka-server-start.sh config/server.properties 1>/dev/null 2>&1 & ``` test  ```bash bin/kafka-topics.sh --list --bootstrap-server localhost:9092 ``` #### install es Unzip to a path  And add a word segmentation plug-in to plugins Of ik Catalog Modify the configuration file  Modify the required memory   es Don't allow root user Add a group ```bash groupadd nowcoder useradd nowcoder -p 123456 -g nowcoder ``` And give the permission of the configuration file to the new user  su new user     ```bash curl -X GET "localhost:9200/_cat/health?v" ``` #### install wkhtmltopdf ```bash yum list wkhtmltopdf ```  install gui Program , Use gui Tools  ```bash xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltoimage https://www.baidu.com 1.png ``` Make the above command into a script , And give the executive power to #### install tomcat decompression hold bin In the environment variable configured by the command ```bash export PATH=$PATH:/usr/local/maven/apache-maven-3.6.3/bin export PATH=$PATH:/usr/local/tomcat/apache-tomcat-8.5.78/bin ``` startup.sh #### install nigix Search and install Changing configuration files vim /etc/nginx/nginx.conf ```bash root@VM-16-13-ubuntu:/# vim /etc/nginx/nginx.conf # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/javascript text/xml applicatio n/xml application/xml+rss text/javascript; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; server {
listen 80; # monitor 80 port server_name Your own ip; # Listening for access host location / {
# All paths to the site use proxies proxy_pass http://127.0.0.1:8080; } } ``` ```bash systemctl start nginx # start-up systemctl status nginx # Check the status ```
#### Upload the source code
mvn clean
Make it into a compressed package and upload it to the server
decompression
The folder after decompression

To be packaged into war, Ignore tests , For the first time maven There will be some slowness
And then what will be generated ROOT.war Move to tomcat Below webapps in
The record is rough , Have a problem @me Just fine
Pit encountered :
**es Must be with that es The version of the word segmentation plug-in matches , Or start error **
install yum Warehouse
wget -i -c File path
maven You need to download the installation package to install
tar
cd maven Next
vim /etc/profile
export PATH=$PATH:maven File path /bin
preservation
source The configuration file
echo $PATH
mvn -version
hold maven The image of is changed to Alibaba cloud
decompression unzip -d route Which file
source /root/init_f/s.sql Import to mysql in
from window Upload files to linux in
pscp file root@linux Of ip:/root/xxx To what Directory
版权声明
本文为[Watch the moon and listen to the wind]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210942507523.html
边栏推荐
猜你喜欢

权威机构统计:2021 年最佳数据中心网络公司,中国华为和H3C上榜

AT32 MCU Audio 24bit例程
![[concurrent programming 043] how to solve the problems of CAS and ABA?](/img/bd/8638aa75d7d3b237d792a201e68c0f.png)
[concurrent programming 043] how to solve the problems of CAS and ABA?

2022年P气瓶充装培训试题及答案

Keras deep learning practice (2) -- using keras to construct neural network

Paper reading (48): a library of optimization algorithms for organizational design

How did Jian Daoyun, who started a business in a small team of 10 people and now has an income of more than 100 million without financing, do it?

Solve the problem of Chinese garbled code in idea (garbled code in configuration file)

2022年A特种设备相关管理(电梯)复训题库及答案

Bi set - SSM campus second-hand book sales system + thesis
随机推荐
2022年P气瓶充装培训试题及答案
Cilcate environment construction
Crypto JS encryption algorithm library [installation tutorial, cache encryption]
Paper reading (49): big data security and privacy protection (Kopp)
同行面试分享 联想 winform方向 20220420
[concurrent programming 045] what is pseudo shared memory sequence conflict? How to avoid?
Redis 的过期数据会被立马删除么?
Knowledge points related to compliance type
Financial retail map - transaction flow warning map
AT32 MCU F435/437 DFU DEMO
2022G2电站锅炉司炉操作证考试题库及在线模拟考试
Job scheduling, intermediate scheduling, process scheduling
如何在 Bash 中将字符串计算为数字?
Introduction to UVM Experiment 2
12. Libevent loop function and exit test
22.4.21 learning comprehension
How to use SQLite database file on SD card in Android studio
JVM shorthand
requires XXX>=YYY, but you‘ll have XXXX=ZZZ which is incompatible
2021-08-14