Classifying articles under Linux

I installed a docker today. I want to try the stress test with the service attached

I tried it on my own server ab Command, appear zsh: command not found: ab

Well, we need to install it, sudo yum search ab It's strange to tell me that there are no packages available

Find document


 sudo yum provides /usr/bin/ab
 Loading mirror speeds from cached hostfile
 * base:
 * elrepo:
 * epel:
 * extras:
 * updates:
httpd-tools-2.4.6-67.el7.centos.x86_ 64: tools for use with the Apache HTTP server 
 source: base 
 matching source: 
 file name / usr / bin / AB

use httpd-tools-2.4.6-67.el7.centos.x86_ sixty-four This bag name


 sudo yum install -y httpd-tools-2.4.6-67.el7.centos.x86_ sixty-four

Installation complete, mizzi

Update in the evening docker , Mastodon , Gitlab Related articles

Composer is a dependency management tool for PHP, which is similar to NPM package management in the front end

Today is how to install composer on Linux


Check the PHP version number. You can display the version number to continue the following operation

 php -v


First, prepare composer-setup.php

 php -r "copy('', 'composer-setup.php');"


Type in the shell interface( To install globally, add -- install dir = bin -- file name = composer )Global installation can ignore all subsequent operations

 php composer-setup.php


This step is effective for ordinary users, but root can also be used

 mv composer.phar /usr/local/bin/composer


You can check your composer version number at this time

 composer -v

It's a hostker. It's installed centos7.3 When the system is installed, it will be used netstat -antp Meow, network connection

find netstat output -bash: netstat: command not found

After checking, it is found that rhel7 is ready to abandon these commands. If they are abandoned, they should be discarded. I'll see how the new orders are replaced


This is to remember the rhythm of parameters!

OK, it's simple. I'll use it sooner or later. Now I'm familiar with it.

Ifconfig replacement

 ip addr

Transmission status (- s for detailed display)

 ip link

Netstat replacement


Netstat - ant (- the output of ANTP is not user-friendly)

 ss -ant

netstat -anu

 ss -anu

Traceroute / traceroute 6 replacement


Route replacement (- 6 for IPv6)

 ip route

Ifconfig eth0 up / down replacement

 ip l set eth0 up/down

Foundation: installation

server information

CentOS release 6.9 (Final)
Kernel r on an m


Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
1g, 1-core (alilaki cloud)

step 1

Here I use my big Taobao source

 #Enter the storage directory, I put it under / home / nodejs. Where do you like it? Download nodejs binary package WGet #Unzip the package 
 tar - xzvf node-v6.10.2-linux-x86.tar.gz ᦇ, get a folder node-v6.10.2-linux-x86. Enter bin directory 
 CD node-v6.10.2-linux-x86 / bin 
 to make sure that the downloaded nodejs version is correct 
. / node - V

step 2

Now you can only operate node in this directory, so we need to add it to the user environment

 #Take a look at the current directory 
 PWD ා add soft connection to / usr / local / bin 
 ln - S / home / nodejs / node-v6.10.2-linux-x86 / bin / node / usr / local / bin / node 
 ln - S / home / nodejs / node-v6.10.2-linux-x86 / bin / NPM / usr / local / bin / NPM

-Read the rest-

 I didn't find a good map, so I made a way to survive

Server configuration: Alibaba cloud, which is not very useful at hand

  1. System

CentOS 6.5 x86_ sixty-four

  1. Configuration

disk 40G
Peak 100Mbps (bandwidth on demand, I haven't seen it before, and there are still hundreds of volumes that have not been reduced)

Pre operation

Before installing steamcmd, you need to install the following, if it is not troublesome yum update Upgrade the system

CentOS x86_ 64( 64bit )

 yum install mailx postfix curl wget bzip2 gzip unzip python tmux glibc.i686 libstdc++ libstdc++.i686

CentOS x64( 32bit )

 yum install mailx postfix curl wget bzip2 gzip unzip python tmux libstdc++

Original words of steam course

Create a user account named steam to run SteamCMD safely, isolating it from the rest of the operating system. Do not run steamcmd while operating as the root user - to do so is a security risk.

It is best not to run steamcmd with the root user

Create user and create storage directory

 AddUser steam ා create a user named steam 
 passwd steam ා and set the password at will. Here, I don't have the permission to create files in the folder of survival Road 2. It is recommended to switch back to root to create 
 Cd ~ # to enter the user's root directory 
 MKDIR steamcmd ා to create a storage directory

Official yum install steamcmd I didn't succeed. My friends can have a try

 cd ~/steamCmd
wget linux.tar.gz
tar -zxvf steamcmd_ Linux. Tar. GZ ා to prevent decompression before downloading, this is a separate operation

Run steamcmd to install and survive 2


Run script


At this time, you will enter steamcmd

This is an anonymous login to steam to view the game that needs to log in with a user name. Find it here Here, here

Login with other user names Login user name

Here the road to survival 2 supports anonymous login, we use anonymous

 login anonymous

I didn't do the step of specifying the download directory. The default download directory is steam/steamapps/common/ inside

 force_ install_ dir /home/steam/l4d2

Take it with you when you download it validate The data downloaded by validation is missing or missing

 app_ update 222860 validate


Waiting for installation to complete

When the installation is completed, you will be prompted Success! App '222860' fully installed.

input exit or quit or Ctrl + C or Ctrl + Z sign out

Configure and run the way to survive 2

Open the configuration file directory under the directory of road to survival 2

 cd /home/steam/Steam/steamapps/common/Left 4 Dead 2 Dedicated Server/left4dead2/cfg

establish server.cfg configuration file

 hostname "Me WuHan School? "Host name SV"_ Cheats 1 enable cheating SV_ Region 4 ා the Asian server I set here (0 is global hot) 
 SV_ Steam group "2791593511845411016724628356" ා set steam group 
 SV_ steamgroup_ Exclusive 1 enable private group SV_ allow_ wait_ Command 0 no wait sb_ all_ bot_ Game 1 keep a computer SV_ Consistency 0 ා mod, you can play SV together if you are not the same_ search_ max_ Ping 300 ᦇ over 300ping, you can't find me (if you turn off the private group) 
 FPS_ Max 72 ා limit fps72 බ Z_ Difficulty hard ා turn on difficult mode

Open the directory of road to survival 2

 cd /home/steam/Steam/steamapps/common/Left 4 Dead 2 Dedicated Server/

Administrator rights create a startup script

 nano l4d2_

The contents are as follows:

 ./srcds_ Run - game left4dead2 - Secure + IP - port 25566 - condebug + exec server. CFG ﹖ I add IP here because the program gets to alicloud's intranet address. I specify the port specified by 
 - port, and the personalized service 
 - condebug records the damage process of bear children

OK, run it~


By the way, aliyun spicy chicken