Blog: bugstack.cn

Precipitation, share, grow, let yourself and others can gain something! 😄

One, foreword

Given a server, can you deploy your code online?

It’s common to hear the phrase, “To keep r&d focused on business development, we did x!” You don’t need to worry about the system construction, technical framework, core components, common modules and online applications. You don’t know how to deploy an application server, open a port, apply for a domain name, and configure SSL. Therefore, for most people, you become more and more like a tool person in a single position in the workshop. If you want to go to a higher position in the company or want to do something out of the company, it will become your bottleneck!

A complete set of competencies, what should be covered?

  • When we take on a requirement from birth to launch, the roles we will probably experience in this process include: Business, operations, products, data, research and development (UI), test, and operations, products using the data and models, quantitative requirements put forward by the business, how to iterative implementation, meet the operation used to complete the business objectives, by UI, front and back end development, test again to complete the project development and validation and deployment to operational configuration of the online environment.
  • Stood on the programmer’s role in the whole process, in fact, a large part of the developers can only within the scope of the programming development interaction, from a technical role is the nearest online test and deployment, but if you allow development to deployment test environment, build online environment will be very difficult, not to say that technical level how hard it is, but it is almost no experience, I didn’t think to do it.
  • In the business, operations, products, data model, algorithm and quantify, may further, in this part of r&d staff didn’t know because what scene, put forward what purpose, how do the evaluation, put forward the means and how to fall to the ground, and to research and development that can see may simply be waiting for the execution of PRD, because of always, always Hence the saying, “You might not be able to do anything if you leave!”

Next, let me tell you something about my passion. It not only broadens the scope of my technical vision, but also gives you some unexpected gains.

Two, the money spent on servers!

You can spend some money on that, even if you do, it won't cost much!

Master Tang said, spend some money, I heard!

In fact, I have never been stingy with spending on technical learning, or wasting my time on other part-time jobs where I can’t grow in the long run. Since graduation work 13 years, because of less money, sharing a few partners also somebody will go out and find some part-time jobs to make money, I belong to that kind of not only don’t have the weekend to make money, also the additional saving money to buy the domain name and server, from the earliest of the host has BCH house began to baidu cloud services, also seen seven NiuYun also used baidu cloud storage, We spent tens of thousands on the server all the way down.

What did the money buy? I bought a bunch of domain names, including: Itstack.org, Yuyueqianli.com, fuzhengwe.cn, linuxjar.org, iteuds. Cn, bugstack.cn, etc. What about servers? Server in addition to normal consumption, but also buy lifelong!!

Although, spent A lot of money, but also because of these consumption and constant inversion, let me learn domain name registration, domain name record, domain name configuration (A record, CNAME record, TXT), certificate application, service building, pagoda application, configuration environment, Linux command and so on. When you have a specific thing to do, you will follow this path as a guide, constantly search for relevant information and practice artificial!

Artificial, the first can see the past forum, with a little flow!

  • However, due to the failure of some rogue attacks and org domain name registration, the small forum was eventually suspended on the road.
  • But the good news is that the site is not in vaindie, and learned a lot from the inside, including: deployment, online, ops, found in the operational process of some traffic spikes, caching, treatment, prevention and brush, prevent hotlinking, user registration associated with QQ, transform the original PHP code, support some function, and so on, hanging just website, but leave the technical experience!

Three, the money spent to earn back!

How did I get my money back?

After I built forums, blogs and post bar functions and gradually had some, people began to contact me if I could make a website or corporate portal for them. At that time, I was still in the traditional industry, but I also had a lot of spare time. I could get off work at 5:30 every day, so of course I had time to do it. Good! Say dry dry, a meal of operation, 2 years to receive a lot of private work, but also made tens of thousands of pieces, is the server, domain name money are earned back, but also not in vain!

1. Enterprise Portal (5,000 yuan)

  • Index: ⭐ ⭐ ⭐ ⭐
  • Background: When I just started working for about a year, my high school classmate asked me if I could help their company build a website by learning computer, just imitating the style of Lao Luo’s hammer company, 5,000 yuan.
  • Result: I received, may also be a novice is not afraid of tiger, the somebody else needs to use PHP language to write! I learn Java, wrote a fast year of C#, after using PHP to do an enterprise portal website to the other people, the courage to say not quite big!
  • Achievement: The project was successfully deployed and 5,000 yuan was obtained as promised. I bought my first iPhone 4S, which is still with me.

2. Furniture promotion website (2,000 yuan)

  • Index: ⭐ ⭐ ⭐
  • background: at the beginning of 14 years, relatives opened a small workshop that makes aquatic animals box, also be informed that I am to learn to calculate. A lot of people came to me and told me to do a website promoting their company’s productsIt’s too expensive to get someone to do it outside!.
  • Result: 💰 money za also embarrassed want, just server and domain name wait for cost of money want, however later gave me a big red envelope 2000 yuan, hey hey, hand a shake, received!
  • Gain: THANKS to the fact that I had already taken over a project, PHP was also easy to develop. I made a website layout in the style of Diandian according to the style they liked at that time. I paid the rent this time!

3. Netty Communication Framework (2000 yuan)

  • Index: ⭐ ⭐ ⭐
  • Background: Around 14 years, began to like Netty. Maybe there wasn’t much on the Internet at the time, and a lot of people came to me because I wrote a whole set of Netty cases. Can I write a Netty communication framework no, 2000 yuan.
  • Result: This was also the first time that money was made in Java instead of PHP. It’s easy for me. I finish it at 5:30 when I get home from work, and I finish it the next day.
  • Takeaway: Knowledge can really be money, especially if it’s a little harder and there aren’t many people involved.

4. Lectures and data collection (11,000 yuan)

In addition to the private work received above, but also received a lot of small work.

  • Undergraduate design guidance, 1000 yuan. From pig eight Quit network.
  • Graduate encryption algorithm, 2000 yuan. A fellow graduate student designed it with me and gave me money to apply for it from their school.
  • Online lecture to a student, as if a day is 50 yuan, in the future fast 1 month, 1000 yuan.
  • A logistics data integrated platform, in fact, not many functions, a bit like recording foreign trade orders, 5000 yuan.
  • Assisted a boss who took over a project by himself, wrote part of the Netty coding and decoding code for a week, and connected with the next computer. 2000 yuan.

In this way, seven seven eight in those two years, made more than 20,000 yuan. Of course, there are some small income, less than 1000. There are also cheated, such as people get the project will not give money or get a screenshot “I did not add watermark”, people enough demo, also do not give money.

Four, make a server how to use?

Next, show you how to use a server!

For a school, or is already working, but never understand or contact with the server configuration, and how to run their own code on the server. Check out the tutorial below to get you started on deploying your own code to the server.

It is a virtual computer that runs 24 hours a day and does not break down. You can practice network programming (with public IP), transfer server, and the following:

  1. A blog: mp.weixin.qq.com/s/ZoQ0xAphJ…
  2. Develop forums: PHPWind, Discuz, wordpress(have blog and forum templates, etc.)
  3. Get a network backup: mp.weixin.qq.com/s/gzUrFexHc…
  4. Chat rooms: mp.weixin.qq.com/s/OmXCY4fTf…
  5. Other things: Practice your project, form a cluster, play ES, play the game, save the demo for someone else

And these content exercises, can let you play through a set of content from research and development to operation and maintenance, a thorough understanding of domain name, record, SSL, pagoda, Linux common commands and so on.

1. Neng a server first

First of all, no matter whether you have a server or not, you can learn about the use of the server with Xiao Fu Ge. We have built a group dedicated learning server, add my wechat: Fustack, note: server learning group.

If you are still a new user xiaobai, then you can follow my process together, first neng a cheap server, learn to use it. Here small fu ge to new people to get an activity, 79 yuan can buy a year of validity of the server, or much cheaper than I bought before!

  • When you buy a server, you see,regional,The instance,The operating systemEtc., regional Beijing, Shanghai, Hangzhou’s network speed is better, Zhangjiakou’s cheap but the network speed will be slower. Operating system default, can be replaced after downtime.

2. Server Introduction

After purchasing the server, wait a few minutes for the cloud platform to initialize the service and then use the configuration directly. As follows:

  • Reset password: Click on your instance, the blue letter, enter and there is one to the right,Resetting the instance passwordAnd operation.
  • Remote link: ClickThe remote linkCan link to your service, it is an online operation. You can link to the service through the native software Xshell.
  • Change the system: If you are not satisfied with your default system or have other requirements, you can click stop system and start the operating system change.

3. Replace the system with pagoda mirroring

For the server system, you can use Linux commands to install various service components, such as K8S, Docker, JDK, Tomcat, mysql or PHP, etc., but for the actual operation and maintenance, we prefer the operation and maintenance cost as low as possible, so we choose pagoda here. Such a server operations panel to manage our servers.

In all kinds of cloud platforms, including: Baidu cloud, Huawei cloud, Ali cloud, Tencent cloud, can install pagoda, some cloud platforms will have their own pagoda image has been prepared, here we take Ali cloud service as an example, the system shutdown is better for pagoda.

downtime

  • Location: Click on an instance of a cloud service to take you to this page
  • Operation: Before replacing the system, we need to stop the machine first. After stopping the machine, we can click to replace the operating system

In the system

Optional mirror

  • After replacing the system, confirm the order, and then jump to the management background. At this moment, the server will start.

4. Configure and log in to the pagoda

Remote login

  • In this step, we directly log in to the web page. You can also use Xshell to log in to the public IP address

Initialize the pagoda

Command: [root@CodeGuide ~]# bt default

Configuring a Security Group

  • Port 8888 must be configured to access the pagoda, otherwise it cannot be accessed. This port can be opened in the security group of the server.
  • Here we directly open all for convenience, if you are the actual use, can not operate like this, otherwise very unsafe!

Log on to the pagoda

  • Address:39.96.73. XXX: 8888 / – Change it to your address
  • Account: The username and password are printed on the console, you can copy your own and change the default password after logging in to the pagoda

5. Install Apache and FTP

Next we install an Apache server and FTP in the pagoda so that we can deploy and access our static blog, which is an HTML, as follows:

Install the Apache

  • The installation process will automatically execute some commands, which you do not need to worry about, just silently watch.

Install the FTP

  • The main purpose of installing FTP is to transfer files to the server locally. For example, if your static blog is HTML, it can be uploaded to the server via FTP.

6. Website configuration

With apache and FTP installed, we can easily configure a site that can access our own blogs!

To create the site

  • If you haven’t applied for a domain name yet, or if you haven’t filed a domain name yet, you can simply enter the public IP address.

Access to the site

  • Address: http://39.96.73.167/ When accessing, you can use your own IP address

7. Site content

  • In the Pagoda file, you can select the site you added in step 6, find your file there, and make some changes. At this time when visiting the website, you will find that the content is already your new content.

8. Configure the domain name

If you have a domain name and have it registered, you can configure the domain name directly when you create your site and use it when you visit your site.

  • Add domain name: this inside small fu ge configuration is already applied for and put on record of the domain name, you can configure yours. Remember that after configuring the domain name, you need to configure the server IP mapping through the A record in your domain name service.
  • FTP configuration: To make it easier to upload your files, you can turn on FTP so that you can transfer your configuration through FTP.
  • Visit address:blog.itedus.cn – Since the domain name is not in Ali Cloud, HTTP may monitor as unrecorded and deny access

9. The SSL configuration

SSL application can be provided by many free websites, or you can apply in pagoda. If you use Ali Cloud service, you can apply for 20 SSL certificates for free. In addition, if your domain name and service are in Ali Cloud, you can directly go through DNS authentication when applying for SSL. Otherwise you need to manually configure DNS information to your own domain name. Rest assured that this will be prompted when applying, just follow the instructions to configure

Download the certificate

Since we need to configure SSL on the pagoda, we need to download SSL and select Apache format.

Certificate of configuration

  • Click save after configuration. In addition, you need to force HTTPS on, otherwise your website can continue to access HTTP, there is no point.
  • Now you can access your blog or website via HTTPS, and it doesn’t look so much better!

10. Other instructions

You may also want to configure JDK, Tomcat, it doesn’t matter, in the pagoda you can install, also can install mysql, with these basic content, the rest can search for some general configuration content, also can search in Ali Cloud.

Five, the summary

  • This article mainly introduces what knowledge points and content can expand your knowledge area about some technical growth, and some operation knowledge about the operation and maintenance server. With such a basic operation to get you started, you can then expand to search for many other things to refine some of your deployments.
  • In addition, this article does not introduce the domain name registration and filing, these content is very easy, you only need to search the cloud platform domain name or Baidu domain name registration, you can find a registration entrance. Generally.cn domain name is relatively cheap, many other domain name renewal is more expensive, in addition, such as.org can not be recorded, so do not choose too Gru domain name.
  • Knowledge like this must be hands-on to learn things, you may encounter all kinds of problems in the process, it doesn’t matter, these questions can be searched.

Six, series recommendation

  • I said no one can limit my capacity and speed!
  • On March 27th, Github was attacked. My GitPage blog is also down, emergency repair road, also teach you to build Jekyll blog!
  • In order to transfer Github fans to the public account, I did the public account development and deployed to the cloud service
  • Hexo, Docsify, Jekyll, Vuepress, blog building guide
  • Graduated in 2013, from outsourcing to Internet factory in two years