服务器基础配置(Redhat/CentOS)
来源:互联网 发布:淘宝短视频服务商 编辑:程序博客网 时间:2024/06/04 20:00
当给服务器安装好系统后,还需要做一些日常配置,才能保证其正常运行:
基础配置
- 网络
- /etc/sysconfig/network-scripts 路径下配置eth0,eth1,lo等
- DNS
- /etc/resolv.conf
- nameserver 8.8.8.8
- /etc/resolv.conf
- selinux关闭
- /etc/selinux/config(SELINUX=disabled)
- 系统参数配置
- /etc/security/limits.conf
- /etc/sysctl.conf(内核参数)
- 用户和用户组
- 添加必要的用户和组,如mysql,www,nagios等
- 修改权限(chattr +i)
- rsync/ssh 免密码登录
- 计划任务
- ntpdate设置同步时间,ntpdate 202.120.2.101 pool.ntp.org
- 日志滚动/删除(nginx,php日志)
- 防火墙开启
- nfs挂载
- 中文安装字体(/usr/share/fonts/chinese)
jdk
- 安装顺序由低版本至高版本(/usr/java)
- rpm 安装jdk-7u9和jdk-7u21
- chmod +x jdk-7u9-linux-x64.rpm/jdk-7u21-linux-x64.rpm
- rpm -ivh jdk-7u9-linux-x64.rpm/jdk-7u21-linux-x64.rpm
安装依赖库 (php和nginx等安装需要)
- pcre,zlib,openssl,libunwind,curl,freetype,gettext,ImageMagick,jepg,libevent,libmcrypt,libmemcached,libpng,libxml,scws,tokyocabinet,tokyotyrant
openresty
- 添加插件:google_perftools和http_stub_status_module
编译参数:
./configure --prefix=/web/openresty --user=www --group=www --with-luajit --without-http_redis2_module --with-http_postgres_module --with-http_iconv_module --with-google_perftools_module --with-pcre=/root/web/nginx/pcre-8.36 --with-pcre-jit --with-zlib=/root/web/nginx/zlib-1.2.8 --add-module=../ngx_cache_purge-2.3 --with-http_stub_status_module
安装与配置
- nginx/conf
php
php版本安装
- 编译参数:
./configure --prefix=/web/php --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-jpeg-dir=/web/jpeg6 --with-png-dir=/web/libpng2 --with-freetype-dir=/web/freetype2 --with-zlib-dir=/web/zlib --disable-ipv6 --enable-sockets --disable-debug --with-config-file-path=/web/php/lib --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-sysvmsg --enable-sysvshm --enable-mbregex --enable-mbstring --with-bz2=/usr --with-libxml-dir=/web/libxml2 --with-curl=/web/curl --enable-gd-native-ttf --with-openssl --with-mhash --with-xmlrpc --enable-zip --enable-soap --without-pear --enable-fpm --with-libdir=lib64
- 编译参数:
php扩展安装 (*.so文件)
- 路径:/web/php/lib/php/extensions/no-debug-non-zts-20131226
- apcu, blite, gd, igbinary, imagick, mcrypt, memcached, memcache, mongo, opcache, qqwry, redis, scws, tokyo_tyrant
- 配置文件修改
- /web/php/lib/php.ini
- /web/php/etc/php-fpm.conf
- /etc/init.d/php-fpm(用于启动相关项)
mysql
- 二进制安装
- 配置:mysql用户,data数据目录,my.cnf等
- 详见官网:http://dev.mysql.com/doc/refman/5.5/en/binary-installation.html
监控部署
- nagios
- 安装:xintd,nagios-plugins,nrpe
- 配置:/etc/services和/etc/xinetd.d/nrpe
- 监控项:/web/nagios/etc/nrpe.cfg
- 添加插件:/web/nagios/libexec下添加监控脚本(mysql主从,nginx和php连接数等)
- cacti
- 安装:snmp
- 配置:/etc/snmp/snmpd.conf
缓存
- memcached
- redis
- twemproxy(代理)
队列
- UCmq
0 0
- 服务器基础配置(Redhat/CentOS)
- redhat(centos)网络配置
- centos / redhat vnc 配置
- centos云服务器基础配置详解(三)安装tomcat
- Linux Samba 服务器配置(RedHat)
- RedHat配置 Samba 服务器
- RedHat配置FTP服务器
- RedHat配置FTP服务器 .
- Redhat配置git 服务器
- redhat centos linux防火墙配置
- redhat centos安装配置远程桌面
- 为redhat 配置CentOS 源
- RedHat 5 配置 Centos yum
- linux(redhat)服务器配置,第三章:防火墙配置
- CentOS/Redhat:手动配置IP地址(命令和图形界面)
- RedHat服务器配置方案(全)
- Redhat 5 配置Samba服务器
- RedHat Linux服务器安全配置
- Apache POI 第三讲之对Excel单元格的操作
- DBCP连接池配置参数说明
- Activity在AndroidManifest中的一些配置属性
- 【SSH系列】静态代理&&动态代理
- 什么是用户代理?
- 服务器基础配置(Redhat/CentOS)
- 在数组 arr 的 index 处添加元素 item。不要直接修改数组 arr,结果返回新的数组
- JS Tab切换 选项卡 五种方法
- Fragment的生命周期以及与Activity生命周期联动
- APP开发流程实例讲解-儒释道网络电台八天开发全程-在Android Studio中完成界面设计
- ASP.NET的缓存机制
- 多说 评论系统
- VirtualBox虚拟vdi磁盘扩容
- 愚人的linux内核2440移植札记(超曲折版)