CentOS7系统搭建LAMP及更新PHP版本操作详解(2)

  1. 查看服务器IP
[root@localhost /]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
  inet6 ::1/128 scope host 
    valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
  link/ether 00:0c:29:56:bc:cf brd ff:ff:ff:ff:ff:ff
  inet 192.168.5.133/24 brd 192.168.8.255 scope global ens33
    valid_lft forever preferred_lft forever
  inet6 fe80::20c:29ff:fe56:bccf/64 scope link 
    valid_lft forever preferred_lft forever
3: bridge0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
  link/ether ea:89:d5:c7:32:73 brd ff:ff:ff:ff:ff:ff
  1. 浏览器登陆查看
    在这里插入图片描述
安装mysql
  1. 安装mysql
[root@localhost /]# yum install mariadb mariadb-server mariadb-libs mariadb-devel
[root@localhost /]# rpm -qa |grep maria
mariadb-libs-5.5.52-1.el7.i686
mariadb-5.5.52-1.el7.i686
mariadb-server-5.5.52-1.el7.i686
mariadb-devel-5.5.52-1.el7.i686
  1. 开启Mysql,并设置开机启动,检查状态
[root@localhost /]# systemctl start mariadb 
[root@localhost /]# systemctl enable mariadb 
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@localhost /]# systemctl status mariadb 
● mariadb.service - MariaDB database server
  Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Active: active (running) since 六 2017-07-22 21:19:20 CST; 21s ago
 Main PID: 9603 (mysqld_safe)
  CGroup: /system.slice/mariadb.service
      ├─9603 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
      └─9760 /usr/libexec/mysqld --basedir=/usr --datadir=/v...

7月 22 21:19:15 nmserver-7.test.com mariadb-prepare-db-dir[9524]: ...
7月 22 21:19:15 nmserver-7.test.com mariadb-prepare-db-dir[9524]: ...
7月 22 21:19:15 nmserver-7.test.com mariadb-prepare-db-dir[9524]: ...
7月 22 21:19:15 nmserver-7.test.com mariadb-prepare-db-dir[9524]: ...
7月 22 21:19:15 nmserver-7.test.com mariadb-prepare-db-dir[9524]: ...
7月 22 21:19:15 nmserver-7.test.com mariadb-prepare-db-dir[9524]: ...
7月 22 21:19:15 nmserver-7.test.com mariadb-prepare-db-dir[9524]: ...
7月 22 21:19:16 nmserver-7.test.com mysqld_safe[9603]: 170722 21...
7月 22 21:19:16 nmserver-7.test.com mysqld_safe[9603]: 170722 21...
7月 22 21:19:20 nmserver-7.test.com systemd[1]: Started MariaDB ...
  1. 查看监听状态
[root@localhost /]# netstat -tulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address      Foreign Address     State    PID/Program name  
tcp    0   0 0.0.0.0:ssh       0.0.0.0:*        LISTEN   1084/sshd      
tcp    0   0 0.0.0.0:mysql      0.0.0.0:*        LISTEN   9760/mysqld     
tcp6    0   0 [::]:ssh        [::]:*         LISTEN   1084/sshd      
tcp6    0   0 [::]:http        [::]:*         LISTEN   2449/httpd     
udp    0   0 localhost:323      0.0.0.0:*              592/chronyd     
udp6    0   0 localhost:323      [::]:*               592/chronyd 

      

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/1850.html