分类 System 下的文章 - Thanatos

System

Upgrade OpenSSH

rpm -qa|grep openssh|xargs rpm -e
rpm -qa|grep openssl-devel|xargs rpm -e
mv /etc/ssh /etc/ssh.bak
cd /opt/openssl-1.1.1g
make install
cd /opt
tar xvf openssh-8.4p1.tar.gz
cd /opt/openssh-8.4p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-zlib --without-openssl-header-check --with-ssl-dir=/usr/local/openssl --with-privsep-path=/var/lib/sshd
make
make install
install -v -m755 contrib/ssh-copy-id /usr/bin
install -v -m644 contrib/ssh-copy-id.1 /usr/share/man/man1
install -v -m755 -d /usr/share/doc/openssh-8.4p1
install -v -m644 INSTALL LICENCE OVERVIEW README* /usr/share/doc/openssh-8.4p1
ssh -V
echo 'X11Forwarding yes' >> /etc/ssh/sshd_config
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
cp -p contrib/redhat/sshd.init /etc/init.d/sshd
chmod +x /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
chkconfig --list sshd
service sshd restart

CentOS Join Windows Active Drirectory(AD)

 yum install krb5-libs krb5-devel pam_krb5 krb5-workstation krb5-auth-dialog samba-winbind samba samba-common samba-client samba-winbind-clients realmd oddjob oddjob-mkhomedir sssd adcli openldap-clients policycoreutils-python samba-common samba-common-tools krb5-workstation
vim /etc/sysconfig/network
realm discover-v domain
setup
vim /etc/resolv.conf
 realm
hostnamectl
hostnamectl set-hostname hostname.domain
hostname
hostnamectl
realm join domain
realm
realm join domain user username
realm join domain
cat /etc/sssd/sssd.conf
id user@domain
vim /etc/sudoers

CentOS7安装php5.3.29开启MySQL扩展的一些坑

今天下班时间一位群友咨询php安装事宜,看了下问题应该不难,在解决过程中碰到了一些坑,具体过程如下
环境:
System Version:CentOS7.6
Old PHP Version:php5.4
Install PHP Version:php5.3.29
config parameter

./configure  --prefix=/usr/local/php53 --with-config-file-path=/usr/local/php53/etc --enable-mysqlnd --with-mysqli=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-freetype-dir --with-gd --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-mcrypt --with-iconv --with-mhash --with-curl --enable-fpm --with-mysql

报错如下
QQ图片20201201201420.png

在查看依赖后发现libmysqlclient已在系统里面安装,可能是相关lib库指向问题遂重新指向发现
在/usr/lib/下没有mysql目录,手动创建后再次指向,重新编译发现还是不行,报相同错误,
最后创建软链接时去掉了库文件版本,问题得到解决。
原:ln -s /usr/lib64/mysql/libmysqlclient.so.18.0.0 /usr/lib/mysql/libmysqlclient.so.18.0.0
修正后:ln -s /usr/lib64/mysql/libmysqlclient.so.18.0.0 /usr/lib/mysql/libmysqlclient.so