小程序页面之间进行传值的操作办法
636
2022-09-25
centos之初体验
最近安装了个centos操作系统。感觉用着还不错,在此需要感谢cnbird对我的指导,以及他所作的 linux安全加固教程!在此表示感谢!
至于centos的安装请加入网络大工QQ群,在群里面有文本安装centos操作系统的详细视频教程!
这里以安装完成centos操作系统开始!
启动centos界面如下:
一般的服务器都是托管的,而利用telnet上去比较消耗内存,也不利于管理。所以我们选择远程连接工具SecureCRT 。
有人或许又会问我到哪里去-SecureCRT 呢?
我不能告诉你迅雷里面就有,而且我也不能告诉你,迅雷里面还有破解的。
说到这里大家都应该明白该怎么办了吧。
这里我们简单设置下就可以远程到centos主机。
首先查看下centos的主机网络地址使用ifconfig eth0 可以查看到 如图:
然后设置SecureCRT 就可以直接ssh上去。
连接之后如图:
之后在secureCRT上操作也就相当于在本地操作了。
好了,闲话少说,我们进入第一个命令的学习man。
man文档是一个非常重要的帮助文档,但这又常常是技术人员常常忘记的一种方式。
比如说我们要差关于yum的用法可以使用 man yum来查看
这里就列出了yum的详细用法
安装完一个服务器的之后 首先要做的就是升级操作系统。这里我们可以使用 yum update 命令
更新完了之后,会提示是否安装,输入Y即可。
关闭不必要的端口,那么这里就需要用到用什么命令来查看本地开放的端口呢。
使用netstat -an 命令来查看
[root@localhost ~]# netstat -anActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:644 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 192.168.1.105:56873 61.110.198.174:80 TIME_WAIT tcp 0 0 :::22 :::* LISTEN tcp 0 0 ::ffff:192.168.1.105:22 ::ffff:192.168.1.102:2068 ESTABLISHED udp 0 0 0.0.0.0:641 0.0.0.0:* udp 0 0 0.0.0.0:54055 0.0.0.0:* udp 0 0 0.0.0.0:68 0.0.0.0:* udp 0 0 0.0.0.0:5353 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* udp 0 0 0.0.0.0:631 0.0.0.0:* udp 0 0 0.0.0.0:638 0.0.0.0:* udp 0 0 :::5353 :::* udp 0 0 :::45809 :::* Active UNIX domain sockets (servers and established)Proto RefCnt Flags Type State I-Node Pathunix 2 [ ACC ] STREAM LISTENING 8052 /tmp/.font-unix/fs7100unix 2 [ ACC ] STREAM LISTENING 9432 @/tmp/fam-root-unix 2 [ ACC ] STREAM LISTENING 5947 /var/run/setrans/.setrans-unixunix 2 [ ACC ] STREAM LISTENING 6495 /var/run/audispd_eventsunix 2 [ ] DGRAM 1494 @/org/kernel/udev/udevdunix 2 [ ACC ] STREAM LISTENING 6976 /var/run/dbus/system_bus_socketunix 2 [ ACC ] STREAM LISTENING 8245 @/var/run/hald/dbus-qXR2dhEA1Tunix 2 [ ACC ] STREAM LISTENING 7057 /var/run/sdpunix 2 [ ACC ] STREAM LISTENING 7178 /var/run/pcscd.communix 2 [ ACC ] STREAM LISTENING 7342 /var/run/acpid.socketunix 2 [ ACC ] STREAM LISTENING 7450 /var/run/cups/cups.sockunix 2 [ ] DGRAM 8253 @/org/freedesktop/hal/udev_eventunix 2 [ ACC ] STREAM LISTENING 8244 @/var/run/hald/dbus-bLZwz6mHGVunix 2 [ ACC ] STREAM LISTENING 8199 /var/run/avahi-daemon/socketunix 17 [ ] DGRAM 6573 /dev/logunix 2 [ ACC ] STREAM LISTENING 9816 /tmp/ssh-caXIjO2766/agent.2766unix 2 [ ACC ] STREAM LISTENING 7675 /dev/gpmctlunix 2 [ ] DGRAM 9798 unix 3 [ ] STREAM CONNECTED 9435 @/tmp/fam-root-unix 3 [ ] STREAM CONNECTED 9434 unix 3 [ ] STREAM CONNECTED 9421 /var/run/dbus/system_bus_socketunix 3 [ ] STREAM CONNECTED 9420 unix 3 [ ] STREAM CONNECTED 8958 /var/run/dbus/system_bus_socketunix 3 [ ] STREAM CONNECTED 8957 unix 3 [ ] STREAM CONNECTED 8926 @/var/run/hald/dbus-bLZwz6mHGVunix 3 [ ] STREAM CONNECTED 8925 unix 3 [ ] STREAM CONNECTED 8791 @/var/run/hald/dbus-bLZwz6mHGVunix 3 [ ] STREAM CONNECTED 8790 unix 3 [ ] STREAM CONNECTED 8783 /var/run/acpid.socketunix 3 [ ] STREAM CONNECTED 8782 unix 3 [ ] STREAM CONNECTED 8775 @/var/run/hald/dbus-bLZwz6mHGVunix 3 [ ] STREAM CONNECTED 8773 unix 3 [ ] STREAM CONNECTED 8248 @/var/run/hald/dbus-qXR2dhEA1Tunix 3 [ ] STREAM CONNECTED 8247 unix 3 [ ] STREAM CONNECTED 8202 /var/run/dbus/system_bus_socketunix 3 [ ] STREAM CONNECTED 8201 unix 3 [ ] STREAM CONNECTED 8196 unix 3 [ ] STREAM CONNECTED 8195 unix 2 [ ] DGRAM 8193 unix 2 [ ] DGRAM 8085 unix 2 [ ] DGRAM 7706 unix 2 [ ] DGRAM 7669 unix 2 [ ] DGRAM 7638 unix 2 [ ] DGRAM 7589 unix 2 [ ] DGRAM 7504 unix 2 [ ] DGRAM 7276 unix 2 [ ] DGRAM 7223 unix 2 [ ] DGRAM 7177 unix 3 [ ] STREAM CONNECTED 7065 /var/run/dbus/system_bus_socketunix 3 [ ] STREAM CONNECTED 7064 unix 2 [ ] DGRAM 7033 unix 2 [ ] DGRAM 7023 unix 3 [ ] STREAM CONNECTED 6993 unix 3 [ ] STREAM CONNECTED 6992 unix 3 [ ] STREAM CONNECTED 6914 unix 3 [ ] STREAM CONNECTED 6913 unix 2 [ ] DGRAM 6768 unix 2 [ ] DGRAM 6581 unix 3 [ ] STREAM CONNECTED 6480 unix 3 [ ] STREAM CONNECTED 6479
可是查看下来的结果是太多了,那么有没有什么看起来简单一点的方法呢,答案是显然的。
我们在后面修改一个参数也就是netstat -tnl 。t代表的是tcp协议也可以用u代替,l代表的是listen
[root@localhost /]# lsof -i|moreCOMMAND PID USER FD TYPE DEVICE SIZE NODE NAMEdhclient 1973 root 4u IPv4 6235 UDP *:bootpc portmap 2129 rpc 3u IPv4 6672 UDP *:sunrpc portmap 2129 rpc 4u IPv4 6677 TCP *:sunrpc (LISTEN)rpc.statd 2158 rpcuser 3u IPv4 6778 UDP *:repcmd rpc.statd 2158 rpcuser 6u IPv4 6769 UDP *:mcns-sec rpc.statd 2158 rpcuser 7u IPv4 6786 TCP *:dwr (LISTEN)sshd 2412 root 3u IPv6 7397 TCP *:ssh (LISTEN)cupsd 2427 root 4u IPv4 7449 TCP localhost.localdomain:ipp (LISTEN)cupsd 2427 root 6u IPv4 7452 UDP *:ipp sendmail 2467 root 4u IPv4 7594 TCP localhost.localdomain:smtp (LISTEN)avahi-dae 2591 avahi 13u IPv4 8207 UDP *:mdns avahi-dae 2591 avahi 14u IPv6 8208 UDP *:mdns avahi-dae 2591 avahi 15u IPv4 8209 UDP *:54055 avahi-dae 2591 avahi 16u IPv6 8210 UDP *:45809 sshd 2766 root 3u IPv6 9600 TCP 192.168.1.105:ssh->192.168.1.102:avauthsrvprtcl (ESTABLISHED)
chkconfig
我们首先man chkconfig来看下chkconfig的用法
我们使用chkconfig --list来查看系统服务的状态
[root@localhost ~]# chkconfig --listNetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:offacpid 0:off 1:off 2:off 3:on 4:on 5:on 6:offanacron 0:off 1:off 2:on 3:on 4:on 5:on 6:offapmd 0:off 1:off 2:on 3:on 4:on 5:on 6:offatd 0:off 1:off 2:off 3:on 4:on 5:on 6:offauditd 0:off 1:off 2:on 3:on 4:on 5:on 6:offautofs 0:off 1:off 2:off 3:on 4:on 5:on 6:offavahi-daemon 0:off 1:off 2:off 3:on 4:on 5:on 6:offavahi-dnsconfd 0:off 1:off 2:off 3:off 4:off 5:off 6:offbluetooth 0:off 1:off 2:on 3:on 4:on 5:on 6:offcapi 0:off 1:off 2:off 3:off 4:off 5:off 6:offclvmd 0:off 1:off 2:off 3:off 4:off 5:off 6:offcman 0:off 1:off 2:off 3:off 4:off 5:off 6:offconman 0:off 1:off 2:off 3:off 4:off 5:off 6:offcpuspeed 0:off 1:on 2:on 3:on 4:on 5:on 6:offcrond 0:off 1:off 2:on 3:on 4:on 5:on 6:offcups 0:off 1:off 2:on 3:on 4:on 5:on 6:offdc_client 0:off 1:off 2:off 3:off 4:off 5:off 6:offdc_server 0:off 1:off 2:off 3:off 4:off 5:off 6:offdhcdbd 0:off 1:off 2:off 3:off 4:off 5:off 6:offdnsmasq 0:off 1:off 2:off 3:off 4:off 5:off 6:offdovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:offdund 0:off 1:off 2:off 3:off 4:off 5:off 6:offfirstboot 0:off 1:off 2:off 3:on 4:off 5:on 6:offgfs 0:off 1:off 2:off 3:off 4:off 5:off 6:offgfs2 0:off 1:off 2:off 3:off 4:off 5:off 6:offgpm 0:off 1:off 2:on 3:on 4:on 5:on 6:offhaldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:offhidd 0:off 1:off 2:on 3:on 4:on 5:on 6:off 0:off 1:off 2:off 3:off 4:off 5:off 6:offibmasm 0:off 1:off 2:off 3:off 4:off 5:off 6:offinnd 0:off 1:off 2:off 3:off 4:off 5:off 6:offip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:offiptables 0:off 1:off 2:on 3:on 4:on 5:on 6:offirda 0:off 1:off 2:off 3:off 4:off 5:off 6:offirqbalance 0:off 1:off 2:on 3:on 4:on 5:on 6:offisdn 0:off 1:on 2:on 3:on 4:on 5:on 6:onkudzu 0:off 1:off 2:off 3:on 4:on 5:on 6:offlvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:offmcstrans 0:off 1:off 2:on 3:on 4:on 5:on 6:offmdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:offmdmpd 0:off 1:off 2:off 3:off 4:off 5:off 6:offmessagebus 0:off 1:off 2:off 3:on 4:on 5:on 6:offmicrocode_ctl 0:off 1:off 2:on 3:on 4:on 5:on 6:offmultipathd 0:off 1:off 2:off 3:off 4:off 5:off 6:offnamed 0:off 1:off 2:off 3:off 4:off 5:off 6:offnetconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:offnetfs 0:off 1:off 2:off 3:on 4:on 5:on 6:offnetplugd 0:off 1:off 2:off 3:off 4:off 5:off 6:offnetwork 0:off 1:off 2:on 3:on 4:on 5:on 6:offnfs 0:off 1:off 2:off 3:off 4:off 5:off 6:offnfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:offnscd 0:off 1:off 2:off 3:off 4:off 5:off 6:offoddjobd 0:off 1:off 2:off 3:off 4:off 5:off 6:offopenais 0:off 1:off 2:off 3:off 4:off 5:off 6:offpand 0:off 1:off 2:off 3:off 4:off 5:off 6:offpcscd 0:off 1:off 2:on 3:on 4:on 5:on 6:offportmap 0:off 1:off 2:off 3:on 4:on 5:on 6:offpsacct 0:off 1:off 2:off 3:off 4:off 5:off 6:offqdiskd 0:off 1:off 2:off 3:off 4:off 5:off 6:offrdisc 0:off 1:off 2:off 3:off 4:off 5:off 6:offreadahead_early 0:off 1:off 2:on 3:on 4:on 5:on 6:offreadahead_later 0:off 1:off 2:off 3:off 4:off 5:on 6:offrestorecond 0:off 1:off 2:on 3:on 4:on 5:on 6:offrpcgssd 0:off 1:off 2:off 3:on 4:on 5:on 6:offrpcidmapd 0:off 1:off 2:off 3:on 4:on 5:on 6:offrpcsvcgssd 0:off 1:off 2:off 3:off 4:off 5:off 6:offrwhod 0:off 1:off 2:off 3:off 4:off 5:off 6:offsaslauthd 0:off 1:off 2:off 3:off 4:off 5:off 6:offscsi_reserve 0:off 1:off 2:off 3:off 4:off 5:off 6:offsendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:offsmartd 0:off 1:off 2:on 3:on 4:on 5:on 6:offsmb 0:off 1:off 2:off 3:off 4:off 5:off 6:offspamassassin 0:off 1:off 2:off 3:off 4:off 5:off 6:offsquid 0:off 1:off 2:off 3:off 4:off 5:off 6:offsshd 0:off 1:off 2:on 3:on 4:on 5:on 6:offsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:offtux 0:off 1:off 2:off 3:off 4:off 5:off 6:offvsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:offwinbind 0:off 1:off 2:off 3:off 4:off 5:off 6:offwpa_supplicant 0:off 1:off 2:off 3:off 4:off 5:off 6:offxfs 0:off 1:off 2:on 3:on 4:on 5:on 6:offxinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:offypbind 0:off 1:off 2:off 3:off 4:off 5:off 6:offyum-updatesd 0:off 1:off 2:off 3:on 4:on 5:on 6:offxinetd based services: chargen-dgram: off chargen-stream: off cvs: off daytime-dgram: off daytime-stream: off discard-dgram: off discard-stream: off echo-dgram: off echo-stream: off eklogin: off ekrb5-telnet: off gssftp: off klogin: off krb5-telnet: off kshell: off rsync: off tcpmux-server: off time-dgram: off time-stream: off
倘若我们要关闭isdn的level 123456的话又该怎么做呢?
我们可以使用chkconfig --level 123456 isdn off 就可以
那么关闭了又该如何启动呢?
那就是chkconfig --level 123456 isdn on
我们在用chkconfig |grep isdn来查看是否关闭了isdn服务
如果不适用命令行的话,我们可以使用ntsysv命令来进行图形化界面的操作。
这里就不多做介绍了,图形界面很容易理解!
今天就写到这里吧!
(菜鸟写博,老鸟飞过。欢迎拍砖,深入交流!)
多吃东西多喝水,
少玩游戏少睡觉! -------珏石头
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~