Current location - Quotes Website - Collection of slogans - Linux open firewall command firewalldlinux open firewall command
Linux open firewall command firewalldlinux open firewall command
Linux startup command?

One: Start Nginx service-in sbin directory.

Start command:. /nginx

Close command:. /nginx-sstop and. /nginx- exit.

Refresh configuration file:. /Nginx-sreload (the configuration file nginx.conf will be reloaded every time it is modified).

Second: the process

Viewing process ps-ef|grep-ixxxx-i probably means to ignore, that is, ignore case.

Kill process kill-9xxxx

Three: firewall

Open the firewall serviceiptablesstart

Close the firewall service table to stop.

View the status of firewall serviceiptablesstatus

Turn off the firewall chkconfigiptablesoff permanently.

Four: Start the zookeeper service-in the bin directory of zookeeper.

Open zookeeper service:. /zkserver.sh start。

Check the status of city zoo. /zkServer.shstatus

Five: Start the redis service-in the bin directory of Redis.

Start in the background:. /redis-server../redis.conf (the following redis.conf path should be written according to the location where everyone's configuration files are stored).

Enter redis command service:. /redis-cli。

Input: ping If pong is returned, the connection is successful!

Intransitive verbs start tomcat service

The startup, shutdown and error tracking of tomcat service under Linux. After connecting to the server remotely with PuTTy, the tomcat service is usually started and closed in the following ways:

Switch to the bin directory (cdusr/local/tomcat/bin) under the Tomcat home directory.

1, start tomcat service.

Method 1: Start directly. /startup.sh

Method 2: Start nohup. /startup.sh as a service.

Mode 3: Start the console dynamic output mode. /catalina.shrun dynamically displays the console output information in tomcat background, and then exits and closes the service after CTRL+C.

Explanation:

Tomcat started by mode 1 and mode 3 has a disadvantage. When the client disconnects, the tomcat service will stop immediately, and it can always run as a linux service through mode 2.

Tomcat started by mode 1 and mode 2, its log will be written into the corresponding log file, and the output information and error situation of Tomcat console cannot be dynamically viewed. Tomcat service can be started in console mode through mode 3.

When the program is running, you can directly see the output information of the console in the background, so you don't have to bother to open the catalina.out log file every time, which is convenient for background tracking and consulting the output information. Tomcat console information includes output information such as log4j and System.out.println ().

2. Turn off the tomcat service

. /shutdown.sh

Seven > start the database:

Servicemysqldstart startup

Servicemysqldrestart restarts.

How to set up firewall for Linux server?

There are many kinds of firewalls in Linux, which are generally called iptables.

1.linux firewall (Iptables) restarts the system to take effect 12. On: chkconfigIptableson off: chkconfigiptablesoff2. Linux firewalls (iptables) take effect immediately, and will be invalid after restarting 12. open:serviceiptablesstart closes:serviceipablestop 3。 For other Linux firewalls, please refer to the documentation yourself. Generally, services under Linux can be turned on and off with the above commands. Firewalls generally operate as services, so it is a common method.

Linux6.0 modifies firewall settings?

Changing the firewall configuration of Linux system requires modifying the file /etc/sysconfig/iptables.

vim/etc/sysconfig/iptables

In the vim editor, you will see the following.

# firewall configurationwrittenbysystem-config-firewall

# manualizationofthisfileisnotrecommended。

* Filter

: Enter Accept

: Forward acceptance

: output accept

-ain put-mstate-state established,RELATED-jACCEPT

-AINPUT-picmp-jACCEPT

-AINPUT-ilo-jACCEPT

-a input-mstate-state new-mtcp-ptcp-d port 22-jACCEPT

-ain put-mstate-state new-mtcp-ptcp-dport 8080-jACCEPT

-ain put-mstate-state new-mtcp-ptcp-dport 3306-jACCEPT

-ain put-mstate-state new-mtcp-ptcp-dport 2 18 1-jACCEPT

-ainput-j reject-reject-with icmp-host-forbidden

-a forward-j reject-reject-with icmp-host-forbidden

commit a crime

Need to open the port, please add the following:

-ARH-Firewall- 1-INPUT-mstate-state new-mtcp-ptcp-dport 152 1-jACCEPT

Where 152 1 is the port number to be opened, and then restart the firewall service of linux.

Command to stop/start firewall service under Linux (used by root user):

serviceiptablesstopstop

Serviceiptablesstart-go

Write at the end:

# takes effect permanently and will not be restored after restarting.

Chkconfiguiptableson # on

Chkconfiguiptablesoff # off

# Effective immediately, and resumed after restart.

Serviceiptablesstart# on

Serviceiptablesstop# off

How to set open and disabled ports in linux firewall?

First, check which ports netstat-anp has opened. Second, close the port number: iptables-a input-ptcp-drop port number -jdropptitables-aoutput-ptcp-dport port number-jdrop. Third, open the port number: iptables-a input-ptcp-dport port number -jACCEPT. Four, the following is the use of linux open port command. NC-LP23 (telnet) netstat-an | grep23 (check whether to open port 23) V. linux open port command Each open port needs a corresponding listener to suit the learning path of entry. Please read "This is how Linux should learn".

What is the command to turn on and off the linux firewall?

The steps to turn off the firewall in LINUX system are as follows:

1. First, open the SSH software, and press Enter to prompt you to log in, and enter the IP and user name to log in.

2. Execute the command: /etc/init.d/iptablesstatus, and you will get a series of messages indicating that the firewall has been opened.

3. Execute the command: /etc/init.d/iptablesstop to stop the service.

4. Execute the command: chkconfig-levels 35 iptables off, close the firewall service and start it. This solves the problem of closing the firewall in LINUX system.