Welcome to visit happy Garbage collector, a front-end knowledge summary sharing platform, and we grow together and progress together! 🙏 🙏 🙏
preparation
- Liunx basic command
- Git Basic commands
- nginx
- jenkins
tool
- Github account and project
- git
- Centos server
Sit tight! It’s time to start!
First log in to your remote server address
Enter the remote server address
SSH Username @IP address of the remote serverCopy the code
If you are prompted to log in for the first time, enter yes
Install nginx
nginx -v // Enter to view
Copy the code
Nginx is not installed on the server
yum install nginx // Enter download
or
yum install epel-release // If the previous installation failed
yum install nginx // Download it again
Copy the code
y / / return
Copy the code
Installation complete!
nginx -v
Copy the code
Modify the nginx configuration
nginx -t // Check the configuration file address
cd /etc/nginx
ls // You can see the nginx.conf configuration file
Copy the code
vim nginx.conf
or
yum install vim // If not, install vim again
Copy the code
Vim editor use method
i // You can edit the configuration file after insert appears at the bottom of the editor;
Copy the code
Change the configuration from user to root
This is the default address for storing static resource files
esc // Exit editing mode
:+ wq // Save and exitNginx -t checks whether the configuration file has an errorCopy the code
Configuration displayed successfully
Create a project
cd /root
mkdir www
cd www
vim index.html // Create the index.html file
Copy the code
Type the following (Hello World)
Save the exit
nginx // Start nginx server
Copy the code
Enter your IP address in your local browser and add /index.html to get a big hello World! The server configuration is complete
Note: If the access error check ali cloud security group – security group rules are configured
Configuration Jenkins
The installation
Start by downloading the Java dependencies and Git
yum install java
yum install git
Copy the code
The Jenkins source will be added first
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
Copy the code
yum install jenkins // Use yum to install Jenkins
Copy the code
configuration
Jenkins modify permissions
vim /etc/sysconfig/jenkins
Copy the code
Find $JENKINS_USER to “root” :
chown -R root:root /var/lib/jenkins
chown -R root:root /var/cache/jenkins
chown -R root:root /var/log/jenkins
Copy the code
service jenkins restart / / start Jenkins
Copy the code
Jenkins started successfully
Start the Jenkins
Enter your IP address and default port 8080 in your local browser to see the Jenkins unlock page
Create a task
Start configuring the first Jenkins task
The project structure
admin
html
home.html
js
home_page.js
css
home.css
Copy the code
rm -rf test.tar.gz
tar czvf test.tar.gz *
mv -f test.tar.gz /root/www
cd /root/www
tar -xzvf test.tar.gz
rm -rf test.tar.gz
Copy the code
Welcome to visit happy scavenger for more front-end knowledge!