OSTEP GCC 编译报错 undefined reference to `pthread_create'

Issue

[root@host1 Code-Intro]# gcc -o cpu cpu.c -Wall
/tmp/ccG1P1Rf.o: In function `Pthread_create':
cpu.c:(.text+0xce): undefined reference to `pthread_create'
/tmp/ccG1P1Rf.o: In function `Pthread_join':
cpu.c:(.text+0x11a): undefined reference to `pthread_join'
collect2: ld returned 1 exit status

Resolution

[root@host1 Code-Intro]# gcc -o cpu cpu.c -Wall -lpthread
(add "-lpthread" option.)

RHEL7: MariaDB的简单安装与使用

安装

[root@s1 ~]# yum group install mariadb mariadb-client -y

[root@s1 ~]# systemctl enable mariadb.service

[root@s1 ~]# systemctl start mariadb.service

[root@s1 ~]# mysql_secure_installation
Set root password? [Y/n] Y
New password: 
Re-enter new password: 
(按默认配置一路回车下去就行)

[root@s1 ~]# firewall-cmd --permanent --add-service=mysql
[root@s1 ~]# firewall-cmd --reload 

[root@s1 ~]# ss -tulnp | grep mysql
tcp    LISTEN     0      50                     *:3306                  *:*      users:(("mysqld",10844,13))

继续阅读“RHEL7: MariaDB的简单安装与使用”