CentOS7.2 初始配置及修改端口
升级yum yum update
安装vim yum install vim-enhanced
备份sshd配置文件 scp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
创建密匙 ssh-keygen
授权密匙 scp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
查阅并下载私匙文件 cat /root/.ssh/id_rsa
修改sshd配置文件 vim /etc/ssh/sshd_config(port xx/PubkeyAuthentication yes/PasswordAuthentication no)
重启SSH服务 systemctl restart sshd.service
添加SELinux ssh端口 semanage port -a -t ssh_port_t -p tcp xxxx
查看当前SElinux ssh端口 semanage port -l | grep ssh
重启SSH服务 systemctl restart sshd.service
修改文件夹权限 chmod 750 FILEL_NAME
安装redis——server
下载redis
wget http://download.redis.io/releases/redis-stable.tar.gz
tar zxvf redis-stable.tar.gz
yum install cpp
yum install binutils
yum install glibc
yum install glibc-kernheaders
yum install glibc-common
yum install glibc-devel
yum install gcc
yum install make
yum install gcc
yum install tcl
make MALLOC=libc
cd utils
ln -s /usr/local/redis/bin/redis-* /usr/local/bin/
sudo ./install_server.sh
sudo service redis_6379 start
cd ..
cp redis.conf /usr/local/bin
安装phpredis
wget https://github.com/phpredis/phpredis/archive/3.1.2.tar.gz
tar zxvf FIELL_NAME
-------安装xampp
/opt/lampp/bin/phpize # php安装后的路径
-------安装autoconf
./configure --with-php-config=/opt/lampp/bin/php-config
scp /opt/lampp/etc/php.ini /opt/lampp/etc/php.bak
vim /opt/lampp/etc/php.ini:
extension=redis.so
/opt/lampp/lampp restart
升级yum yum update
安装vim yum install vim-enhanced
备份sshd配置文件 scp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
创建密匙 ssh-keygen
授权密匙 scp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
查阅并下载私匙文件 cat /root/.ssh/id_rsa
修改sshd配置文件 vim /etc/ssh/sshd_config(port xx/PubkeyAuthentication yes/PasswordAuthentication no)
重启SSH服务 systemctl restart sshd.service
添加SELinux ssh端口 semanage port -a -t ssh_port_t -p tcp xxxx
查看当前SElinux ssh端口 semanage port -l | grep ssh
重启SSH服务 systemctl restart sshd.service
修改文件夹权限 chmod 750 FILEL_NAME
安装redis——server
下载redis
wget http://download.redis.io/releases/redis-stable.tar.gz
tar zxvf redis-stable.tar.gz
yum install cpp
yum install binutils
yum install glibc
yum install glibc-kernheaders
yum install glibc-common
yum install glibc-devel
yum install gcc
yum install make
yum install gcc
yum install tcl
make MALLOC=libc
cd utils
ln -s /usr/local/redis/bin/redis-* /usr/local/bin/
sudo ./install_server.sh
sudo service redis_6379 start
cd ..
cp redis.conf /usr/local/bin
安装phpredis
wget https://github.com/phpredis/phpredis/archive/3.1.2.tar.gz
tar zxvf FIELL_NAME
-------安装xampp
/opt/lampp/bin/phpize # php安装后的路径
-------安装autoconf
./configure --with-php-config=/opt/lampp/bin/php-config
scp /opt/lampp/etc/php.ini /opt/lampp/etc/php.bak
vim /opt/lampp/etc/php.ini:
extension=redis.so
/opt/lampp/lampp restart